This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

cigi_client_00

This article describes the data/samples/plugins/cigi_client_00.cpp sample.

The cigi_client_00 sample demonstrates how to:

  • Initialize connection via the CIGI protocol in the script
  • Respond to packets received from the CIGI host
Notice
Start the CIGI Host before running the sample.

It is required to change values of the following variables in the cigi_client_00.cpp file before running the sample:

  • host should contain an IP address of the CIGI Host (by default it is 192.168.0.20)
  • recv should contain a port, which is used by the CIGI Host for sending packets over the network (default value is 33333)
  • send should contain a port, which is used by the CIGI Host for getting a response from the master (default value is 44444)

The variables listed above are specified in the cigi_client_00.cpp as follows:

Source code (UnigineScript)
#include <samples/plugins/common/plugins.h>
#include <samples/common/info.h>

#ifdef HAS_CIGI_CLIENT

/*
 */
string host = "192.168.0.20";
int send = 33333;
int recv = 44444;
int size = 1472;

/*
 */
Info info;

/*
 */
string reflect_packet(CigiHostPacket packet) {
...

Data sent by the CIGI host to the image generator should appear as follows:

See Also

Last update: 03.07.2017
Build: ()