Homepage Demos Overview Downloads Tutorials Reference
Credits

WorldStateSerializerBehavior Class Reference

#include <WorldStateSerializerBehavior.h>

Inheritance diagram for WorldStateSerializerBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

Copies WorldState into a buffer for transmission over the network.

To determine the communication protocol, just look in the processEvent() function - it's pretty straightforward binary copy of values

Definition at line 14 of file WorldStateSerializerBehavior.h.

Public Member Functions

 WorldStateSerializerBehavior ()
 constructor

virtual void DoStart ()
 starts listening for sensor update events

virtual void DoStop ()
 stops listening for events

virtual void processEvent (const EventBase &e)
 core functionality - performs serialization, sends to sockets

virtual std::string getName () const
 Identifies the behavior in menus and such.


Static Public Member Functions

std::string getClassDescription ()
 Gives a short description of what this class of behaviors does... you should override this (but don't have to).


Static Protected Member Functions

template<class T> void encode (char **dst, const T &value)
 writes value to dst and advances dst

template<class T> void encode (char **dst, const T *src, int num)
 writes length bytes from src to dst


Protected Attributes

SocketwsJoints
 socket for sending current joint data

SocketwsPIDs
 socket for sending current PID info


Private Member Functions

 WorldStateSerializerBehavior (const WorldStateSerializerBehavior &)
 don't call

WorldStateSerializerBehavioroperator= (const WorldStateSerializerBehavior &)
 don't call


Constructor & Destructor Documentation

WorldStateSerializerBehavior::WorldStateSerializerBehavior  ) 
 

constructor

Definition at line 7 of file WorldStateSerializerBehavior.cc.

WorldStateSerializerBehavior::WorldStateSerializerBehavior const WorldStateSerializerBehavior  )  [private]
 

don't call


Member Function Documentation

void WorldStateSerializerBehavior::DoStart  )  [virtual]
 

starts listening for sensor update events

Reimplemented from BehaviorBase.

Definition at line 18 of file WorldStateSerializerBehavior.cc.

void WorldStateSerializerBehavior::DoStop  )  [virtual]
 

stops listening for events

Reimplemented from BehaviorBase.

Definition at line 23 of file WorldStateSerializerBehavior.cc.

template<class T>
void WorldStateSerializerBehavior::encode char **  dst,
const T *  src,
int  num
[inline, static, protected]
 

writes length bytes from src to dst

Definition at line 40 of file WorldStateSerializerBehavior.h.

template<class T>
void WorldStateSerializerBehavior::encode char **  dst,
const T &  value
[inline, static, protected]
 

writes value to dst and advances dst

Definition at line 31 of file WorldStateSerializerBehavior.h.

Referenced by processEvent().

std::string WorldStateSerializerBehavior::getClassDescription  )  [inline, static]
 

Gives a short description of what this class of behaviors does... you should override this (but don't have to).

Reimplemented from BehaviorBase.

Definition at line 22 of file WorldStateSerializerBehavior.h.

virtual std::string WorldStateSerializerBehavior::getName  )  const [inline, virtual]
 

Identifies the behavior in menus and such.

Implements BehaviorBase.

Definition at line 21 of file WorldStateSerializerBehavior.h.

WorldStateSerializerBehavior& WorldStateSerializerBehavior::operator= const WorldStateSerializerBehavior  )  [private]
 

don't call

void WorldStateSerializerBehavior::processEvent const EventBase e  )  [virtual]
 

core functionality - performs serialization, sends to sockets

Reimplemented from BehaviorBase.

Definition at line 28 of file WorldStateSerializerBehavior.cc.


Member Data Documentation

Socket* WorldStateSerializerBehavior::wsJoints [protected]
 

socket for sending current joint data

Definition at line 45 of file WorldStateSerializerBehavior.h.

Referenced by processEvent(), and WorldStateSerializerBehavior().

Socket* WorldStateSerializerBehavior::wsPIDs [protected]
 

socket for sending current PID info

Definition at line 46 of file WorldStateSerializerBehavior.h.

Referenced by processEvent(), and WorldStateSerializerBehavior().


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

Tekkotsu v2.1
Generated Tue Mar 16 23:22:34 2004 by Doxygen 1.3.5