|
INET Framework for OMNeT++/OMNEST
|
00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.2 from linklayer/ethernet/EtherFrame.msg. 00003 // 00004 00005 #ifndef _ETHERFRAME_M_H_ 00006 #define _ETHERFRAME_M_H_ 00007 00008 #include <omnetpp.h> 00009 00010 // opp_msgc version check 00011 #define MSGC_VERSION 0x0402 00012 #if (MSGC_VERSION!=OMNETPP_VERSION) 00013 # error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help. 00014 #endif 00015 00016 // cplusplus {{ 00017 #include "Ethernet.h" 00018 #include "MACAddress.h" 00019 #include "Ieee802Ctrl_m.h" 00020 // }} 00021 00022 00023 00032 class EtherJam : public ::cPacket 00033 { 00034 protected: 00035 00036 private: 00037 void copy(const EtherJam& other); 00038 00039 protected: 00040 // protected and unimplemented operator==(), to prevent accidental usage 00041 bool operator==(const EtherJam&); 00042 00043 public: 00044 EtherJam(const char *name=NULL, int kind=0); 00045 EtherJam(const EtherJam& other); 00046 virtual ~EtherJam(); 00047 EtherJam& operator=(const EtherJam& other); 00048 virtual EtherJam *dup() const {return new EtherJam(*this);} 00049 virtual void parsimPack(cCommBuffer *b); 00050 virtual void parsimUnpack(cCommBuffer *b); 00051 00052 // field getter/setter methods 00053 }; 00054 00055 inline void doPacking(cCommBuffer *b, EtherJam& obj) {obj.parsimPack(b);} 00056 inline void doUnpacking(cCommBuffer *b, EtherJam& obj) {obj.parsimUnpack(b);} 00057 00069 class EtherFrame : public ::cPacket 00070 { 00071 protected: 00072 MACAddress dest_var; 00073 MACAddress src_var; 00074 00075 private: 00076 void copy(const EtherFrame& other); 00077 00078 protected: 00079 // protected and unimplemented operator==(), to prevent accidental usage 00080 bool operator==(const EtherFrame&); 00081 00082 public: 00083 EtherFrame(const char *name=NULL, int kind=0); 00084 EtherFrame(const EtherFrame& other); 00085 virtual ~EtherFrame(); 00086 EtherFrame& operator=(const EtherFrame& other); 00087 virtual EtherFrame *dup() const {return new EtherFrame(*this);} 00088 virtual void parsimPack(cCommBuffer *b); 00089 virtual void parsimUnpack(cCommBuffer *b); 00090 00091 // field getter/setter methods 00092 virtual MACAddress& getDest(); 00093 virtual const MACAddress& getDest() const {return const_cast<EtherFrame*>(this)->getDest();} 00094 virtual void setDest(const MACAddress& dest); 00095 virtual MACAddress& getSrc(); 00096 virtual const MACAddress& getSrc() const {return const_cast<EtherFrame*>(this)->getSrc();} 00097 virtual void setSrc(const MACAddress& src); 00098 }; 00099 00100 inline void doPacking(cCommBuffer *b, EtherFrame& obj) {obj.parsimPack(b);} 00101 inline void doUnpacking(cCommBuffer *b, EtherFrame& obj) {obj.parsimUnpack(b);} 00102 00112 class EthernetIIFrame : public ::EtherFrame 00113 { 00114 protected: 00115 int etherType_var; 00116 00117 private: 00118 void copy(const EthernetIIFrame& other); 00119 00120 protected: 00121 // protected and unimplemented operator==(), to prevent accidental usage 00122 bool operator==(const EthernetIIFrame&); 00123 00124 public: 00125 EthernetIIFrame(const char *name=NULL, int kind=0); 00126 EthernetIIFrame(const EthernetIIFrame& other); 00127 virtual ~EthernetIIFrame(); 00128 EthernetIIFrame& operator=(const EthernetIIFrame& other); 00129 virtual EthernetIIFrame *dup() const {return new EthernetIIFrame(*this);} 00130 virtual void parsimPack(cCommBuffer *b); 00131 virtual void parsimUnpack(cCommBuffer *b); 00132 00133 // field getter/setter methods 00134 virtual int getEtherType() const; 00135 virtual void setEtherType(int etherType); 00136 }; 00137 00138 inline void doPacking(cCommBuffer *b, EthernetIIFrame& obj) {obj.parsimPack(b);} 00139 inline void doUnpacking(cCommBuffer *b, EthernetIIFrame& obj) {obj.parsimUnpack(b);} 00140 00152 class EtherFrameWithLLC : public ::EtherFrame 00153 { 00154 protected: 00155 int ssap_var; 00156 int dsap_var; 00157 int control_var; 00158 00159 private: 00160 void copy(const EtherFrameWithLLC& other); 00161 00162 protected: 00163 // protected and unimplemented operator==(), to prevent accidental usage 00164 bool operator==(const EtherFrameWithLLC&); 00165 00166 public: 00167 EtherFrameWithLLC(const char *name=NULL, int kind=0); 00168 EtherFrameWithLLC(const EtherFrameWithLLC& other); 00169 virtual ~EtherFrameWithLLC(); 00170 EtherFrameWithLLC& operator=(const EtherFrameWithLLC& other); 00171 virtual EtherFrameWithLLC *dup() const {return new EtherFrameWithLLC(*this);} 00172 virtual void parsimPack(cCommBuffer *b); 00173 virtual void parsimUnpack(cCommBuffer *b); 00174 00175 // field getter/setter methods 00176 virtual int getSsap() const; 00177 virtual void setSsap(int ssap); 00178 virtual int getDsap() const; 00179 virtual void setDsap(int dsap); 00180 virtual int getControl() const; 00181 virtual void setControl(int control); 00182 }; 00183 00184 inline void doPacking(cCommBuffer *b, EtherFrameWithLLC& obj) {obj.parsimPack(b);} 00185 inline void doUnpacking(cCommBuffer *b, EtherFrameWithLLC& obj) {obj.parsimUnpack(b);} 00186 00197 class EtherFrameWithSNAP : public ::EtherFrame 00198 { 00199 protected: 00200 long orgCode_var; 00201 int localcode_var; 00202 00203 private: 00204 void copy(const EtherFrameWithSNAP& other); 00205 00206 protected: 00207 // protected and unimplemented operator==(), to prevent accidental usage 00208 bool operator==(const EtherFrameWithSNAP&); 00209 00210 public: 00211 EtherFrameWithSNAP(const char *name=NULL, int kind=0); 00212 EtherFrameWithSNAP(const EtherFrameWithSNAP& other); 00213 virtual ~EtherFrameWithSNAP(); 00214 EtherFrameWithSNAP& operator=(const EtherFrameWithSNAP& other); 00215 virtual EtherFrameWithSNAP *dup() const {return new EtherFrameWithSNAP(*this);} 00216 virtual void parsimPack(cCommBuffer *b); 00217 virtual void parsimUnpack(cCommBuffer *b); 00218 00219 // field getter/setter methods 00220 virtual long getOrgCode() const; 00221 virtual void setOrgCode(long orgCode); 00222 virtual int getLocalcode() const; 00223 virtual void setLocalcode(int localcode); 00224 }; 00225 00226 inline void doPacking(cCommBuffer *b, EtherFrameWithSNAP& obj) {obj.parsimPack(b);} 00227 inline void doUnpacking(cCommBuffer *b, EtherFrameWithSNAP& obj) {obj.parsimUnpack(b);} 00228 00238 class EtherPauseFrame : public ::EtherFrame 00239 { 00240 protected: 00241 int pauseTime_var; 00242 00243 private: 00244 void copy(const EtherPauseFrame& other); 00245 00246 protected: 00247 // protected and unimplemented operator==(), to prevent accidental usage 00248 bool operator==(const EtherPauseFrame&); 00249 00250 public: 00251 EtherPauseFrame(const char *name=NULL, int kind=0); 00252 EtherPauseFrame(const EtherPauseFrame& other); 00253 virtual ~EtherPauseFrame(); 00254 EtherPauseFrame& operator=(const EtherPauseFrame& other); 00255 virtual EtherPauseFrame *dup() const {return new EtherPauseFrame(*this);} 00256 virtual void parsimPack(cCommBuffer *b); 00257 virtual void parsimUnpack(cCommBuffer *b); 00258 00259 // field getter/setter methods 00260 virtual int getPauseTime() const; 00261 virtual void setPauseTime(int pauseTime); 00262 }; 00263 00264 inline void doPacking(cCommBuffer *b, EtherPauseFrame& obj) {obj.parsimPack(b);} 00265 inline void doUnpacking(cCommBuffer *b, EtherPauseFrame& obj) {obj.parsimUnpack(b);} 00266 00277 class EtherAutoconfig : public ::cPacket 00278 { 00279 protected: 00280 double txrate_var; 00281 bool halfDuplex_var; 00282 00283 private: 00284 void copy(const EtherAutoconfig& other); 00285 00286 protected: 00287 // protected and unimplemented operator==(), to prevent accidental usage 00288 bool operator==(const EtherAutoconfig&); 00289 00290 public: 00291 EtherAutoconfig(const char *name=NULL, int kind=0); 00292 EtherAutoconfig(const EtherAutoconfig& other); 00293 virtual ~EtherAutoconfig(); 00294 EtherAutoconfig& operator=(const EtherAutoconfig& other); 00295 virtual EtherAutoconfig *dup() const {return new EtherAutoconfig(*this);} 00296 virtual void parsimPack(cCommBuffer *b); 00297 virtual void parsimUnpack(cCommBuffer *b); 00298 00299 // field getter/setter methods 00300 virtual double getTxrate() const; 00301 virtual void setTxrate(double txrate); 00302 virtual bool getHalfDuplex() const; 00303 virtual void setHalfDuplex(bool halfDuplex); 00304 }; 00305 00306 inline void doPacking(cCommBuffer *b, EtherAutoconfig& obj) {obj.parsimPack(b);} 00307 inline void doUnpacking(cCommBuffer *b, EtherAutoconfig& obj) {obj.parsimUnpack(b);} 00308 00309 00310 #endif // _ETHERFRAME_M_H_