00001 00002 #include "node.hpp" 00003 #include "simulator.hpp" 00004 00005 Node::Node(const Location& location, const NodeId& nodeId) 00006 : m_location(location), m_nodeId(nodeId) 00007 { 00008 00009 } 00010 00011 /* 00012 Node::Node(const Node& rhs) 00013 : m_location(rhs.m_location), m_nodeId(rhs.m_nodeId) 00014 { 00015 00016 } 00017 */ 00018 00019 Node::~Node() 00020 { 00021 00022 } 00023 00024 /* 00025 NodePtr Node::clone() const 00026 { 00027 NodePtr p(new Node(*this)); 00028 return p; 00029 } 00030 */ 00031 00032 SimTime Node::currentTime() const 00033 { 00034 // If local clock drift is desired, it could be added 00035 // here. 00036 return Simulator::instance()->currentTime(); 00037 } 00038 00039 bool Node::scheduleEvent(EventPtr eventToSchedule, 00040 const SimTime& eventDelay) 00041 { 00042 return Simulator::instance()->scheduleEvent( 00043 eventToSchedule, eventDelay); 00044 } 00045 00046 bool Node::cancelEvent(EventPtr eventToCancel) 00047 { 00048 return Simulator::instance()->cancelEvent(eventToCancel); 00049 } 00050 00051