Unigine::Synker::SlaveInterface Class
Header: | #include <SynckerInterface.h> |
Inherits: | SynckerInterface |
This class represents the slave interface of the Syncker.
Syncker plugin must be loaded.
SlaveInterface Class
Members
int getMasterNodeId(int slave_node_id)
Returns the ID of a dynamic node on the Master by its local ID on the Slave. A Slave does not create an exact copy of a node created on the Master, their IDs do not match. So, knowing an ID of a local copy of a node created on the Master, you can easily find its original on the Master. This can be used in user messages, when you need to apply some specific modifications to source node on the Master.Arguments
- int slave_node_id - Node's ID on the Slave.
Return value
ID of the node on the Master.int getSlaveNodeId(int master_node_id)
Returns the local ID of a dynamic node on the Slave by its ID on the Master. A Slave does not create an exact copy of a node created on the Master, their IDs do not match. So, if you created a node on the Master and then called the SynckerMaster::createNode() method, you can easily find its copy on the current Slave. This can be used in user messages, when you need to apply some specific modifications to a Slave's copy of a node, that was created on the Master.Arguments
- int master_node_id - Node's ID on the Master.
Return value
ID of the node on the Slave.void setUdpRecvSize(int size)
Sets the maximum size of a UDP packet to be received.Arguments
- int size - UDP packet size, in bytes. The default value is 1432.
int getUdpRecvSize()
Sets the maximum size of a UDP packet to be received.Return value
UDP packet size, in bytes. The default value is 1432.void setSkipWorldMessages(int skip)
Sets a value indicating if world messages (TCP and UDP) should be skipped.Arguments
- int skip - 1 to skip world messages (TCP and UDP); 0 - to receive them.
void setSkipUserMessages(int skip)
Sets a value indicating if user messages (TCP and UDP) should be skipped.Arguments
- int skip - 1 to skip user messages (TCP and UDP); 0 - to receive them.
int isWorldMessagesSkipped()
Returns a value indicating if world messages (TCP and UDP) are skipped.Return value
1 if world messages (TCP and UDP) are skipped; otherwise, 0.int isUserMessagesSkipped()
Returns a value indicating if user messages (TCP and UDP) are skipped.Return value
1 if user messages (TCP and UDP) are skipped; otherwise, 0.int isPacketsReceived()
Returns a value indicating if packets where received after the last update().Return value
1 if packets were received after the last update(); otherwise, 0.int isPacketsLost()
Returns a value indicating if there are missing packets after the last update().Return value
1 if there are missing packets after the last update(); otherwise, 0.double getMasterTime()
Returns the current master time (with latency corrections).Return value
Current master time, in seconds.int hasCAVE()
Returns the value indicating if there are viewer's head position synchronization packets received after the last update().Return value
1 if there are viewer's head position synchronization packets received after the last update(); otherwise, 0.int hasEnd()
Returns the value indicating if there is a frame_end synchronization packet received after the last update().Return value
1 if there is a frame_end synchronization packet received after the last update(); otherwise, 0.int hasFrame()
Returns the value indicating if there is a frame_start synchronization packet received after the last update().Return value
1 if there is a frame_start synchronization packet received after the last update(); otherwise, 0.int hasPlayer()
Returns the value indicating if there are player synchronization packets received after the last update().Return value
1 if there are player synchronization packets received after the last update(); otherwise, 0.int hasRender()
Returns the value indicating if there are render synchronization packets received after the last update().Return value
1 if there are render synchronization packets received after the last update(); otherwise, 0.int hasUser()
Returns the value indicating if there are user's synchronization packets received after the last update().Return value
1 if there are user's synchronization packets received after the last update(); otherwise, 0.void sendTCPUser(const BlobPtr & message)
Sends a user message contained in the specified buffer to the master via the TCP protocol.Arguments
- const BlobPtr & message - Buffer, containing a user message.
int TCP_USER_RECEIVE
Description
Callback to be fired on receiving a TCP user message. The signature of the callback function should be as follows:void callback_function_name(BlobPtr &received_message);
int UDP_USER_RECEIVE
Description
Callback to be fired on receiving a UPD user message. The signature of the callback function should be as follows:void callback_function_name(BlobPtr &received_message);
Last update: 2018-08-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)