Classes | Functions
sr_ronex_read_analog_data.cpp File Reference

Demonstrate how to read analogue data with RoNeX. More...

#include <string>
#include <ros/ros.h>
#include <ros/console.h>
#include <boost/lexical_cast.hpp>
#include "sr_ronex_msgs/GeneralIOState.h"
#include "sr_ronex_utilities/sr_ronex_utilities.hpp"
Include dependency graph for sr_ronex_read_analog_data.cpp:

Go to the source code of this file.

Classes

class  SrRonexFindGeneralIOModule

Functions

void generalIOState_callback (const sr_ronex_msgs::GeneralIOState::ConstPtr &msg)
int main (int argc, char **argv)

Detailed Description

Demonstrate how to read analogue data with RoNeX.

Author:
Yi Li <yi@shadowrobot.com>

Definition in file sr_ronex_read_analog_data.cpp.


Function Documentation

void generalIOState_callback ( const sr_ronex_msgs::GeneralIOState::ConstPtr &  msg)

The callback function given to the subscribe() call.

Parameters:
msgA const pointer to a message of type sr_ronex_msgs::GeneralIOState.

Definition at line 104 of file sr_ronex_read_analog_data.cpp.

int main ( int  argc,
char **  argv 
)

This class demonstrates how to read analogue data with RoNeX.

The subscribe() call is how you tell ROS that you want to receive messages on a given topic. Messages are passed to a callback function. The second parameter to the subscribe() function is the size of the message queue.

ros::spin() will enter a loop, pumping callbacks. With this version, all callbacks will be called from within this thread (the main one). ros::spin() will exit when Ctrl-C is pressed, or the node is shutdown by the master.

Definition at line 117 of file sr_ronex_read_analog_data.cpp.



sr_ronex_examples
Author(s): Ugo Cupcic, Toni Oliver, Mark Pitchless, Yi Li
autogenerated on Fri Aug 28 2015 13:12:34