OverSim
|
representation of a single node in the GlobalNodeList More...
#include <SimpleNodeEntry.h>
Classes | |
struct | Channel |
Public Types | |
typedef std::pair< simtime_t, bool > | SimpleDelay |
type for return value of calcDelay() |
Public Member Functions | |
~SimpleNodeEntry () | |
SimpleNodeEntry (cModule *node, cChannelType *typeRx, cChannelType *typeTx, uint32_t sendQueueLength, uint32_t fieldSize) | |
Constructor for node entries with 2D random coordinates. | |
SimpleNodeEntry (cModule *node, cChannelType *typeRx, cChannelType *typeTx, uint32_t sendQueueLength, NodeRecord *nodeRecord, int index) | |
Constructor for node entries with given n-dim coordinates. | |
cGate * | getUdpIPv4Gate () const |
Getter for SimpleUDP ingate. | |
cGate * | getUdpIPv6Gate () const |
Getter for SimpleUDP IPv6 ingate. | |
cGate * | getTcpIPv4Gate () const |
Getter for SimpleUDP ingate. | |
cGate * | getTcpIPv6Gate () const |
Getter for SimpleUDP IPv6 ingate. | |
SimpleDelay | calcDelay (cPacket *msg, const SimpleNodeEntry &dest, bool faultyDelay=false) |
Calculates delay between two nodes. | |
SimpleDelay | calcAccessRouterDelay (cPacket *msg) |
Calculates delay introduced by send queue at the access router of the destination node. | |
std::string | info () const |
OMNeT++ info method. | |
simtime_t | getAccessDelay () const |
simtime_t | getTxAccessDelay () const |
simtime_t | getRxAccessDelay () const |
float | getBandwidth () const |
float | getTxBandwidth () const |
float | getRxBandwidth () const |
float | getErrorRate () const |
void | setX (float x) |
void | setY (float y) |
float | getX () const |
float | getY () const |
float | getCoords (int dim) const |
uint8_t | getDim () const |
int | getRecordIndex () const |
NodeRecord * | getNodeRecord () const |
Static Public Member Functions | |
static simtime_t | getFaultyDelay (simtime_t oldDelay) |
Calculates SHA1 hash over errorfree delay (always the same uniform distributed value), uses this to generate a realistic error distribution and returns the real RTT augmented with this error. |
Protected Member Functions | |
float | operator- (const SimpleNodeEntry &entry) const |
Calculates euclidean distance between two terminals. |
Protected Attributes | |
cGate * | UdpIPv4ingate |
IPv4 ingate of the SimpleUDP module of this terminal. | |
cGate * | UdpIPv6ingate |
IPv6 ingate of the SimpleUDP module of this terminal. | |
cGate * | TcpIPv4ingate |
IPv4 ingate of the SimpleTCP module of this terminal. | |
cGate * | TcpIPv6ingate |
IPv6 ingate of the SimpleTCP module of this terminal. | |
struct SimpleNodeEntry::Channel | rx |
struct SimpleNodeEntry::Channel | tx |
NodeRecord * | nodeRecord |
int | index |
Friends | |
std::ostream & | operator<< (std::ostream &out, const SimpleNodeEntry &entry) |
Stream output. |
representation of a single node in the GlobalNodeList
Definition at line 62 of file SimpleNodeEntry.h.
typedef std::pair<simtime_t, bool> SimpleNodeEntry::SimpleDelay |
type for return value of calcDelay()
Definition at line 135 of file SimpleNodeEntry.h.
|
inline |
Definition at line 66 of file SimpleNodeEntry.h.
SimpleNodeEntry::SimpleNodeEntry | ( | cModule * | node, |
cChannelType * | typeRx, | ||
cChannelType * | typeTx, | ||
uint32_t | sendQueueLength, | ||
uint32_t | fieldSize | ||
) |
Constructor for node entries with 2D random coordinates.
node | pointer to new terminal |
typeRx | receive access channel of new terminal |
typeTx | transmit access channel of new terminal |
sendQueueLength | initial send queue size |
fieldSize | length of one side of the coordinate space |
Definition at line 87 of file SimpleNodeEntry.cc.
SimpleNodeEntry::SimpleNodeEntry | ( | cModule * | node, |
cChannelType * | typeRx, | ||
cChannelType * | typeTx, | ||
uint32_t | sendQueueLength, | ||
NodeRecord * | nodeRecord, | ||
int | index | ||
) |
Constructor for node entries with given n-dim coordinates.
node | pointer to new terminal |
typeRx | receive access channel of new terminal |
typeTx | transmit access channel of new terminal |
sendQueueLength | length of the send queue in bytes |
nodeRecord | the node's coordinates |
index | the position in unusedNodeRecords |
Definition at line 105 of file SimpleNodeEntry.cc.
SimpleNodeEntry::SimpleDelay SimpleNodeEntry::calcAccessRouterDelay | ( | cPacket * | msg | ) |
Calculates delay introduced by send queue at the access router of the destination node.
msg | pointer to message to get its length for delay calculation and set bit error flag |
Definition at line 194 of file SimpleNodeEntry.cc.
Referenced by SimpleUDP::handleMessage().
SimpleNodeEntry::SimpleDelay SimpleNodeEntry::calcDelay | ( | cPacket * | msg, |
const SimpleNodeEntry & | dest, | ||
bool | faultyDelay = false |
||
) |
Calculates delay between two nodes.
msg | pointer to message to get its length for delay calculation and set bit error flag |
dest | destination terminal |
faultyDelay | violate triangle inequality? |
Definition at line 152 of file SimpleNodeEntry.cc.
Referenced by SimpleUDP::processMsgFromApp(), and SimpleTCPConnection::sendToIP().
|
inline |
Definition at line 175 of file SimpleNodeEntry.h.
|
inline |
Definition at line 181 of file SimpleNodeEntry.h.
|
inline |
Definition at line 192 of file SimpleNodeEntry.h.
Referenced by Nps::coordsReqRpcResponse(), SimpleUnderlayNCS::createNcsInfo(), SimpleUnderlayNCS::init(), SimpleNcs::init(), and Landmark::initializeApp().
|
inline |
Definition at line 193 of file SimpleNodeEntry.h.
Referenced by Nps::coordsReqRpcResponse(), SimpleUnderlayNCS::createNcsInfo(), SimpleUnderlayNCS::init(), SimpleNcs::init(), and Landmark::initializeApp().
|
inline |
Definition at line 186 of file SimpleNodeEntry.h.
|
static |
Calculates SHA1 hash over errorfree delay (always the same uniform distributed value), uses this to generate a realistic error distribution and returns the real RTT augmented with this error.
Definition at line 224 of file SimpleNodeEntry.cc.
Referenced by calcDelay().
|
inline |
Definition at line 196 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::getLocation(), and SimpleUnderlayConfigurator::migrateNode().
|
inline |
Definition at line 195 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::handleTimerEvent(), and SimpleUnderlayConfigurator::migrateNode().
|
inline |
|
inline |
Definition at line 184 of file SimpleNodeEntry.h.
Referenced by SimpleNcs::init().
|
inline |
Getter for SimpleUDP ingate.
Definition at line 122 of file SimpleNodeEntry.h.
Referenced by SimpleTCPConnection::sendToIP().
|
inline |
Getter for SimpleUDP IPv6 ingate.
Definition at line 132 of file SimpleNodeEntry.h.
Referenced by SimpleTCPConnection::sendToIP().
|
inline |
|
inline |
Definition at line 183 of file SimpleNodeEntry.h.
Referenced by SimpleNcs::init().
|
inline |
Getter for SimpleUDP ingate.
Definition at line 102 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::handleTimerEvent(), SimpleUnderlayConfigurator::migrateNode(), SimpleUnderlayConfigurator::preKillNode(), and SimpleUDP::processMsgFromApp().
|
inline |
Getter for SimpleUDP IPv6 ingate.
Definition at line 112 of file SimpleNodeEntry.h.
Referenced by SimpleUDP::processMsgFromApp().
|
inline |
Definition at line 190 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::createNode().
|
inline |
Definition at line 191 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::createNode().
std::string SimpleNodeEntry::info | ( | ) | const |
OMNeT++ info method.
Definition at line 285 of file SimpleNodeEntry.cc.
|
protected |
Calculates euclidean distance between two terminals.
entry | destination entry |
Definition at line 142 of file SimpleNodeEntry.cc.
|
inline |
Definition at line 188 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::migrateNode().
|
inline |
Definition at line 189 of file SimpleNodeEntry.h.
Referenced by SimpleUnderlayConfigurator::migrateNode().
|
friend |
Stream output.
out | output stream |
entry | the terminal |
Definition at line 292 of file SimpleNodeEntry.cc.
|
protected |
Definition at line 230 of file SimpleNodeEntry.h.
Referenced by getRecordIndex(), SimpleNodeEntry(), and ~SimpleNodeEntry().
|
protected |
Definition at line 229 of file SimpleNodeEntry.h.
Referenced by getCoords(), getDim(), getNodeRecord(), getX(), getY(), operator-(), operator<<(), setX(), setY(), SimpleNodeEntry(), and ~SimpleNodeEntry().
|
protected |
Referenced by calcAccessRouterDelay(), calcDelay(), getRxAccessDelay(), getRxBandwidth(), operator<<(), and SimpleNodeEntry().
|
protected |
IPv4 ingate of the SimpleTCP module of this terminal.
Definition at line 218 of file SimpleNodeEntry.h.
Referenced by getTcpIPv4Gate(), and SimpleNodeEntry().
|
protected |
IPv6 ingate of the SimpleTCP module of this terminal.
Definition at line 219 of file SimpleNodeEntry.h.
Referenced by getTcpIPv6Gate(), and SimpleNodeEntry().
|
protected |
Referenced by calcDelay(), getAccessDelay(), getBandwidth(), getErrorRate(), getTxAccessDelay(), getTxBandwidth(), operator<<(), and SimpleNodeEntry().
|
protected |
IPv4 ingate of the SimpleUDP module of this terminal.
Definition at line 216 of file SimpleNodeEntry.h.
Referenced by getUdpIPv4Gate(), and SimpleNodeEntry().
|
protected |
IPv6 ingate of the SimpleUDP module of this terminal.
Definition at line 217 of file SimpleNodeEntry.h.
Referenced by getUdpIPv6Gate(), and SimpleNodeEntry().