CIGIClient
The CigiClient plugin enables Tellusim applications to interface with Common Image Generator Interface (CIGI) systems using the CIGI V4 protocol. It allows Tellusim to function as an Image Generator (IG) node in distributed simulation environments, facilitating communication with external simulation hosts or control systems.
The plugin manages a bi-directional CIGI session, supports geospatial transformations, real-time updates, and provides direct access to CIGI message streams and session data.
info
The plugins/network/cigiclient/extern/lib
directory contains prebuilt CIGI SDK libraries for Windows, Linux, and macOS.
#include <network/cigiclient/include/TellusimCigiClient.h>
Example
// Create the CIGI client
client = makeAutoPtr(new CigiClient());
if(!client->create("10.0.0.255", 7701, 7702)) return false;
// Register this object as a CIGI signal processor
client->getInput().RegisterSignalProcessor(this);
// Handle entity control packets
virtual void OnEntityCtrl(CigiBasePacket *packet) {
const CigiEntityCtrlV3_3 *src = (const CigiEntityCtrlV3_3*)packet;
// Handle main entity with ID 0
if(src->GetEntityID() == 0) {
Matrix4x3d transform = client->getTransform(packet);
entity_node.setGlobalTransform(transform);
scene_graph.updateObjectTree();
entity_node.updateScene();
}
}