RfidTagAppData Class Reference

The representation of the application data in an RfidTagApp's data packet. More...

#include <rfid_tag_app.hpp>

Inheritance diagram for RfidTagAppData:

PacketData List of all members.

Public Types

typedef boost::shared_ptr<
RfidTagAppData
RfidTagAppDataPtr
 Smart pointer that clients should use.
 Types_NoType
 enum value Types_NoType.
 Types_Reply
 enum value Types_Reply.
enum  Types { Types_NoType, Types_Reply }
 Types enum. More...

Public Member Functions

virtual t_uint getSizeInBytes () const
 Get the size of this data.
void setTagId (const NodeId &nodeId)
 Write the node ID to the packet data.
NodeId getTagId () const
 Read the node 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 RfidTagAppDataPtr create ()
 A factory method to ensure that all objects are created via new since we are using smart pointers.
static RfidTagAppDataPtr create (const RfidTagAppData &rhs)
 A factory method to ensure that all objects are created via new since we are using smart pointers.

Protected Member Functions

 RfidTagAppData ()
 A constructor.
 RfidTagAppData (const RfidTagAppData &rhs)
 A copy constructor.
virtual PacketDataPtr clone () const
 Returns a pointer to a deep copy of this object.

Detailed Description

The representation of the application data in an RfidTagApp's data packet.

Definition at line 163 of file rfid_tag_app.hpp.


Member Enumeration Documentation

enum RfidTagAppData::Types

Types enum.

Specifies the types of packets that are sent.

Enumerator:
Types_NoType  enum value Types_NoType.
Types_Reply  enum value Types_Reply.

Definition at line 172 of file rfid_tag_app.hpp.


Member Function Documentation

PacketDataPtr RfidTagAppData::clone (  )  const [protected, virtual]

Returns a pointer to a deep copy of this object.

This is addresses the slicing problem with copy construction.

Returns:
a pointer to a deep copy of this object.

Reimplemented from PacketData.

Definition at line 103 of file rfid_tag_app.cpp.

References RfidTagAppData().

Referenced by create().

t_uint RfidTagAppData::getSizeInBytes (  )  const [inline, virtual]

Get the size of this data.

Returns:
the size of the data in bytes.

Reimplemented from PacketData.

Definition at line 277 of file rfid_tag_app.hpp.

NodeId RfidTagAppData::getTagId (  )  const

Read the node ID from the packet data.

Returns:
the ID of the node in the packet.

Definition at line 114 of file rfid_tag_app.cpp.

RfidTagAppData::Types RfidTagAppData::getType (  )  const [inline]

Read the type field from this packet data.

Returns:
the type field of the packet.

Definition at line 287 of file rfid_tag_app.hpp.

void RfidTagAppData::setTagId ( const NodeId nodeId  ) 

Write the node ID to the packet data.

Parameters:
nodeId the ID to be written.

Definition at line 109 of file rfid_tag_app.cpp.

References NodeId::writeToByteArray().

void RfidTagAppData::setType ( Types  type  )  [inline]

Write the type field to this packet data.

Parameters:
type the value for the type field.

Definition at line 282 of file rfid_tag_app.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