|
RINASim
October 2016
Documentation of framework for OMNeT++
|
Go to the source code of this file.
Classes | |
| class | PDU_Base |
Macros | |
| #define | MSGC_VERSION 0x0500 |
| #define | PDU_HEADER_LEN 10 |
Enumerations | |
| enum | PDUType { MANAGEMENT_PDU = 0x40, DATA_TRANSFER_PDU = 0x80, CONTROL_ACK_PDU = 0xC0, ACK_ONLY_PDU = 0xC1, NACK_ONLY_PDU = 0xC2, FLOW_ONLY_PDU = 0xC4, ACK_FLOW_PDU = 0xC5, NACK_FLOW_PDU = 0xC6, SELECT_ACK_PDU = 0xC9, SELECT_NACK_PDU = 0xCA, SELECT_ACK_FLOW_PDU = 0xCD, SELECT_NACK_FLOW_PDU = 0xCE, RENDEZVOUS_PDU = 0xE0 } |
| enum | PDUTypeBits { PDU_ACK_BIT = 0x01, PDU_NACK_BIT = 0x02, PDU_FC_BIT = 0x04, PDU_SEL_BIT = 0x08 } |
| enum | FLAGS |
| #define PDU_HEADER_LEN 10 |
Definition at line 19 of file PDU_m.h.
Referenced by PDU::getHeaderSize(), DataTransferPDU::getSize(), PDU_Base::PDU_Base(), and DataTransferPDU::updatePacketSize().
| enum FLAGS |
| enum PDUType |
Enum generated from Common/PDU.msg:45 by nedtool.
enum PDUType
{
// EFCP_PDU = 0x80;
MANAGEMENT_PDU = 0x40;
DATA_TRANSFER_PDU = 0x80;
CONTROL_ACK_PDU = 0xC0;
ACK_ONLY_PDU = 0xC1;
NACK_ONLY_PDU = 0xC2;
FLOW_ONLY_PDU = 0xC4;
ACK_FLOW_PDU = 0xC5;
NACK_FLOW_PDU = 0xC6;
SELECT_ACK_PDU = 0xC9;
SELECT_NACK_PDU = 0xCA;
SELECT_ACK_FLOW_PDU = 0xCD;
SELECT_NACK_FLOW_PDU = 0xCE;
RENDEZVOUS_PDU = 0xE0;
}
Class generated from Common/PDU.msg:81 by nedtool.
packet PDU { (true); string displayString; unsigned int version = 1; Address srcAddr; Address dstAddr; APN srcApn; APN dstApn; ConnectionId connId; int type); int flags = 0; //8bits unsigned int pduLen = PDU_HEADER_LEN; unsigned int seqNum; unsigned int hopCount = 255; byteLength = 10; schedulingPriority = -1; // cObject userData; //unsigned char []? string? // unsigned char userData[]; // cMessagePtr mUserData;
}
//packet ManagemtPDU extends PDU { // // type = MANAGEMENT_PDU; // //}
//packet DataTransferPDU extends PDU{ // type = DATA_TRANSFER_PDU; // //}
PDU_Base is only useful if it gets subclassed, and PDU is derived from it. The minimum code to be written for PDU is the following:
class PDU : public PDU_Base { private: void copy(const PDU& other) { ... }
public:
PDU(const char *name=nullptr, int kind=0) : PDU_Base(name,kind) {}
PDU(const PDU& other) : PDU_Base(other) {copy(other);}
PDU& operator=(const PDU& other) {if (this==&other) return *this; PDU_Base::operator=(other); copy(other); return *this;}
virtual PDU *dup() const {return new PDU(*this);}
// ADD CODE HERE to redefine and implement pure virtual functions from PDU_Base
};
The following should go into a .cc (.cpp) file:
Register_Class(PDU);
| enum PDUTypeBits |