RfidTagPhy Class Reference

The physical layer class for a RFID tag. More...

#include <rfid_tag_phy.hpp>

Inheritance diagram for RfidTagPhy:

PhysicalLayer CommunicationLayer SimulationEndListener List of all members.

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.

Detailed Description

The physical layer class for a RFID tag.

Definition at line 13 of file rfid_tag_phy.hpp.


Member Function Documentation

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.

Parameters:
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.

See also:
setAllListenersChannel()

setSendingChannel()

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.

See also:
setSendingChannel()

setAllListenersChannel()

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.

Parameters:
channelId the ID of the channel on which the tags will listen.
Returns:
true if the object is attached to the channel successfully.
See also:
setSendingChannel()

resetAllListenersChannel()

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.

Parameters:
channelId the ID of the channel on which the RFID tag will transmit.
Returns:
true if the object is attached to the channel successfully.
See also:
setAllListenersChannel()

resetSendingChannel()

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.

Returns:
a pointer to 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.

Returns:
a pointer to 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.

Returns:
a pointer to this object.

Implements CommunicationLayer.

Definition at line 182 of file rfid_tag_phy.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Dec 12 17:04:41 2006 for rfidsim by  doxygen 1.4.7