#include <node.hpp>
| Public Types | |
| typedef boost::shared_ptr< Node > | NodePtr | 
| Smart pointer that clients should use. | |
| Public Member Functions | |
| virtual | ~Node () | 
| A destructor. | |
| Location | getLocation () const | 
| Get a copy of the location of this node. | |
| NodeId | getNodeId () const | 
| Get a copy of the ID of this node. | |
| SimTime | currentTime () const | 
| Get the current time at the node. | |
| bool | scheduleEvent (EventPtr eventToSchedule, const SimTime &eventDelay) | 
| Add an event to the simulator's event queue. | |
| bool | cancelEvent (EventPtr eventToCancel) | 
| Cancel an event from the event queue. | |
| Static Public Member Functions | |
| static NodePtr | create (const Location &location, const NodeId &nodeId) | 
| A factory method to ensure that all objects are created via newsince we are using smart pointers. | |
| Protected Member Functions | |
| Node (const Location &location, const NodeId &nodeId) | |
| A constructor. | |
Eventually, this could contain things like an energy consumption tracker and sensors as well.
Definition at line 153 of file node.hpp.
| bool Node::cancelEvent | ( | EventPtr | eventToCancel | ) | 
Cancel an event from the event queue.
| eventToCancel | a pointer to the event being cancelled. | 
Definition at line 46 of file node.cpp.
References Simulator::cancelEvent(), and Simulator::instance().
| SimTime Node::currentTime | ( | ) | const | 
Get the current time at the node.
Note that this may incorporate clock drift to be different that the simulator's currentTime().
Definition at line 32 of file node.cpp.
References Simulator::currentTime(), and Simulator::instance().
| Location Node::getLocation | ( | ) | const  [inline] | 
| NodeId Node::getNodeId | ( | ) | const  [inline] | 
| bool Node::scheduleEvent | ( | EventPtr | eventToSchedule, | |
| const SimTime & | eventDelay | |||
| ) | 
Add an event to the simulator's event queue.
| eventToSchedule | a pointer to the event being scheduled. | |
| eventDelay | how far in the future (from the node's local time) the event should be scheduled. | 
Definition at line 39 of file node.cpp.
References Simulator::instance(), and Simulator::scheduleEvent().
 1.4.7
 1.4.7