Public Member Functions | Private Member Functions | Private Attributes
RfidNode Class Reference

#include <rfid_node.h>

List of all members.

Public Member Functions

void init ()
 Initialize the node.
int read_card ()
 
card_data read_tag_data (int num_blocks)
 Method to read data from a card.
 RfidNode (RfidDriverInterface *rfid_driver)
 Parameterized constructor.
void set_data (card_data)
 Method to set the data in the struct.
void spin ()
 Spin the node.
bool write_card (rfid_msgs::WriteCard::Request &req, rfid_msgs::WriteCard::Response &resp)
 Callback to manage the rfid.
void write_tag_data (card_data card)
 Method to write the data in a card.
 ~RfidNode ()
 Destructor.

Private Member Functions

int get_num_blocks ()
 Method to get the number of blocks with data in the card.

Private Attributes

ros::NodeHandle _nh
ros::NodeHandle _nh_private
int _num_device
ros::Rate _publish_rate
card_data _rfid_card
RfidDriverInterface * _rfid_driver
ros::ServiceServer _rfid_write_srv
ros::Publisher _write_pub

Detailed Description

Definition at line 39 of file rfid_node.h.


Constructor & Destructor Documentation

RfidNode::RfidNode ( RfidDriverInterface *  rfid_driver)

Parameterized constructor.

Parameters:
rfid_driver,thedriver interface.

Definition at line 30 of file rfid_node.cpp.

Destructor.

Definition at line 52 of file rfid_node.cpp.


Member Function Documentation

int RfidNode::get_num_blocks ( ) [private]

Method to get the number of blocks with data in the card.

Returns:
Number of blocks with data.

Definition at line 242 of file rfid_node.cpp.

void RfidNode::init ( )

Initialize the node.

Parameters:
@return

Definition at line 62 of file rfid_node.cpp.

Returns:
0 if no error, -1 if error.

Definition at line 117 of file rfid_node.cpp.

card_data RfidNode::read_tag_data ( int  num_blocks)

Method to read data from a card.

Parameters:
num_blocksNumber of blocks to read.
Returns:
card_data

Definition at line 173 of file rfid_node.cpp.

void RfidNode::set_data ( card_data  card)

Method to set the data in the struct.

Parameters:
card_dataData to set in the struct.

Definition at line 166 of file rfid_node.cpp.

void RfidNode::spin ( )

Spin the node.

Parameters:
@return

Definition at line 70 of file rfid_node.cpp.

bool RfidNode::write_card ( rfid_msgs::WriteCard::Request &  req,
rfid_msgs::WriteCard::Response &  resp 
)

Callback to manage the rfid.

Parameters:
reqRfidTag type request.
respRfidTag type response.
Returns:
true if there are no errors.

Definition at line 83 of file rfid_node.cpp.

void RfidNode::write_tag_data ( card_data  card)

Method to write the data in a card.

Parameters:
card_dataData to write in the card.

Definition at line 211 of file rfid_node.cpp.


Member Data Documentation

Definition at line 113 of file rfid_node.h.

Definition at line 114 of file rfid_node.h.

int RfidNode::_num_device [private]

Definition at line 125 of file rfid_node.h.

Definition at line 120 of file rfid_node.h.

card_data RfidNode::_rfid_card [private]

Definition at line 123 of file rfid_node.h.

RfidDriverInterface* RfidNode::_rfid_driver [private]

Definition at line 122 of file rfid_node.h.

Definition at line 118 of file rfid_node.h.

Definition at line 116 of file rfid_node.h.


The documentation for this class was generated from the following files:


rfid
Author(s): Raul Perula-Martinez
autogenerated on Wed Apr 1 2015 10:17:22