This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Полезные советы
Программирование на C#
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm (Experimental)
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

IG::DIS::Connector Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.
Header: #include <UnigineDISConnector.h>

IG::DIS::Connector Class

Members


void init ( String ip, int site, int exercise, int app, int port ) #

Initializes the DIS Connector using the given parameters.

Arguments

  • String ip - Broadcast address of the server computer that is used to broadcast messages to IG over the network
  • int site - Site ID of this application instance.
  • int exercise - Exercise ID of the DIS.
  • int app - Application ID of this application instance. If not set, will be generated automatically.
  • int port - Connection port. This argument is optional, default value is 3000.

void setConnectCallback ( Unigine::CallbackBase * func ) #

Sets the parameter to be called when connection is established.

Arguments

  • Unigine::CallbackBase * func - Parameter to be called when connection is established.

Unigine::CallbackBase * getConnectCallback ( ) #

Returns the parameter that is called when connection is established.

Return value

Parameter to be called when connection is established.

void setCallbackOnRecvPacket ( int pdu_type, Unigine::CallbackBase * func ) #

Sets the parameter to be called when the packet is received.

Arguments

  • int pdu_type - PDU type.
  • Unigine::CallbackBase * func - Parameter to be called when the packet is received. Callback's signature: void func(KDIS::PDU::Header *packet).

Unigine::CallbackBase * getReceivePacketCallback ( int pdu_type ) #

Returns the parameter that is called when the packet is received.

Arguments

  • int pdu_type - PDU type.

Return value

Parameter to be called when the packet is received.

int64_t getInternalEntityID ( int app, int id ) #

Returns the IG internal entity ID.

Arguments

  • int app - Application ID.
  • int id - DIS entity ID.

Return value

IG internal entity ID.

void setManualPacketProcess ( bool enabled ) #

Enables or disables manual processing of packets. By default, certain packets are processed automatically. If manual processing is enabled, packets are just passed to a callback.

Arguments

  • bool enabled - Flag: true if the manual packet process is enabled; otherwise, false. The default value is false.

void setConnectionThreadCallbacks ( Unigine::CallbackBase * on_connect, Unigine::CallbackBase * on_disconnect ) #

Sets callbacks for tuning the connection instance.
Warning
This callback will be invoked in a thread that is not the main thread.

Arguments

  • Unigine::CallbackBase * on_connect - Parameter to be called in the connection thread immediately after the connection is established. Callback's signature: void func(KDIS::NETWORK::Connection * connection).
  • Unigine::CallbackBase * on_disconnect - Parameter to be called after a connection failure or shutdown. Callback's signature: void func(KDIS::NETWORK::Connection * connection).
    Notice
    Connection may be nullptr.
Last update: 24.11.2020
Build: ()