Beaming Scene Service  2.0
RakNet wrapper for managing data communications between multiple Beaming clients
netClient/client.h File Reference
#include <string>
#include <sstream>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CLIENT_LIB_EXPORT

Enumerations

enum  BeamingDataType {
  AVATAR, FACIAL, EMOTION, VIDEO,
  TACTILE, ROBOT, OBJECT, AUDIO,
  POINTCLOUD, GENERIC
}

Functions

CLIENT_LIB_EXPORT int startclient (char *server_address, int server_port, char *client, char *clienttype, char *config, int viewer, int reliability=2, int priority=1, int interval_ms=30)
CLIENT_LIB_EXPORT void check ()
CLIENT_LIB_EXPORT void createNode (char *id)
CLIENT_LIB_EXPORT int addRocketBoxAvatar (char *avatar_id, char *avatar_cfg)
CLIENT_LIB_EXPORT int deleteRocketBoxAvatar (char *avatar_id)
 Deletes all 123 nodes for the specified RocketBox AVATAR id.
CLIENT_LIB_EXPORT void addNode (char *id, char node_type[])
CLIENT_LIB_EXPORT void addChildNode (char *id, char *parent_id, char node_type[])
CLIENT_LIB_EXPORT int updateNodes (char *id, float x, float y, float z, float rx, float ry, float rz, float w)
CLIENT_LIB_EXPORT int updateRocketBoxAvatar (char *avatar_id, char *node_id, float x, float y, float z, float rx, float ry, float rz, float w)
CLIENT_LIB_EXPORT int updateAvatarNodes (char *id, float x, float y, float z, float rx, float ry, float rz, float w)
CLIENT_LIB_EXPORT int updateFacialNodes (char *id, bool blink, float smile, float frown, float o, float e, float p)
 updateFacialNodes(node_id, bool, 5 floats) updates the data for the FACIAL nodes that you created.
CLIENT_LIB_EXPORT int updateEmotionNodes (char *id, double valence, double arousal, double misc)
 updateEmotionNodes(node_id, 3 doubles) updates the data for the EMOTION nodes that you created.
CLIENT_LIB_EXPORT int updateTactileNodes (char *id, double duration, float intensity, float temperature)
 updateTactileNodes(node_id, 1 float, 2 doubles) updates the data for the TACTILE nodes that you created.
CLIENT_LIB_EXPORT int updateRobotNodes (char *id, int type, int details, float freespace, float x, float y, float z, float rx, float ry, float rz, float w, float time_remain, int contact_type)
 updateRobotNodes(node_id, 3 integers and 9 floats) updates the data for the ROBOT nodes that you created.
CLIENT_LIB_EXPORT int updateAudioNodes (char *id, char *host, int port, char *file_url, char *config)
 updateAudioNodes(node_id, 3 strings and 1 integer) updates the data for the AUDIO nodes that you created.
CLIENT_LIB_EXPORT int updateVideoNodes (char *id, char *host, int port, char *file_url, int frame_width, int frame_height, double bandwidth, float *camera_calibration1, float *camera_calibration2)
 updateVideoNodes(node_id, 2 strings, 3 integers and 1 double and 2 matrices) updates the data for the VIDEO nodes that you created. 3x3 camera_calibration1 matrix = float[9]. 4x4 camera_calibration2 matrix = float[16]
CLIENT_LIB_EXPORT int updateObjectNodes (char *id, char *host, int port, char *file_url, float x, float y, float z, float rx, float ry, float rz, float w)
 updateObjectNodes(node_id, 2 strings, 1 integer and 7 floats) updates the data for the OBJECT nodes that you created.
CLIENT_LIB_EXPORT int updatePointCloudNodes (char *id, char *host, int port, char *file_url, int size, double bandwidth, bool RGB_flag, int quality)
 updatePointCloudNodes(node_id, 2 strings, 3 integers, 1 double and 1 boolean) updates the data for the POINTCLOUD nodes that you created.
CLIENT_LIB_EXPORT int updateGenericNodes (char *id, void *pdata, int psize)
 updateGenericNodes updates a shared generic data and its size
CLIENT_LIB_EXPORT void removeAllNodes ()
 use removeAllNodes() and stop() on exit
CLIENT_LIB_EXPORT void removeNode (char *id, char node_type[])
 use removeNode() to remove a specific node
CLIENT_LIB_EXPORT int getPeersInfo (char *peers_info)
CLIENT_LIB_EXPORT int getPeersID (char *peers_info)
CLIENT_LIB_EXPORT void getIPinfo (char strid[], char *ipinfo)
 returns the ip address and port of the specified GUID
CLIENT_LIB_EXPORT int getMyGUID (char *mGUID)
 returns the GUID of your client
CLIENT_LIB_EXPORT int getNodesInfo (char peer_guid[], char *nodes_info)
CLIENT_LIB_EXPORT int setAvatarName (char *avatar_id, char *firstname, char *lastname)
 sets the firstname and lastname for the avatar created with addRocketBoxAvatar
CLIENT_LIB_EXPORT void getAvatarName (char strid[], char avatar_id[], char *firstname, char *lastname)
 gets the firstname and lastname for the specified avatar
CLIENT_LIB_EXPORT int getAvatarData (char strid[], char avatar_id[], char *node_ids, float *fa)
CLIENT_LIB_EXPORT int getFacialData (char strid[], char *node_ids, bool *blink, float *smile, float *frown, float *o, float *e, float *p)
 getFacialData(guid, node_id, bool, 5 floats) Gets the FACIAL data for the specified client/peer.
CLIENT_LIB_EXPORT int getEmotionData (char strid[], char *node_ids, double *valence, double *arousal, double *misc)
 getEmotionData(guid, node_id, 3 doubles) Gets the EMOTION data for the specified client/peer.
CLIENT_LIB_EXPORT int getTactileData (char strid[], char *node_ids, double *duration, float *intensity, float *temperature)
 getTactileData(guid, node_id, 1 float, 2 doubles) Gets the TACTILE data for the specified client/peer.
CLIENT_LIB_EXPORT int getRobotData (char strid[], char *node_ids, int *type, int *details, float *freespace, float *x, float *y, float *z, float *rx, float *ry, float *rz, float *w, float *time_remain, int *contact_type)
 getRobotData(guid, node_id, 3 integers and 9 floats) Gets the ROBOT data for the specified client/peer.
CLIENT_LIB_EXPORT int getAudioData (char strid[], char *node_ids, char *host, int *port, char *file_url, char *config)
 getAudioData(guid, node_id, 3 strings and 1 integer) Gets the AUDIO data for the specified client/peer.
CLIENT_LIB_EXPORT int getVideoData (char strid[], char *node_ids, char *host, int *port, char *file_url, int *frame_width, int *frame_height, double *bandwidth, float *camera_calibration1, float *camera_calibration2)
 getVideoData(guid, node_id, 2 strings, 3 integers 1 double and 2 matrices) Gets the VIDEO data for the specified client/peer.
CLIENT_LIB_EXPORT int getObjectData (char strid[], char *node_ids, char *host, int *port, char *file_url, float *fa)
 getObjectData(guid, node_id, 2 strings, 1 integer and 7 floats) Gets the OBJECT data for the specified client/peer.
CLIENT_LIB_EXPORT int getPointCloudData (char strid[], char *node_ids, char *host, int *port, char *file_url, int *size, double *bandwidth, bool *RGB_flag, int *quality)
 getPointCloudData(guid, node_id, 2 strings, 2 integers, 1 double and 1 boolean) Gets the POINTCLOUD data for the specified client/peer.
CLIENT_LIB_EXPORT bool getGenericData (char strid[], char generic_id[], void *pdata, int *psize)
 getGenericData returns a pointer to a shared generic data and its size
CLIENT_LIB_EXPORT bool getAvatarSpecificData (char strid[], char avatar_id[], char node_id[], float *fa)
CLIENT_LIB_EXPORT bool getAvatarSpecificGlobalData (char strid[], char avatar_id[], char node_id[], float *fa)
CLIENT_LIB_EXPORT bool getFacialSpecificData (char strid[], char node_id[], bool *blink, float *smile, float *frown, float *o, float *e, float *p)
 Returns FACIAL data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getEmotionSpecificData (char strid[], char node_id[], double *valence, double *arousal, double *misc)
 Returns EMOTION data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getTactileSpecificData (char strid[], char node_id[], double *duration, float *intensity, float *temperature)
 Returns TACTILE data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getRobotSpecificData (char strid[], char node_id[], int *type, int *details, float *freespace, float *fa, float *time_remain, int *contact_type)
 Returns ROBOT data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getAudioSpecificData (char strid[], char node_id[], char *host, int *port, char *file_url, char *config)
 Returns AUDIO data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getVideoSpecificData (char strid[], char node_id[], char *host, int *port, char *file_url, int *frame_width, int *frame_height, double *bandwidth, float *camera_calibration1, float *camera_calibration2)
 Returns VIDEO data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getObjectSpecificData (char strid[], char node_id[], char *host, int *port, char *file_url, float *fa)
 Returns OBJECT data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT bool getPointCloudSpecificData (char strid[], char node_id[], char *host, int *port, char *file_url, int *size, double *bandwidth, bool *RGB_flag, int *quality)
 Returns POINTCLOUD data of specified nodes for the specified client peer.
CLIENT_LIB_EXPORT int checkStatus (char *idstr, char *mytype, char *name, char *myconfig)
CLIENT_LIB_EXPORT int fetch (char strid[], float *fa)
CLIENT_LIB_EXPORT int fetch2 (char strid[], char *fa)
CLIENT_LIB_EXPORT void stop ()
 use removeAllNodes() and stop() on exit
CLIENT_LIB_EXPORT void exitlibrary ()
 use exitlibrary() on exit

Define Documentation

Definition at line 28 of file client.h.


Enumeration Type Documentation

Enumerator:
AVATAR 
FACIAL 
EMOTION 
VIDEO 
TACTILE 
ROBOT 
OBJECT 
AUDIO 
POINTCLOUD 
GENERIC 

Definition at line 31 of file client.h.


Function Documentation

CLIENT_LIB_EXPORT void addChildNode ( char *  id,
char *  parent_id,
char  node_type[] 
)

Adds a Node and also sets the parents addNode("LeftEye","Head","AVATAR") adds a left eye node of type AVATAR and attaches it to the head (parent)

Definition at line 410 of file client.cpp.

CLIENT_LIB_EXPORT void addNode ( char *  id,
char  node_type[] 
)

Adds a Node addNode("Head","AVATAR") adds a left eye node of type AVATAR

Deprecated:
Use addRocketBoxAvatar(char *id);

Definition at line 316 of file client.cpp.

CLIENT_LIB_EXPORT int addRocketBoxAvatar ( char *  avatar_id,
char *  avatar_cfg 
)

Adds a RocketBox AVATAR skeleton (default node ids of 0 to 122 and a Rocketbox cfg file) addRocketBoxAvatar adds 123 AVATAR nodes/joints using the RocketBox hierarchy

Definition at line 174 of file client.cpp.

Put check() function in a continuous loop somewhere in your code (OnTimer or OnFrame loop). The server regularly pings all clients to ensure they are still live. check also checks for new connections to the server and receives incoming packets.

Definition at line 112 of file client.cpp.

CLIENT_LIB_EXPORT int checkStatus ( char *  idstr,
char *  mytype,
char *  name,
char *  myconfig 
)

checkStatus and fetch works together checkStatus checks if there's a new client and returns the details of the new clients the first parameter is the id of the new client which you should store in your code NOTE: this functions informs you of new clients which is then deleted from buffer once accessed, hence housekeeping is required

Deprecated:
Use getPeersInfo(...) or getPeersID(...)

Definition at line 1825 of file client.cpp.

CLIENT_LIB_EXPORT void createNode ( char *  id)

createNode for each data you want to send e.g. for an avatar, you would create node for:

  • createNode("Head"); //create raknet node/object for head position/orientation
    Deprecated:
    Use addRocketBoxAvatar(char *id);

Definition at line 163 of file client.cpp.

CLIENT_LIB_EXPORT int deleteRocketBoxAvatar ( char *  avatar_id)

Deletes all 123 nodes for the specified RocketBox AVATAR id.

Definition at line 425 of file client.cpp.

use exitlibrary() on exit

Definition at line 1974 of file client.cpp.

CLIENT_LIB_EXPORT int fetch ( char  strid[],
float *  fa 
)

Fetches the node-ids, current position and orientation data for all connected clients Assumes node-id is a number

Deprecated:
Use the appropriate getNodesData functions (depending on the data types being sent e.g. getAvatarData, getAvatarSpecificData, getEmotionData, getEmotionSpecificData, etc.)

Definition at line 1847 of file client.cpp.

CLIENT_LIB_EXPORT int fetch2 ( char  strid[],
char *  fa 
)

Fetches the node-ids, current position and orientation data for all connected clients Assumes node-id is a number

Deprecated:
Use the appropriate getNodesData functions (depending on the data types being sent e.g. getAvatarData, getAvatarSpecificData, getEmotionData, getEmotionSpecificData, etc.)

Definition at line 1897 of file client.cpp.

CLIENT_LIB_EXPORT int getAudioData ( char  strid[],
char *  node_ids,
char *  host,
int *  port,
char *  file_url,
char *  config 
)

getAudioData(guid, node_id, 3 strings and 1 integer) Gets the AUDIO data for the specified client/peer.

Definition at line 1257 of file client.cpp.

CLIENT_LIB_EXPORT bool getAudioSpecificData ( char  strid[],
char  node_id[],
char *  host,
int *  port,
char *  file_url,
char *  config 
)

Returns AUDIO data of specified nodes for the specified client peer.

Definition at line 1653 of file client.cpp.

CLIENT_LIB_EXPORT int getAvatarData ( char  strid[],
char  avatar_id[],
char *  node_ids,
float *  fa 
)

getAvatarData(guid, avatar_id, node_id, 7 floats) Gets AVATAR data for the specified avatar added by client/peer (strid). Similar to deprecated fetch function but it also gets the node-ids separately as string instead String node_ids contain the following info: {AVATARJOINTID1,AVATARJOINTID2,AVATARJOINTID3,...} Float fa returns data for 123 nodes (i.e. 123*7 floats) Call getPeersID to get guid and getNodesInfo to get avatar_id i.e. nodename

Definition at line 1071 of file client.cpp.

CLIENT_LIB_EXPORT void getAvatarName ( char  strid[],
char  avatar_id[],
char *  firstname,
char *  lastname 
)

gets the firstname and lastname for the specified avatar

Definition at line 1041 of file client.cpp.

CLIENT_LIB_EXPORT bool getAvatarSpecificData ( char  strid[],
char  avatar_id[],
char  node_id[],
float *  fa 
)

Returns AVATAR data of specified joint/node for the specified avatar added by client peer (strid) Call getPeersID to get guid and getNodesInfo to get avatar_id i.e. nodename

Definition at line 1427 of file client.cpp.

CLIENT_LIB_EXPORT bool getAvatarSpecificGlobalData ( char  strid[],
char  avatar_id[],
char  node_id[],
float *  fa 
)

Returns AVATAR data of specified joint/node for the specified avatar added by client peer (strid) in WORLD CO-ORDINATES Call getPeersID to get guid and getNodesInfo to get avatar_id i.e. nodename

Definition at line 1461 of file client.cpp.

CLIENT_LIB_EXPORT int getEmotionData ( char  strid[],
char *  node_ids,
double *  valence,
double *  arousal,
double *  misc 
)

getEmotionData(guid, node_id, 3 doubles) Gets the EMOTION data for the specified client/peer.

Definition at line 1148 of file client.cpp.

CLIENT_LIB_EXPORT bool getEmotionSpecificData ( char  strid[],
char  node_id[],
double *  valence,
double *  arousal,
double *  misc 
)

Returns EMOTION data of specified nodes for the specified client peer.

Definition at line 1556 of file client.cpp.

CLIENT_LIB_EXPORT int getFacialData ( char  strid[],
char *  node_ids,
bool *  blink,
float *  smile,
float *  frown,
float *  o,
float *  e,
float *  p 
)

getFacialData(guid, node_id, bool, 5 floats) Gets the FACIAL data for the specified client/peer.

Definition at line 1112 of file client.cpp.

CLIENT_LIB_EXPORT bool getFacialSpecificData ( char  strid[],
char  node_id[],
bool *  blink,
float *  smile,
float *  frown,
float *  o,
float *  e,
float *  p 
)

Returns FACIAL data of specified nodes for the specified client peer.

Definition at line 1523 of file client.cpp.

CLIENT_LIB_EXPORT bool getGenericData ( char  strid[],
char  generic_id[],
void *  pdata,
int *  psize 
)

getGenericData returns a pointer to a shared generic data and its size

Definition at line 1789 of file client.cpp.

CLIENT_LIB_EXPORT void getIPinfo ( char  strid[],
char *  ipinfo 
)

returns the ip address and port of the specified GUID

Definition at line 960 of file client.cpp.

CLIENT_LIB_EXPORT int getMyGUID ( char *  mGUID)

returns the GUID of your client

Definition at line 949 of file client.cpp.

CLIENT_LIB_EXPORT int getNodesInfo ( char  peer_guid[],
char *  nodes_info 
)

returns the number of nodes that was created by the specified guid: {NODENAME1,NODEID1,NODETYPE1,NODECFG1;NODENAME2,NODEID2,NODETYPE2,NODECFG2;...} e.g {"avatar","0","AVATAR";"clientname","object1","OBJECT";...} where TYPES: enum BeamingDataTypes NOTE: In the case of AVATAR data type, NODENAME - "avatar" is the avatar_id that was defined in addRocketBoxAvatar while NODEID is always "0" (root) For all other data types, NODENAME - clientname is defined by clients in startclient

Definition at line 1012 of file client.cpp.

CLIENT_LIB_EXPORT int getObjectData ( char  strid[],
char *  node_ids,
char *  host,
int *  port,
char *  file_url,
float *  fa 
)

getObjectData(guid, node_id, 2 strings, 1 integer and 7 floats) Gets the OBJECT data for the specified client/peer.

Definition at line 1341 of file client.cpp.

CLIENT_LIB_EXPORT bool getObjectSpecificData ( char  strid[],
char  node_id[],
char *  host,
int *  port,
char *  file_url,
float *  fa 
)

Returns OBJECT data of specified nodes for the specified client peer.

Definition at line 1719 of file client.cpp.

CLIENT_LIB_EXPORT int getPeersID ( char *  peers_info)

returns how many peers are actually connected with just the ID info: {GUID1;GUID2;...} e.g {"0"; "1";"2";...}

Definition at line 995 of file client.cpp.

CLIENT_LIB_EXPORT int getPeersInfo ( char *  peers_info)

returns how many peers are actually connected and the following infos: {GUID1,,CLIENTNAME1CLIENTTYPE1,CLIENTCONFIG1;GUID2,CLIENTNAME2,CLIENTTYPE2,CLIENTCONFIG2;...} e.g {"0","Luigi","VISITOR","m01.cfg";"1","Paolo","VISITOR","m02.cfg";"2","Eduardo","SPECTATOR","m03.cfg";} where TYPES: enum BeamingDataTypes.

Definition at line 932 of file client.cpp.

CLIENT_LIB_EXPORT int getPointCloudData ( char  strid[],
char *  node_ids,
char *  host,
int *  port,
char *  file_url,
int *  size,
double *  bandwidth,
bool *  RGB_flag,
int *  quality 
)

getPointCloudData(guid, node_id, 2 strings, 2 integers, 1 double and 1 boolean) Gets the POINTCLOUD data for the specified client/peer.

Definition at line 1386 of file client.cpp.

CLIENT_LIB_EXPORT bool getPointCloudSpecificData ( char  strid[],
char  node_id[],
char *  host,
int *  port,
char *  file_url,
int *  size,
double *  bandwidth,
bool *  RGB_flag,
int *  quality 
)

Returns POINTCLOUD data of specified nodes for the specified client peer.

Definition at line 1755 of file client.cpp.

CLIENT_LIB_EXPORT int getRobotData ( char  strid[],
char *  node_ids,
int *  type,
int *  details,
float *  freespace,
float *  x,
float *  y,
float *  z,
float *  rx,
float *  ry,
float *  rz,
float *  w,
float *  time_remain,
int *  contact_type 
)

getRobotData(guid, node_id, 3 integers and 9 floats) Gets the ROBOT data for the specified client/peer.

CLIENT_LIB_EXPORT bool getRobotSpecificData ( char  strid[],
char  node_id[],
int *  type,
int *  details,
float *  freespace,
float *  fa,
float *  time_remain,
int *  contact_type 
)

Returns ROBOT data of specified nodes for the specified client peer.

Definition at line 1613 of file client.cpp.

CLIENT_LIB_EXPORT int getTactileData ( char  strid[],
char *  node_ids,
double *  duration,
float *  intensity,
float *  temperature 
)

getTactileData(guid, node_id, 1 float, 2 doubles) Gets the TACTILE data for the specified client/peer.

Definition at line 1181 of file client.cpp.

CLIENT_LIB_EXPORT bool getTactileSpecificData ( char  strid[],
char  node_id[],
double *  duration,
float *  intensity,
float *  temperature 
)

Returns TACTILE data of specified nodes for the specified client peer.

Definition at line 1584 of file client.cpp.

CLIENT_LIB_EXPORT int getVideoData ( char  strid[],
char *  node_ids,
char *  host,
int *  port,
char *  file_url,
int *  frame_width,
int *  frame_height,
double *  bandwidth,
float *  camera_calibration1,
float *  camera_calibration2 
)

getVideoData(guid, node_id, 2 strings, 3 integers 1 double and 2 matrices) Gets the VIDEO data for the specified client/peer.

Definition at line 1297 of file client.cpp.

CLIENT_LIB_EXPORT bool getVideoSpecificData ( char  strid[],
char  node_id[],
char *  host,
int *  port,
char *  file_url,
int *  frame_width,
int *  frame_height,
double *  bandwidth,
float *  camera_calibration1,
float *  camera_calibration2 
)

Returns VIDEO data of specified nodes for the specified client peer.

Definition at line 1683 of file client.cpp.

use removeAllNodes() and stop() on exit

Definition at line 1932 of file client.cpp.

CLIENT_LIB_EXPORT void removeNode ( char *  id,
char  node_type[] 
)

use removeNode() to remove a specific node

Definition at line 449 of file client.cpp.

CLIENT_LIB_EXPORT int setAvatarName ( char *  avatar_id,
char *  firstname,
char *  lastname 
)

sets the firstname and lastname for the avatar created with addRocketBoxAvatar

Definition at line 586 of file client.cpp.

CLIENT_LIB_EXPORT int startclient ( char *  server_address,
int  server_port,
char *  client,
char *  clienttype,
char *  config,
int  viewer,
int  reliability = 2,
int  priority = 1,
int  interval_ms = 30 
)

Call the start function to initialise a client connection

  • server_address is the ip address of the machine running the RakNet Server
  • server_port is the port the server is using for contacting clients
  • client is the client name (any name)
  • client type is the type of client connecting (e.g. VISITOR, PROXY, LOCAL, SPECTATOR, ROBOT, HAPTIC_DEVICE, etc)
  • config can also be any string
  • 0 is default. Specify viewer=1(true) if your client is connecting as viewer only (i.e.you want to see what's happening but be invisble to others)
  • packet reliability =
    • 0 = UNRELIABLE, Unreliable packets are sent by straight UDP. They may arrive out of order, or not at all. This is best for data that is unimportant, or data that you send very frequently so even if some packets are missed newer packets will compensate. Advantages - These packets don't need to be acknowledged by the network, saving the size of a UDP header in acknowledgment (about 50 bytes or so). The savings can really add up. Disadvantages - No packet ordering, packets may never arrive, these packets are the first to get dropped if the send buffer is full.
    • 1 = UNRELIABLE_SEQUENCED, Unreliable sequenced packets are the same as unreliable packets, except that only the newest packet is ever accepted. Older packets are ignored. Advantages - Same low overhead as unreliable packets, and you don't have to worry about older packets changing your data to old values. Disadvantages - A LOT of packets will be dropped since they may never arrive because of UDP and may be dropped even when they do arrive. These packets are the first to get dropped if the send buffer is full. The last packet sent may never arrive, which can be a problem if you stop sending packets at some particular point.
    • 2 = RELIABLE, Reliable packets are UDP packets monitored by a reliablilty layer to ensure they arrive at the destination. Advantages - You know the packet will get there. Eventually... Disadvantages - Retransmissions and acknowledgments can add significant bandwidth requirements. Packets may arrive very late if the network is busy. No packet ordering.
    • 3 = RELIABLE_ORDERED, Reliable ordered packets are UDP packets monitored by a reliability layer to ensure they arrive at the destination and are ordered at the destination. Advantages - The packet will get there and in the order it was sent. These are by far the easiest to program for because you don't have to worry about strange behavior due to out of order or lost packets. Disadvantages - Retransmissions and acknowledgments can add significant bandwidth requirements. Packets may arrive very late if the network is busy. One late packet can delay many packets that arrived sooner, resulting in significant lag spikes. However, this disadvantage can be mitigated by the clever use of ordering streams .
    • 4 = RELIABLE_SEQUENCED Reliable sequenced packets are UDP packets monitored by a reliability layer to ensure they arrive at the destination and are sequenced at the destination. Advantages - You get the reliability of UDP packets, the ordering of ordered packets, yet don't have to wait for old packets. More packets will arrive with this method than with the unreliable sequenced method, and they will be distributed more evenly. The most important advantage however is that the latest packet sent will arrive, where with unreliable sequenced the latest packet sent may not arrive. Disadvantages - Wasteful of bandwidth because it uses the overhead of reliable UDP packets to ensure late packets arrive that just get ignored anyway.
    • 5 = UNRELIABLE_WITH_ACK_RECEIPT,
    • 6 = UNRELIABLE_SEQUENCED_WITH_ACK_RECEIPT,
    • 7 = RELIABLE_WITH_ACK_RECEIPT,
    • 8 = RELIABLE_ORDERED_WITH_ACK_RECEIPT,
    • 9 = RELIABLE_SEQUENCED_WITH_ACK_RECEIPT, Acknowledgment recipts (*_WITH_ACK_RECEIPT) By specifying one of the PacketReliability types that contain _WITH_ACK_RECEIPT, you can request that RakPeerInterface notify you when a message has been acknowledged by the remote system, or delivery has timed out.
  • packet priority =
    • 0 = IMMEDIATE_PRIORITY, The highest possible priority. These message trigger sends immediately, and are generally not buffered or aggregated into a single datagram. Messages at HIGH_PRIORITY priority and lower are buffered to be sent in groups at 10 millisecond intervals
    • 1 = HIGH_PRIORITY, For every 2 IMMEDIATE_PRIORITY messages, 1 HIGH_PRIORITY will be sent.
    • 2 = MEDIUM_PRIORITY, For every 2 HIGH_PRIORITY messages, 1 MEDIUM_PRIORITY will be sent.
    • 3 = LOW_PRIORITY, For every 2 MEDIUM_PRIORITY messages, 1 LOW_PRIORITY will be sent.
  • interval_ms
    • How frequently to autoserialize all objects. This controls the maximum number of game object updates per second. If you want to control the update interval with more granularity, use the return values from Replica3::Serialize().

Definition at line 52 of file client.cpp.

use removeAllNodes() and stop() on exit

Definition at line 1962 of file client.cpp.

CLIENT_LIB_EXPORT int updateAudioNodes ( char *  id,
char *  host,
int  port,
char *  file_url,
char *  config 
)

updateAudioNodes(node_id, 3 strings and 1 integer) updates the data for the AUDIO nodes that you created.

Definition at line 810 of file client.cpp.

CLIENT_LIB_EXPORT int updateAvatarNodes ( char *  id,
float  x,
float  y,
float  z,
float  rx,
float  ry,
float  rz,
float  w 
)

updateAvatarNodes(node_id, 7 floats) updates the data for the AVATAR nodes that you created. updateAvatarNodes expects three XYZ postions and four XYZW quaternion orientations as floats.

Definition at line 633 of file client.cpp.

CLIENT_LIB_EXPORT int updateEmotionNodes ( char *  id,
double  valence,
double  arousal,
double  misc 
)

updateEmotionNodes(node_id, 3 doubles) updates the data for the EMOTION nodes that you created.

Definition at line 725 of file client.cpp.

CLIENT_LIB_EXPORT int updateFacialNodes ( char *  id,
bool  blink,
float  smile,
float  frown,
float  o,
float  e,
float  p 
)

updateFacialNodes(node_id, bool, 5 floats) updates the data for the FACIAL nodes that you created.

Definition at line 696 of file client.cpp.

CLIENT_LIB_EXPORT int updateGenericNodes ( char *  id,
void *  pdata,
int  psize 
)

updateGenericNodes updates a shared generic data and its size

Definition at line 664 of file client.cpp.

CLIENT_LIB_EXPORT int updateNodes ( char *  id,
float  x,
float  y,
float  z,
float  rx,
float  ry,
float  rz,
float  w 
)

Simply calls updateAvatarNodes updateNodes(node_id, 7 floats) updates the data for the AVATAR nodes that you created. updateNodes expects three XYZ postions and four XYZW quaternion orientations as floats.

Deprecated:
Use appropriate function for corresponding data type e.g. updateAvatarNodes, updateFacialNodes, updateEmotionNodes, etc.

Definition at line 609 of file client.cpp.

CLIENT_LIB_EXPORT int updateObjectNodes ( char *  id,
char *  host,
int  port,
char *  file_url,
float  x,
float  y,
float  z,
float  rx,
float  ry,
float  rz,
float  w 
)

updateObjectNodes(node_id, 2 strings, 1 integer and 7 floats) updates the data for the OBJECT nodes that you created.

Definition at line 870 of file client.cpp.

CLIENT_LIB_EXPORT int updatePointCloudNodes ( char *  id,
char *  host,
int  port,
char *  file_url,
int  size,
double  bandwidth,
bool  RGB_flag,
int  quality 
)

updatePointCloudNodes(node_id, 2 strings, 3 integers, 1 double and 1 boolean) updates the data for the POINTCLOUD nodes that you created.

Definition at line 903 of file client.cpp.

CLIENT_LIB_EXPORT int updateRobotNodes ( char *  id,
int  type,
int  details,
float  freespace,
float  x,
float  y,
float  z,
float  rx,
float  ry,
float  rz,
float  w,
float  time_remain,
int  contact_type 
)

updateRobotNodes(node_id, 3 integers and 9 floats) updates the data for the ROBOT nodes that you created.

Definition at line 775 of file client.cpp.

CLIENT_LIB_EXPORT int updateRocketBoxAvatar ( char *  avatar_id,
char *  node_id,
float  x,
float  y,
float  z,
float  rx,
float  ry,
float  rz,
float  w 
)

updateRocketBoxAvatar(avatar_id, node_id, 7 floats) updates the data for the Rocketbox AVATAR nodes that you created. updateRocketBoxAvatar expects three XYZ postions and four XYZW quaternion orientations as floats. you should specify the avatar_id you added and respective node_id, which can be from 0 to 123. see sample avatar config file.

Definition at line 621 of file client.cpp.

CLIENT_LIB_EXPORT int updateTactileNodes ( char *  id,
double  duration,
float  intensity,
float  temperature 
)

updateTactileNodes(node_id, 1 float, 2 doubles) updates the data for the TACTILE nodes that you created.

Definition at line 750 of file client.cpp.

CLIENT_LIB_EXPORT int updateVideoNodes ( char *  id,
char *  host,
int  port,
char *  file_url,
int  frame_width,
int  frame_height,
double  bandwidth,
float *  camera_calibration1,
float *  camera_calibration2 
)

updateVideoNodes(node_id, 2 strings, 3 integers and 1 double and 2 matrices) updates the data for the VIDEO nodes that you created. 3x3 camera_calibration1 matrix = float[9]. 4x4 camera_calibration2 matrix = float[16]

Definition at line 836 of file client.cpp.

 All Classes Files Functions Variables Enumerations Enumerator Defines