#include <rfid_tag_phy.hpp>
Inheritance diagram for RfidTagPhy:
Public Types | |
typedef boost::shared_ptr< RfidTagPhy > | RfidTagPhyPtr |
Smart pointer that clients should use. | |
Public Member Functions | |
virtual | ~RfidTagPhy () |
A destructor A virtual destructor is recommended since the class has virtual functions. | |
RfidTagPhyPtr | thisRfidTagPhy () |
Gives this pointer as a RfidTagPhy object. | |
virtual PhysicalLayerPtr | thisPhysicalLayer () |
Gives this pointer as a PhysicalLayer object. | |
virtual SimulationEndListenerPtr | thisSimulationEndListener () |
Gives this pointer as a SimulationEndListener object. | |
virtual void | simulationEndHandler () |
The function called when the simulation ends. | |
bool | setSendingChannel (t_uint channelId) |
Set the sending for the RFID tag. | |
void | resetSendingChannel () |
Invalidate the current sending channel. | |
bool | setAllListenersChannel (t_uint channelId) |
Set the channel on which this (and, presumably, all) tags are listening on. | |
void | resetAllListenersChannel () |
Invalidate the current all listeners channel. | |
virtual void | recvdErrorFreeSignal (WirelessCommSignalPtr signal, double recvdSignalStrength) |
This function is called when an error free signal is received, just before its packet is passed to the upper layer. | |
Static Public Member Functions | |
static RfidTagPhyPtr | create (NodePtr node, WirelessChannelManagerPtr wirelessChannelManager) |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
Protected Member Functions | |
RfidTagPhy (NodePtr node, WirelessChannelManagerPtr wirelessChannelManager) | |
A constructor. |
Definition at line 13 of file rfid_tag_phy.hpp.
void RfidTagPhy::recvdErrorFreeSignal | ( | WirelessCommSignalPtr | signal, | |
double | recvdSignalStrength | |||
) | [virtual] |
This function is called when an error free signal is received, just before its packet is passed to the upper layer.
The transmit power is set to the received power of the signal since the tag reflects the power back to the reader.
signal | the signal that was successfully received. | |
recvdSignalStrength | the strength of the signal at the receiver. |
Reimplemented from PhysicalLayer.
Definition at line 90 of file rfid_tag_phy.cpp.
References PhysicalLayer::setCurrentTxPower(), and setSendingChannel().
void RfidTagPhy::resetAllListenersChannel | ( | ) |
Invalidate the current all listeners channel.
After calling this function, the tag is no longer listening to any channels.
Definition at line 78 of file rfid_tag_phy.cpp.
References PhysicalLayer::m_wirelessChannelManagerPtr, and thisPhysicalLayer().
Referenced by setAllListenersChannel().
void RfidTagPhy::resetSendingChannel | ( | ) |
Invalidate the current sending channel.
After calling this function, the tag is no longer sending to any channels.
Definition at line 32 of file rfid_tag_phy.cpp.
References PhysicalLayer::m_wirelessChannelManagerPtr, and thisPhysicalLayer().
Referenced by setSendingChannel().
bool RfidTagPhy::setAllListenersChannel | ( | t_uint | channelId | ) |
Set the channel on which this (and, presumably, all) tags are listening on.
All tags should be set to listen on this channel, though they will send on a different channel where not necessarily all tags are sending.
channelId | the ID of the channel on which the tags will listen. |
Definition at line 61 of file rfid_tag_phy.cpp.
References PhysicalLayer::m_wirelessChannelManagerPtr, resetAllListenersChannel(), and thisPhysicalLayer().
bool RfidTagPhy::setSendingChannel | ( | t_uint | channelId | ) |
Set the sending for the RFID tag.
This corresponds to setting the channel on which the tag is sending since we model the tags's listening channel as being on which all tags listeng and all readers transmit on.
channelId | the ID of the channel on which the RFID tag will transmit. |
Definition at line 43 of file rfid_tag_phy.cpp.
References PhysicalLayer::m_wirelessChannelManagerPtr, resetSendingChannel(), and thisPhysicalLayer().
Referenced by recvdErrorFreeSignal().
PhysicalLayerPtr RfidTagPhy::thisPhysicalLayer | ( | ) | [inline, virtual] |
Gives this
pointer as a PhysicalLayer
object.
This is used to deal with shared_ptr's
, this
, and inheritance.
this
object. Implements PhysicalLayer.
Definition at line 176 of file rfid_tag_phy.hpp.
Referenced by resetAllListenersChannel(), resetSendingChannel(), setAllListenersChannel(), setSendingChannel(), and ~RfidTagPhy().
RfidTagPhyPtr RfidTagPhy::thisRfidTagPhy | ( | ) | [inline] |
Gives this
pointer as a RfidTagPhy
object.
This is used to deal with shared_ptr's
, this
, and inheritance.
this
object. Definition at line 170 of file rfid_tag_phy.hpp.
SimulationEndListenerPtr RfidTagPhy::thisSimulationEndListener | ( | ) | [inline, virtual] |
Gives this
pointer as a SimulationEndListener
object.
This is used to deal with shared_ptr's
, this
, and inheritance.
this
object. Implements CommunicationLayer.
Definition at line 182 of file rfid_tag_phy.hpp.