Homepage Demos Overview Downloads Tutorials Reference
Credits

Serializer Class Reference

#include <Serializer.h>

Inheritance diagram for Serializer:

Inheritance graph
[legend]
List of all members.

Detailed Description

provides a default serializer base class for simple objects

Definition at line 25 of file Serializer.h.

Static Public Member Functions

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

void hostToNetwork (char *dst, const char *src, int length)
 converts to network byte order (big endian - aibo is little endian)

void encode (char **dst, const char *src, int length)
 writes length bytes from src to dst

void encodeHeader (char **dst, PacketFormat_t pformat)
 writes packet type and timestamp

void encodeDoublesAsFloats (char **dst, const double *src, int length)
 a simple form of compression - calls encode(dst,float(src[i])) for i=0..length


Member Function Documentation

void Serializer::encode char **  dst,
const char *  src,
int  length
[inline, static]
 

writes length bytes from src to dst

Definition at line 44 of file Serializer.h.

template<class T>
void Serializer::encode char **  dst,
value
[inline, static]
 

writes value to dst and advances dst

Definition at line 29 of file Serializer.h.

void Serializer::encodeDoublesAsFloats char **  dst,
const double *  src,
int  length
[inline, static]
 

a simple form of compression - calls encode(dst,float(src[i])) for i=0..length

Definition at line 57 of file Serializer.h.

References encode().

Here is the call graph for this function:

void Serializer::encodeHeader char **  dst,
PacketFormat_t  pformat
[inline, static]
 

writes packet type and timestamp

Definition at line 50 of file Serializer.h.

References encode(), get_time(), and time.

Here is the call graph for this function:

void Serializer::hostToNetwork char *  dst,
const char *  src,
int  length
[inline, static]
 

converts to network byte order (big endian - aibo is little endian)

Definition at line 38 of file Serializer.h.


The documentation for this class was generated from the following file:
Tekkotsu v1.5
Generated Fri Oct 10 15:57:26 2003 by Doxygen 1.3.4