2006-02-05 17:43:00 +00:00
|
|
|
#ifndef _GYR_MESSAGE_H
|
|
|
|
#define _GYR_MESSAGE_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "protocol.h"
|
|
|
|
#include "clock.h"
|
|
|
|
|
|
|
|
class Message {
|
|
|
|
public:
|
|
|
|
|
|
|
|
private:
|
|
|
|
char * _raw;
|
|
|
|
size_t _size;
|
|
|
|
char * _data;
|
|
|
|
short _data_size;
|
|
|
|
TimeStamp * _stamp; // construit dynamiquement
|
|
|
|
Protocol::Type _type;
|
|
|
|
protected:
|
|
|
|
public:
|
|
|
|
|
2006-03-01 21:40:44 +00:00
|
|
|
Message(Protocol::Type type, TimeStamp &ts, char * data, unsigned short data_size);
|
2006-02-05 17:43:00 +00:00
|
|
|
Message(void * data, int len);
|
|
|
|
Message(const Message & mesg);
|
|
|
|
|
|
|
|
char * getRaw();
|
|
|
|
size_t getRawSize();
|
|
|
|
char * getData();
|
|
|
|
short getDataSize();
|
|
|
|
Protocol::Type getType();
|
|
|
|
TimeStamp getStamp();
|
|
|
|
bool operator==(Message &message);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|