RoboidControl
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Passer::RoboidControl::NetworkSync Class Referenceabstract

Interface for synchronizaing state between clients across a network. More...

#include <NetworkSync.h>

Public Types

typedef void(* Buffer) (UInt8 *buffer, UInt16 bufferSize)
 

Public Member Functions

 NetworkSync ()
 
virtual void NetworkUpdate (Roboid *roboid)=0
 Retreive and send the roboid state.
 
virtual void DestroyObject (InterestingThing *obj)=0
 Inform that the given object is no longer being tracked.
 
virtual void NewObject (InterestingThing *obj)
 
void ReceiveMessage (Roboid *roboid, unsigned char bytecount)
 
void ReceiveNetworkId ()
 
void SendInvestigateThing (InterestingThing *thing)
 
void SendPoseMsg (Buffer sendBuffer, Roboid *roboid)
 
void SendDestroyObject (Buffer sendBuffer, InterestingThing *obj)
 
void PublishNewObject ()
 
void PublishTrackedObjects (Buffer sendBuffer, InterestingThing **objects)
 
virtual void SendPosition (Vector3 worldPosition)
 
virtual void SendPose (Vector3 worldPosition, Quaternion worldOrientation)
 

Public Attributes

unsigned char networkId
 

Static Public Attributes

static const unsigned char PoseMsg = 0x10
 The id of a Pose message.
 
static const unsigned char PoseTypeMsg = 0x11
 
static const unsigned char RelativePoseMsg = 0x12
 
static const unsigned char Pose_Position = 0x01
 A bit pattern for the pose, stating that this message contains a position in world coordinates.
 
static const unsigned char Pose_Orientation = 0x02
 A bit pattern for the pose, stating that this message contains an orientation in world coordinates.
 
static const unsigned char Pose_LinearVelocity = 0x04
 A bit pattern for the pose, stating that this messsage contains a linear velocity in world coordinates.
 
static const char Pose_AngularVelocity = 0x08
 A bit pattern for the pose, stating that this message contains an angular velocity in world coordinates.
 
static const unsigned char DestroyMsg = 0x20
 
static const unsigned char AngVelocity2DMsg = 0x46
 
static const unsigned char Position2DMsg = 0x61
 
static const unsigned char Velocity2DMsg = 0x62
 
static const unsigned char CreateMsg = 0x80
 
static const unsigned char InvestigateMsg = 0x81
 
static const unsigned char ClientMsg = 0xA0
 
static const unsigned char NetworkIdMsg = 0xA1
 

Protected Member Functions

void PublishTrackedObject (Buffer sendBuffer, InterestingThing *object)
 
void PublishRelativeObject (Buffer sendBuffer, UInt8 parentId, InterestingThing *object)
 
void SendSingle100 (unsigned char *data, unsigned int startIndex, float value)
 
void SendInt32 (unsigned char *data, unsigned int startIndex, Int32 value)
 
void SendAngle8 (unsigned char *data, unsigned int startIndex, const float value)
 
void SendVector3 (unsigned char *data, unsigned char *startIndex, const Vector3 v)
 
void SendQuaternion (unsigned char *data, const int startIndex, const Quaternion q)
 
void SendPolar (unsigned char *data, unsigned char *startIndex, Polar p)
 
void SendSpherical (unsigned char *data, int startIndex, Spherical s)
 
void SendQuat32 (unsigned char *data, unsigned char *startIndex, const Quaternion q)
 
virtual void SendBuffer (unsigned char bufferSize)
 
void PublishClient ()
 

Protected Attributes

NetworkPerceptionnetworkPerception
 
unsigned char * buffer
 

Detailed Description

Interface for synchronizaing state between clients across a network.

Member Typedef Documentation

◆ Buffer

typedef void(* Passer::RoboidControl::NetworkSync::Buffer) (UInt8 *buffer, UInt16 bufferSize)

Constructor & Destructor Documentation

◆ NetworkSync()

NetworkSync::NetworkSync ( )

Member Function Documentation

◆ NetworkUpdate()

virtual void Passer::RoboidControl::NetworkSync::NetworkUpdate ( Roboid roboid)
pure virtual

Retreive and send the roboid state.

Parameters
roboidThe roboid for which the state is updated

◆ DestroyObject()

virtual void Passer::RoboidControl::NetworkSync::DestroyObject ( InterestingThing obj)
pure virtual

Inform that the given object is no longer being tracked.

Parameters
obj

◆ NewObject()

virtual void Passer::RoboidControl::NetworkSync::NewObject ( InterestingThing obj)
inlinevirtual

◆ ReceiveMessage()

void NetworkSync::ReceiveMessage ( Roboid roboid,
unsigned char  bytecount 
)

◆ ReceiveNetworkId()

void NetworkSync::ReceiveNetworkId ( )

◆ SendInvestigateThing()

void NetworkSync::SendInvestigateThing ( InterestingThing thing)

◆ SendPoseMsg()

void NetworkSync::SendPoseMsg ( Buffer  sendBuffer,
Roboid roboid 
)

◆ SendDestroyObject()

void NetworkSync::SendDestroyObject ( Buffer  sendBuffer,
InterestingThing obj 
)

◆ PublishNewObject()

void Passer::RoboidControl::NetworkSync::PublishNewObject ( )

◆ PublishTrackedObjects()

void NetworkSync::PublishTrackedObjects ( Buffer  sendBuffer,
InterestingThing **  objects 
)

◆ SendPosition()

virtual void Passer::RoboidControl::NetworkSync::SendPosition ( Vector3  worldPosition)
inlinevirtual

◆ SendPose()

virtual void Passer::RoboidControl::NetworkSync::SendPose ( Vector3  worldPosition,
Quaternion  worldOrientation 
)
inlinevirtual

◆ PublishTrackedObject()

void NetworkSync::PublishTrackedObject ( Buffer  sendBuffer,
InterestingThing object 
)
protected

◆ PublishRelativeObject()

void NetworkSync::PublishRelativeObject ( Buffer  sendBuffer,
UInt8  parentId,
InterestingThing object 
)
protected

◆ SendSingle100()

void NetworkSync::SendSingle100 ( unsigned char *  data,
unsigned int  startIndex,
float  value 
)
protected

◆ SendInt32()

void NetworkSync::SendInt32 ( unsigned char *  data,
unsigned int  startIndex,
Int32  value 
)
protected

◆ SendAngle8()

void NetworkSync::SendAngle8 ( unsigned char *  data,
unsigned int  startIndex,
const float  value 
)
protected

◆ SendVector3()

void NetworkSync::SendVector3 ( unsigned char *  data,
unsigned char *  startIndex,
const Vector3  v 
)
protected

◆ SendQuaternion()

void NetworkSync::SendQuaternion ( unsigned char *  data,
const int  startIndex,
const Quaternion  q 
)
protected

◆ SendPolar()

void NetworkSync::SendPolar ( unsigned char *  data,
unsigned char *  startIndex,
Polar  p 
)
protected

◆ SendSpherical()

void NetworkSync::SendSpherical ( unsigned char *  data,
int  startIndex,
Spherical  s 
)
protected

◆ SendQuat32()

void NetworkSync::SendQuat32 ( unsigned char *  data,
unsigned char *  startIndex,
const Quaternion  q 
)
protected

◆ SendBuffer()

void NetworkSync::SendBuffer ( unsigned char  bufferSize)
protectedvirtual

◆ PublishClient()

void NetworkSync::PublishClient ( )
protected

Member Data Documentation

◆ networkId

unsigned char Passer::RoboidControl::NetworkSync::networkId

◆ PoseMsg

const unsigned char Passer::RoboidControl::NetworkSync::PoseMsg = 0x10
static

The id of a Pose message.

◆ PoseTypeMsg

const unsigned char Passer::RoboidControl::NetworkSync::PoseTypeMsg = 0x11
static

◆ RelativePoseMsg

const unsigned char Passer::RoboidControl::NetworkSync::RelativePoseMsg = 0x12
static

◆ Pose_Position

const unsigned char Passer::RoboidControl::NetworkSync::Pose_Position = 0x01
static

A bit pattern for the pose, stating that this message contains a position in world coordinates.

◆ Pose_Orientation

const unsigned char Passer::RoboidControl::NetworkSync::Pose_Orientation = 0x02
static

A bit pattern for the pose, stating that this message contains an orientation in world coordinates.

◆ Pose_LinearVelocity

const unsigned char Passer::RoboidControl::NetworkSync::Pose_LinearVelocity = 0x04
static

A bit pattern for the pose, stating that this messsage contains a linear velocity in world coordinates.

◆ Pose_AngularVelocity

const char Passer::RoboidControl::NetworkSync::Pose_AngularVelocity = 0x08
static

A bit pattern for the pose, stating that this message contains an angular velocity in world coordinates.

◆ DestroyMsg

const unsigned char Passer::RoboidControl::NetworkSync::DestroyMsg = 0x20
static

◆ AngVelocity2DMsg

const unsigned char Passer::RoboidControl::NetworkSync::AngVelocity2DMsg = 0x46
static

◆ Position2DMsg

const unsigned char Passer::RoboidControl::NetworkSync::Position2DMsg = 0x61
static

◆ Velocity2DMsg

const unsigned char Passer::RoboidControl::NetworkSync::Velocity2DMsg = 0x62
static

◆ CreateMsg

const unsigned char Passer::RoboidControl::NetworkSync::CreateMsg = 0x80
static

◆ InvestigateMsg

const unsigned char Passer::RoboidControl::NetworkSync::InvestigateMsg = 0x81
static

◆ ClientMsg

const unsigned char Passer::RoboidControl::NetworkSync::ClientMsg = 0xA0
static

◆ NetworkIdMsg

const unsigned char Passer::RoboidControl::NetworkSync::NetworkIdMsg = 0xA1
static

◆ networkPerception

NetworkPerception* Passer::RoboidControl::NetworkSync::networkPerception
protected

◆ buffer

unsigned char* Passer::RoboidControl::NetworkSync::buffer
protected

The documentation for this class was generated from the following files: