#include <rfid_tag_mac.hpp>
Inheritance diagram for RfidTagMacData:
Public Types | |
typedef boost::shared_ptr< RfidTagMacData > | RfidTagMacDataPtr |
Smart pointer that clients should use. | |
Types_Generic | |
enum value Types_Generic. | |
Types_Reply | |
enum value Types_Reply. | |
enum | Types { Types_Generic, Types_Reply } |
Types enum. More... | |
Public Member Functions | |
virtual t_uint | getSizeInBytes () const |
Get the size of this data. | |
void | setSenderId (const NodeId &nodeId) |
Write the sender ID to the packet data. | |
NodeId | getSenderId () const |
Read the sender ID from the packet data. | |
void | setReceiverId (const NodeId &nodeId) |
Write the receiver ID to the packet data. | |
NodeId | getReceiverId () const |
Read the receiver ID from the packet data. | |
void | setType (Types type) |
Write the type field to this packet data. | |
Types | getType () const |
Read the type field from this packet data. | |
ostream & | print (ostream &s) const |
Return the stream representation of the object. | |
Static Public Member Functions | |
static RfidTagMacDataPtr | create () |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
static RfidTagMacDataPtr | create (const RfidTagMacData &rhs) |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
Protected Member Functions | |
RfidTagMacData () | |
A constructor. | |
RfidTagMacData (const RfidTagMacData &rhs) | |
A copy constructor. | |
virtual PacketDataPtr | clone () const |
Returns a pointer to a deep copy of this object. |
Definition at line 24 of file rfid_tag_mac.hpp.
Types enum.
Specifies the types of packets that are sent.
Definition at line 33 of file rfid_tag_mac.hpp.
PacketDataPtr RfidTagMacData::clone | ( | ) | const [protected, virtual] |
Returns a pointer to a deep copy of this object.
This is addresses the slicing problem with copy construction.
Reimplemented from PacketData.
Definition at line 269 of file rfid_tag_mac.cpp.
References RfidTagMacData().
Referenced by create().
NodeId RfidTagMacData::getReceiverId | ( | ) | const |
Read the receiver ID from the packet data.
Definition at line 291 of file rfid_tag_mac.cpp.
NodeId RfidTagMacData::getSenderId | ( | ) | const |
Read the sender ID from the packet data.
Definition at line 280 of file rfid_tag_mac.cpp.
t_uint RfidTagMacData::getSizeInBytes | ( | ) | const [inline, virtual] |
Get the size of this data.
Reimplemented from PacketData.
Definition at line 393 of file rfid_tag_mac.hpp.
RfidTagMacData::Types RfidTagMacData::getType | ( | ) | const [inline] |
Read the type field from this packet data.
Definition at line 387 of file rfid_tag_mac.hpp.
void RfidTagMacData::setReceiverId | ( | const NodeId & | nodeId | ) |
Write the receiver ID to the packet data.
nodeId | the ID to be written. |
Definition at line 286 of file rfid_tag_mac.cpp.
References NodeId::writeToByteArray().
void RfidTagMacData::setSenderId | ( | const NodeId & | nodeId | ) |
Write the sender ID to the packet data.
nodeId | the ID to be written. |
Definition at line 275 of file rfid_tag_mac.cpp.
References NodeId::writeToByteArray().
void RfidTagMacData::setType | ( | Types | type | ) | [inline] |
Write the type field to this packet data.
type | the value for the type field. |
Definition at line 382 of file rfid_tag_mac.hpp.