00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __CPACKET_H
00022 #define __CPACKET_H
00023
00024 #include "cmessage.h"
00025
00026
00027
00034 class SIM_API cPacket : public cMessage
00035 {
00036 protected:
00037 short _protocol;
00038 short _pdu;
00039
00040 public:
00043
00047 explicit cPacket(const char *name=NULL, short protocol=0, short pdu=0) :
00048 cMessage(name,MK_PACKET) {_protocol=protocol;_pdu=pdu;}
00049
00053 cPacket(const cPacket& m);
00054
00059 cPacket& operator=(const cPacket& m);
00061
00064
00069 virtual cObject *dup() const {return new cPacket(*this);}
00070
00074 virtual const char *className() const {return "cPacket";}
00075
00080 virtual const char *inspectorFactoryName() const {return "cPacketIFC";}
00081
00086 virtual void info(char *buf);
00087
00093 virtual int netPack();
00094
00100 virtual int netUnpack();
00102
00105
00109 short protocol() const {return _protocol;}
00110
00114 short pdu() const {return _pdu;}
00115
00119 void setProtocol(short p) {_protocol=p;}
00120
00124 void setPdu(short p) {_pdu=p;}
00126 };
00127
00128 #endif
00129
00130