#include <RAWEtherFrame_m.h>
Public Member Functions | |
virtual | ~RAWEtherFrame_Base () |
virtual RAWEtherFrame_Base * | dup () const |
virtual void | parsimPack (cCommBuffer *b) |
virtual void | parsimUnpack (cCommBuffer *b) |
virtual void | setRawBytesArraySize (unsigned int size) |
virtual unsigned int | getRawBytesArraySize () const |
virtual char | getRawBytes (unsigned int k) const |
virtual void | setRawBytes (unsigned int k, char rawBytes_var) |
Protected Member Functions | |
bool | operator== (const RAWEtherFrame_Base &) |
RAWEtherFrame_Base (const char *name=NULL, int kind=0) | |
RAWEtherFrame_Base (const RAWEtherFrame_Base &other) | |
RAWEtherFrame_Base & | operator= (const RAWEtherFrame_Base &other) |
Protected Attributes | |
char * | rawBytes_var |
unsigned int | rawBytes_arraysize |
RAWEtherFrame.msg
by opp_msgc. packet RAWEtherFrame { (true); char rawBytes[]; }
RAWEtherFrame_Base is only useful if it gets subclassed, and RAWEtherFrame is derived from it. The minimum code to be written for RAWEtherFrame is the following:
class RAWEtherFrame : public RAWEtherFrame_Base { public: RAWEtherFrame(const char *name=NULL, int kind=0) : RAWEtherFrame_Base(name,kind) {} RAWEtherFrame(const RAWEtherFrame& other) : RAWEtherFrame_Base(other.getName()) {operator=(other);} RAWEtherFrame& operator=(const RAWEtherFrame& other) {RAWEtherFrame_Base::operator=(other); return *this;} virtual RAWEtherFrame *dup() const {return new RAWEtherFrame(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from RAWEtherFrame_Base };
The following should go into a .cc (.cpp) file:
Register_Class(RAWEtherFrame);
Definition at line 49 of file RAWEtherFrame_m.h.
RAWEtherFrame_Base::RAWEtherFrame_Base | ( | const char * | name = NULL , |
|
int | kind = 0 | |||
) | [protected] |
Definition at line 33 of file RAWEtherFrame_m.cc.
RAWEtherFrame_Base::RAWEtherFrame_Base | ( | const RAWEtherFrame_Base & | other | ) | [protected] |
Definition at line 39 of file RAWEtherFrame_m.cc.
RAWEtherFrame_Base::~RAWEtherFrame_Base | ( | ) | [virtual] |
Definition at line 47 of file RAWEtherFrame_m.cc.
virtual RAWEtherFrame_Base* RAWEtherFrame_Base::dup | ( | ) | const [inline, virtual] |
char RAWEtherFrame_Base::getRawBytes | ( | unsigned int | k | ) | const [virtual] |
Definition at line 102 of file RAWEtherFrame_m.cc.
unsigned int RAWEtherFrame_Base::getRawBytesArraySize | ( | ) | const [virtual] |
Definition at line 97 of file RAWEtherFrame_m.cc.
RAWEtherFrame_Base & RAWEtherFrame_Base::operator= | ( | const RAWEtherFrame_Base & | other | ) | [protected] |
Definition at line 52 of file RAWEtherFrame_m.cc.
bool RAWEtherFrame_Base::operator== | ( | const RAWEtherFrame_Base & | ) | [protected] |
void RAWEtherFrame_Base::parsimPack | ( | cCommBuffer * | b | ) | [virtual] |
Definition at line 64 of file RAWEtherFrame_m.cc.
void RAWEtherFrame_Base::parsimUnpack | ( | cCommBuffer * | b | ) | [virtual] |
Definition at line 71 of file RAWEtherFrame_m.cc.
void RAWEtherFrame_Base::setRawBytes | ( | unsigned int | k, | |
char | rawBytes_var | |||
) | [virtual] |
Definition at line 108 of file RAWEtherFrame_m.cc.
void RAWEtherFrame_Base::setRawBytesArraySize | ( | unsigned int | size | ) | [virtual] |
Definition at line 84 of file RAWEtherFrame_m.cc.
unsigned int RAWEtherFrame_Base::rawBytes_arraysize [protected] |
Definition at line 53 of file RAWEtherFrame_m.h.
char* RAWEtherFrame_Base::rawBytes_var [protected] |
Definition at line 52 of file RAWEtherFrame_m.h.