#include <rfid_node.h>
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 |
Definition at line 39 of file rfid_node.h.
RfidNode::RfidNode | ( | RfidDriverInterface * | rfid_driver | ) |
Parameterized constructor.
rfid_driver,the | driver interface. |
Definition at line 30 of file rfid_node.cpp.
Destructor.
Definition at line 52 of file rfid_node.cpp.
int RfidNode::get_num_blocks | ( | ) | [private] |
Method to get the number of blocks with data in the card.
Definition at line 242 of file rfid_node.cpp.
void RfidNode::init | ( | ) |
int RfidNode::read_card | ( | ) |
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.
num_blocks | Number of blocks to read. |
Definition at line 173 of file rfid_node.cpp.
void RfidNode::set_data | ( | card_data | card | ) |
Method to set the data in the struct.
card_data | Data to set in the struct. |
Definition at line 166 of file rfid_node.cpp.
void RfidNode::spin | ( | ) |
bool RfidNode::write_card | ( | rfid_msgs::WriteCard::Request & | req, |
rfid_msgs::WriteCard::Response & | resp | ||
) |
Callback to manage the rfid.
req | RfidTag type request. |
resp | RfidTag type response. |
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.
card_data | Data to write in the card. |
Definition at line 211 of file rfid_node.cpp.
ros::NodeHandle RfidNode::_nh [private] |
Definition at line 113 of file rfid_node.h.
ros::NodeHandle RfidNode::_nh_private [private] |
Definition at line 114 of file rfid_node.h.
int RfidNode::_num_device [private] |
Definition at line 125 of file rfid_node.h.
ros::Rate RfidNode::_publish_rate [private] |
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.
ros::ServiceServer RfidNode::_rfid_write_srv [private] |
Definition at line 118 of file rfid_node.h.
ros::Publisher RfidNode::_write_pub [private] |
Definition at line 116 of file rfid_node.h.