/home/laradmin/lar/utils/device_mapper/src/device_mapper.cpp File Reference

Node that automatically creates parameters for devices paths given a set of rules, presented in the urdf file. More...

#include <urdf/model.h>
#include <string>
#include <map>
#include <tinyxml.h>
#include <boost/function.hpp>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include "joint.h"
#include "color.h"
#include <urdf_interface/model.h>
#include <stdlib.h>
#include <iostream>
#include <cmath>
#include <stdexcept>
#include "duration.h"
#include <boost/math/special_functions/round.hpp>
#include "rostime_decl.h"
#include <sys/time.h>
#include "ros/time.h"
#include <cstdio>
#include <sstream>
#include <cstdarg>
#include <log4cxx/logger.h>
#include "ros/console.h"
#include <boost/static_assert.hpp>
#include <ros/platform.h>
#include <stdint.h>
#include <assert.h>
#include <stddef.h>
#include "ros/assert.h"
#include <set>
#include <list>
#include <ros/macros.h>
#include "exceptions.h"
#include "roscpp_serialization_macros.h"
#include <boost/shared_array.hpp>
#include "ros/forwards.h"
#include "ros/common.h"
#include <string.h>
#include <boost/array.hpp>
#include <ros/types.h>
#include "serialized_message.h"
#include "message_forward.h"
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include "message_traits.h"
#include "ros/exception.h"
#include <boost/call_traits.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/not.hpp>
#include <cstring>
#include <boost/bind.hpp>
#include "common.h"
#include <typeinfo>
#include <ros/message_traits.h>
#include <boost/type_traits/is_void.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/make_shared.hpp>
#include <ros/static_assert.h>
#include "ros/builtin_message_traits.h"
#include "ros/serialization.h"
#include "ros/message_event.h"
#include "forwards.h"
#include "timer_options.h"
#include "ros/rate.h"
#include "wall_timer_options.h"
#include "ros/message.h"
#include "ros/service_traits.h"
#include <boost/lexical_cast.hpp>
#include "subscription_callback_helper.h"
#include "ros/spinner.h"
#include <time.h>
#include "ros/publisher.h"
#include <boost/utility.hpp>
#include "ros/service_server.h"
#include "ros/subscriber.h"
#include "ros/node_handle.h"
#include "ros/init.h"
#include "XmlRpcValue.h"
#include "node_handle.h"
#include "ros/names.h"
#include <libudev.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <boost/algorithm/string.hpp>
#include <libxml/encoding.h>
#include <libxml/xmlwriter.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/xmlreader.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void AddCallback (string action, string node, void *data)
 Device add callback.
void GetAttribute (xmlTextReaderPtr reader, const xmlChar *name, string &str)
 Get the value of an attribute in a xml element.
void GetName (xmlTextReaderPtr reader, string &str)
 Get the name of a xml element.
void GetValue (xmlTextReaderPtr reader, string &str)
 Get the value of a xml element.
int main (int argc, char **argv)
void NodeHandler (xmlTextReaderPtr reader)
 Handler of xml nodes, heavy duty function.
void RemoveCallback (string action, string node, void *data)
 Device remove callback.

Variables

vector< shared_ptr
< class_udev_control > > 
devices
 Vector of the connected devices udev classes.
NodeHandle * nh
 Local node handler.

Detailed Description

Node that automatically creates parameters for devices paths given a set of rules, presented in the urdf file.

Definition in file device_mapper.cpp.


Function Documentation

void AddCallback ( string  action,
string  node,
void *  data 
)

Device add callback.

This function handles the addition of a device.

Parameters:
action not used
node path of the device
data id of the device

Definition at line 57 of file device_mapper.cpp.

void GetAttribute ( xmlTextReaderPtr  reader,
const xmlChar *  name,
string &  str 
)

Get the value of an attribute in a xml element.

This function reads the value of an attribute in the current xml element in the reader.

Parameters:
reader xmlTextReaderPtr pointing to the xml object
name name of the attribute to read
str variable that will store the value

Definition at line 117 of file device_mapper.cpp.

void GetName ( xmlTextReaderPtr  reader,
string &  str 
)

Get the name of a xml element.

This function reads the name of the current xml element in the reader.

Parameters:
reader xmlTextReaderPtr pointing to the xml object
str variable that will store the name

Definition at line 86 of file device_mapper.cpp.

void GetValue ( xmlTextReaderPtr  reader,
string &  str 
)

Get the value of a xml element.

This function reads the value of the current xml element in the reader.

Parameters:
reader xmlTextReaderPtr pointing to the xml object
str variable that will store the value

Definition at line 101 of file device_mapper.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 188 of file device_mapper.cpp.

void NodeHandler ( xmlTextReaderPtr  reader  ) 

Handler of xml nodes, heavy duty function.

This node handler will handle all the nodes in the xml object searching for specific tags that indicate the presence of the desired SENSOR or DEVICE_INFORMATION info. When a new SENSOR if found a udev class is allocated and subsequent pairs of rules are added to it.

Parameters:
reader xmlTextReaderPtr pointing to the xml object

Definition at line 135 of file device_mapper.cpp.

void RemoveCallback ( string  action,
string  node,
void *  data 
)

Device remove callback.

This function handles the removal of a device.

Parameters:
action not used
node path of the device
data id of the device

Definition at line 72 of file device_mapper.cpp.


Variable Documentation

vector<shared_ptr<class_udev_control> > devices

Vector of the connected devices udev classes.

Definition at line 44 of file device_mapper.cpp.

NodeHandle* nh

Local node handler.

Definition at line 47 of file device_mapper.cpp.

 All Classes Files Functions Variables


device_mapper
Author(s): Jorge Almeida
autogenerated on Wed Jul 23 04:34:40 2014