This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

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: 2020-06-01
Build: ()