#include <TopoPacket.h>
Public Member Functions | |
TopoPacket (BasePacket &p) | |
void | setNeigh (AwdsRouting *awdsRouting) |
set the list of neighbors in a packet. | |
int | getNumLinks () const |
get the number of links in a TopoPacket. | |
gea::Duration | getValidity () const |
return validity as Duration. | |
void | setValidity (long d) |
set validity in milliseconds. | |
void | print () |
dump the topo packet. | |
Static Public Attributes | |
static const size_t | OffsetValidity = FloodHeaderEnd |
static const size_t | OffsetNumLinks = OffsetValidity + sizeof(u_int32_t) |
static const size_t | OffsetLinks = OffsetNumLinks + 1 |
awds::BasePacket *p = getPacketFromSomewhere(); awds::TopoPacket topoP(*p); int n = topoP.getNumLinks();
int awds::TopoPacket::getNumLinks | ( | ) | const [inline] |
get the number of links in a TopoPacket.
References awds::BasePacket::buffer.
Referenced by awds::RTopology::feed(), and print().
void TopoPacket::setNeigh | ( | AwdsRouting * | awdsRouting | ) |
set the list of neighbors in a packet.
awdsRouting | pointer to the interf object that contains the neihbors. | |
t | the current time, used for calculating timeouts. |
References awds::BasePacket::buffer, awds::Metric::get_quality(), awds::RTopology::metric, awds::Routing::myNodeId, awds::AwdsRouting::neighbors, awds::RTopology::nodeName, awds::AwdsRouting::numNeigh, awds::BasePacket::size, AbstractID< 6 >::toArray(), awds::AwdsRouting::topology, and awds::Metric::update().
Referenced by awds::AwdsRouting::send_topo().