00001 // Copyright (c) 2004, Thomas Lochmatter, thl@lothosoft.ch 00002 00003 #ifndef classMipMessage 00004 #define classMipMessage 00005 00007 00012 class MipMessage { 00013 00014 public: 00016 #include "MipMessageTypes.inc.h" 00017 00018 protected: 00020 int mDestination; 00022 int mSource; 00024 eType mType; 00026 unsigned char mData[1024]; 00027 00028 public: 00030 MipMessage(int src=0, int dest=0, eType type=sNone); 00031 00033 int GetDestination() const {return mDestination;} 00035 int GetSource() const {return mSource;} 00037 eType GetType() const {return mType;} 00039 virtual int GetLength() const = 0; 00040 00042 void SetDestination(int dest); 00044 void SetBroadcast() {SetDestination(255);} 00046 void SetSource(int src); 00048 void SetType(eType type); 00049 00051 unsigned int CalcCRC(); 00052 }; 00053 00054 #endif