|
INET Framework for OMNeT++/OMNEST
|
00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.2 from ansa/switch/stp/STPBPDU.msg. 00003 // 00004 00005 #ifndef _STPBPDU_M_H_ 00006 #define _STPBPDU_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 "MACAddress.h" 00018 // }} 00019 00020 00021 00055 class STPBPDU : public ::cPacket 00056 { 00057 protected: 00058 unsigned int portRole_var; 00059 bool tc_var; 00060 bool tca_var; 00061 unsigned int vlan_var; 00062 MACAddress bridgeID_var; 00063 unsigned int bridgePriority_var; 00064 unsigned long rootPathCost_var; 00065 MACAddress rootID_var; 00066 unsigned int rootPriority_var; 00067 unsigned int portID_var; 00068 unsigned int portPriority_var; 00069 unsigned int msgAge_var; 00070 unsigned int maxAge_var; 00071 unsigned int helloTime_var; 00072 unsigned int fwdDelay_var; 00073 00074 private: 00075 void copy(const STPBPDU& other); 00076 00077 protected: 00078 // protected and unimplemented operator==(), to prevent accidental usage 00079 bool operator==(const STPBPDU&); 00080 00081 public: 00082 STPBPDU(const char *name=NULL, int kind=0); 00083 STPBPDU(const STPBPDU& other); 00084 virtual ~STPBPDU(); 00085 STPBPDU& operator=(const STPBPDU& other); 00086 virtual STPBPDU *dup() const {return new STPBPDU(*this);} 00087 virtual void parsimPack(cCommBuffer *b); 00088 virtual void parsimUnpack(cCommBuffer *b); 00089 00090 // field getter/setter methods 00091 virtual unsigned int getPortRole() const; 00092 virtual void setPortRole(unsigned int portRole); 00093 virtual bool getTc() const; 00094 virtual void setTc(bool tc); 00095 virtual bool getTca() const; 00096 virtual void setTca(bool tca); 00097 virtual unsigned int getVlan() const; 00098 virtual void setVlan(unsigned int vlan); 00099 virtual MACAddress& getBridgeID(); 00100 virtual const MACAddress& getBridgeID() const {return const_cast<STPBPDU*>(this)->getBridgeID();} 00101 virtual void setBridgeID(const MACAddress& bridgeID); 00102 virtual unsigned int getBridgePriority() const; 00103 virtual void setBridgePriority(unsigned int bridgePriority); 00104 virtual unsigned long getRootPathCost() const; 00105 virtual void setRootPathCost(unsigned long rootPathCost); 00106 virtual MACAddress& getRootID(); 00107 virtual const MACAddress& getRootID() const {return const_cast<STPBPDU*>(this)->getRootID();} 00108 virtual void setRootID(const MACAddress& rootID); 00109 virtual unsigned int getRootPriority() const; 00110 virtual void setRootPriority(unsigned int rootPriority); 00111 virtual unsigned int getPortID() const; 00112 virtual void setPortID(unsigned int portID); 00113 virtual unsigned int getPortPriority() const; 00114 virtual void setPortPriority(unsigned int portPriority); 00115 virtual unsigned int getMsgAge() const; 00116 virtual void setMsgAge(unsigned int msgAge); 00117 virtual unsigned int getMaxAge() const; 00118 virtual void setMaxAge(unsigned int maxAge); 00119 virtual unsigned int getHelloTime() const; 00120 virtual void setHelloTime(unsigned int helloTime); 00121 virtual unsigned int getFwdDelay() const; 00122 virtual void setFwdDelay(unsigned int fwdDelay); 00123 }; 00124 00125 inline void doPacking(cCommBuffer *b, STPBPDU& obj) {obj.parsimPack(b);} 00126 inline void doUnpacking(cCommBuffer *b, STPBPDU& obj) {obj.parsimUnpack(b);} 00127 00128 00129 #endif // _STPBPDU_M_H_