Network Implementation

Network traffic is handled through the simple transmission of UDP packets without error checking or order guarantee. The Puppet Master has internal code to transmit UDP packets; the Stage listens on one or more ports through the instantiation of a PacketMaster object (see API). On the Stage end, the PacketMaster is responsible for receiving the network data from the operating system, deserializing it, and calling the appropriate functions within the Stage object to pass the commands onto the puppets.

The Virpet Packet Format is as follows (quoted from the API)
Serialized data format:

A single payload unit consists of the following elements:

ACTION:
unsigned int padded to two characters
OBJECT:
unsigned int padded to two characters
JOINT:
unsigned int padded to two characters
VALUE:
signed double one place of decimal precision
A single payload unit is represented in string form as:
ACTION:OBJECT:JOINT:VALUE
A full packet of payloads is represented in string form as:
{PAYLOAD;PAYLOAD;PAYLOAD;...}NULL

Example:

{02:03:01:50.6;02:03:02:75.0;04:02:03:-78.5}\0