Skip to content

Protocol Specification

zukoo edited this page Aug 5, 2013 · 5 revisions

The protocol is based on TCP sockets. It can support different type of clients. Currently either a viewer or a remote control client.

Handshake

The type of client is defined by sending a first string after initializing the socket. "CLIENT" for remote control. "VIEWER" to get information about servos positions.

Client Packets

struct packet {
  int id;
  int flags;
  int x;           // Axis 0
  int y;           // Axis 1
  int turn;        // Axis 2
  int height;      // Axis 3
};
#define B01 1
#define B02 1 << 1
#define B03 1 << 2
#define B04 1 << 3
#define B05 1 << 4  // CLEAR EVENTS
#define B06 1 << 5  // RESET POSITION
#define B11 1 << 6  // STANDUP
#define B12 1 << 7  // SITDOWN

Viewer Packets