This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

IG.CIGI.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.

This class implements the connection between the IG Plugin and the CIGI protocol.

Notice
IG plugin must be loaded.

IG::CIGI::Connector Class

Перечисления (Enums)

CIGI_MODE#

ИмяОписание
STANDBY = 0Standby mode of the IG. This is the normal real-time operating mode for the IG. All packets issued by the Host will be processed by the IG. The IG should not perform diagnostics in this mode.
OPERATE = 1Operate mode of the IG. This is the normal real-time operating mode for the IG. All packets issued by the Host will be processed by the IG. The IG should not perform diagnostics in this mode.
DEBUG = 2Debug mode of the IG. This mode is similar to the Operate mode but provides data and/or error logging and other debugging features to aid integration or troubleshooting of the Host and IG interface. Because of the overhead of these debugging features, the IG may not always operate in a hard real-time fashion.
OFFLINE = 3Offline Maintenance mode of the IG. In this mode, the IG ignores all data from the Host and sends only Start of Frame packets. This mode can be activated only from the IG. Because the IG Control packets from the Host are ignored by the IG, the IG must be placed into Reset/Standby mode before the Host can initiate further mode changes.

Properties

bool IsInitialized#

The value indicating if the CIGI Connector was initialized successfully.

int IGStatus#

The current IG status. The following values are supported:
  • 0 - normal
  • 1-255 - an error has occurred
.

bool Synchronous#

The value indicating if synchronous operation mode is currently enabled (when disabled, asynchronous mode is used).

bool IsInterpolation#

The value indicating if interpolation and extrapolation are enabled.

CIGI.CIGI_MODE IGMode#

The current IG mode.

uint IGFrame#

The number of the current frame for the IG.

uint HostFrame#

The number of the current frame for the Host.

double Time#

The IG's simulation time.

double LastReceivedHostTime#

The last received Host time (timestamp value in "IG Control").

Members


int Init ( int version, string host, int send, int recv, int size = 1432 ) #

Initializes the CIGI Connector using the given parameters.

Arguments

  • int version - CIGI protocol version. One of the CIGI_VERSION_* values.
  • string host - CIGI Host address.
  • int send - TCP port number to be used for sending packets to the CIGI Host.
  • int recv - TCP port number to be used for receiving packets from the CIGI Host.
  • int size - Packet size. The default value is 1432.

Return value

1 if the CIGI Connector was initialized successfully; otherwise, 0.

int Shutdown ( ) #

Returns a value indicating if the CIGI Connector was shutdown successfully.

Return value

true if the CIGI Connector was shutdown successfully; otherwise, false.

IntPtr AddOnConnectCallback ( OnConnectDelegate func ) #

Adds a callback function to be fired when the Host has connected.

Arguments

  • OnConnectDelegate func - Callback function with the following signature: void OnConnectDelegate(void)

Return value

ID of the last added connect callback, if the callback was added successfully; otherwise, nullptr. This ID can be used to remove this callback when necessary.

bool RemoveOnConnectCallback ( IntPtr id ) #

Removes the specified callback from the list of Connect callbacks.

Arguments

  • IntPtr id - Connect callback ID obtained when adding it.

Return value

True if the Connect callback with the given ID was removed successfully; otherwise false.

IntPtr AddOnReceivePacketCallback ( int cigi_opcode, OnReceivePacketDelegate func ) #

Sets a callback function to be fired when a packet of the specified type has been received from the Host.

Arguments

  • int cigi_opcode - CIGI data packet opcode. One of the CIGI_OPCODE_* values.
  • OnReceivePacketDelegate func - Callback function with the following signature: void OnReceivePacketDelegate(CigiHostPacket)

Return value

ID of the last added Receive Packet callback, if the callback was added successfully; otherwise, nullptr. This ID can be used to remove this callback when necessary.

bool RemoveOnReceivePacketCallback ( IntPtr id ) #

Removes the specified callback from the list of Receive Packet callbacks.

Arguments

  • IntPtr id - Receive Packet callback ID obtained when adding it.

Return value

true if the Receive Packet callback with the given ID was removed successfully; otherwise false.

int GetNumHostPackets ( ) #

Returns the total number of packets received from the Host.

Return value

Total number of packets received from the Host.

CigiIGPacket GetHostPacket ( int num ) #

Returns the specified CIGI Host packet.

Arguments

  • int num - ID of the Host packet.

Return value

CIGI Host packet.

CigiIGPacket CreateIGPacket ( int ig_opcode ) #

Creates IG Packet to be sent to the Host.

Arguments

Return value

IG Packet to be sent to the Host.

void AddIGPacket ( CigiIGPacket packet ) #

Sends the specified IG packet to the Host.

Arguments

void SetProcessPacket ( int op_code, bool enabled ) #

Sets a value indicating if the specified IG packets received are to be processed or skipped.

Arguments

  • int op_code - IG opcode, one of CIGI_OPCODE_* values.
  • bool enabled - true to process packets of the specified type, false to skip them.

void ShowDebug ( ) #

Displays the debug information.
Last update: 19.04.2024
Build: ()