EPONImplementationforOMNet++
0.8Beta
|
A simple class containing a vector of ONUTableEntry objects. More...
#include <ONUTable.h>
Public Member Functions | |
virtual void | addONU (ONUTableEntry &entry) |
virtual void | removeONU (MACAddress id) |
virtual void | removeONU (uint32_t idx) |
virtual ONUTableEntry * | getEntry (uint32_t idx) |
virtual ONUTableEntry * | getEntry (MACAddress id) |
virtual ONUTableEntry * | getEntry (std::string id) |
virtual int | getTableSize () |
virtual MACAddress | getMACFromString (std::string id) |
Note: The entry may be null which leads to SEGFAULT This happens usually if the ONU we expect is not registered... | |
Protected Member Functions | |
virtual void | initialize () |
virtual void | handleMessage (cMessage *msg) |
Protected Attributes | |
vector< ONUTableEntry > | tbl |
A simple class containing a vector of ONUTableEntry objects.
ONUTable also provides some basic functions for adding, removing and finding specific entries based on MAC address or index. NOTE: DO NOT FORGET: It is NOT a vector so you must not call size() BUT instead call getTableSize().
void ONUTable::addONU | ( | ONUTableEntry & | entry | ) | [virtual] |
ONUTableEntry * ONUTable::getEntry | ( | uint32_t | idx | ) | [virtual] |
ONUTableEntry * ONUTable::getEntry | ( | MACAddress | id | ) | [virtual] |
ONUTableEntry * ONUTable::getEntry | ( | std::string | id | ) | [virtual] |
MACAddress ONUTable::getMACFromString | ( | std::string | id | ) | [virtual] |
int ONUTable::getTableSize | ( | ) | [virtual] |
{return tbl.size();}
void ONUTable::handleMessage | ( | cMessage * | msg | ) | [protected, virtual] |
{ // TODO - Generated method body delete msg; }
void ONUTable::initialize | ( | ) | [protected, virtual] |
{ WATCH_VECTOR(tbl); }
void ONUTable::removeONU | ( | MACAddress | id | ) | [virtual] |
void ONUTable::removeONU | ( | uint32_t | idx | ) | [virtual] |
vector<ONUTableEntry> ONUTable::tbl [protected] |