Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00027 #ifndef _RONEX_UTILS_HPP_
00028 #define _RONEX_UTILS_HPP_
00029
00030 #include <ros_ethercat_hardware/ethercat_device.h>
00031 #include <boost/lexical_cast.hpp>
00032 #include <ros/ros.h>
00033
00034 #include <sr_ronex_utilities/sr_ronex_utilities.hpp>
00035
00036 namespace ronex
00037 {
00038 static inline std::string get_serial_number(const EtherCAT_SlaveHandler *sh)
00039 {
00040 return boost::lexical_cast<std::string>(sh->get_serial());
00041 }
00042
00043 static inline std::string get_product_code(const EtherCAT_SlaveHandler *sh)
00044 {
00045 return boost::lexical_cast<std::string>(sh->get_product_code());
00046 }
00047
00060 static inline std::string build_name( const std::string &product_alias, const std::string &ronex_id)
00061 {
00062 return std::string("/ronex/") + product_alias + '/' + ronex_id;
00063 }
00064 }
00065
00066
00067
00068
00069
00070
00071
00072 #endif
00073