RfidReaderAppData Class Reference

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

#include <rfid_reader_app.hpp>

Inheritance diagram for RfidReaderAppData:

PacketData List of all members.

Public Types

typedef boost::shared_ptr<
RfidReaderAppData
RfidReaderAppDataPtr
 Smart pointer that clients should use.
 Types_NoType
 enum value Types_NoType.
 Types_Read
 enum value Types_Read.
 Types_Reset
 enum value Types_Reset.
enum  Types { Types_NoType, Types_Read, Types_Reset }
 Types enum. More...

Public Member Functions

virtual t_uint getSizeInBytes () const
 Get the size of this data.
void setReaderId (const NodeId &nodeId)
 Write the node ID to the packet data.
NodeId getReaderId () 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.
void setDoEntireReadCycle (bool doEntireReadCycle)
 Sets whether the entire read cycle must be done or if the read cycle can end early in response to several consecutive unsuccessful contention intervals.
bool getDoEntireReadCycle () const
 Gets whether the entire read cycle must be done or if the read cycle can end early in response to several consecutive unsuccessful contention intervals.
ostream & print (ostream &s) const
 Return the stream representation of the object.

Static Public Member Functions

static RfidReaderAppDataPtr create ()
 A factory method to ensure that all objects are created via new since we are using smart pointers.
static RfidReaderAppDataPtr create (const RfidReaderAppData &rhs)
 A factory method to ensure that all objects are created via new since we are using smart pointers.

Protected Member Functions

 RfidReaderAppData ()
 A constructor.
 RfidReaderAppData (const RfidReaderAppData &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 RfidReaderApp's data packet.

Definition at line 489 of file rfid_reader_app.hpp.


Member Enumeration Documentation

enum RfidReaderAppData::Types

Types enum.

Specifies the types of packets that are sent.

Enumerator:
Types_NoType  enum value Types_NoType.
Types_Read  enum value Types_Read.
Types_Reset  enum value Types_Reset.

Definition at line 498 of file rfid_reader_app.hpp.


Member Function Documentation

PacketDataPtr RfidReaderAppData::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 311 of file rfid_reader_app.cpp.

References RfidReaderAppData().

Referenced by create().

bool RfidReaderAppData::getDoEntireReadCycle (  )  const [inline]

Gets whether the entire read cycle must be done or if the read cycle can end early in response to several consecutive unsuccessful contention intervals.

Returns:
true if the entire read cycle must be performed.
See also:
setDoEntireReadCycle()

Definition at line 661 of file rfid_reader_app.hpp.

NodeId RfidReaderAppData::getReaderId (  )  const

Read the node ID from the packet data.

Returns:
the ID of the node in the packet.

Definition at line 322 of file rfid_reader_app.cpp.

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

Get the size of this data.

Returns:
the size of the data in bytes.

Reimplemented from PacketData.

Definition at line 633 of file rfid_reader_app.hpp.

References getType().

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

Read the type field from this packet data.

Returns:
the type field of the packet.

Definition at line 650 of file rfid_reader_app.hpp.

Referenced by getSizeInBytes().

void RfidReaderAppData::setDoEntireReadCycle ( bool  doEntireReadCycle  )  [inline]

Sets whether the entire read cycle must be done or if the read cycle can end early in response to several consecutive unsuccessful contention intervals.

Parameters:
doEntireReadCycle determines if the entire read cycle must be performed.
See also:
getDoEntireReadCycle()

Definition at line 655 of file rfid_reader_app.hpp.

void RfidReaderAppData::setReaderId ( const NodeId nodeId  ) 

Write the node ID to the packet data.

Parameters:
nodeId the ID to be written.

Definition at line 317 of file rfid_reader_app.cpp.

References NodeId::writeToByteArray().

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

Write the type field to this packet data.

Parameters:
type the value for the type field.

Definition at line 645 of file rfid_reader_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