h4r_x52_joyext
LED and MFD Control for Saitek X52 Pro
 All Classes Files Functions Variables Enumerator Macros Pages
PublishMFD< T > Class Template Reference
Collaboration diagram for PublishMFD< T >:
Collaboration graph

Classes

class  PairSortMod
 

Public Member Functions

 PublishMFD (ros::NodeHandle *n)
 A char is interpreted as integer if this is 1 or as unsigned integer if this is 2 and as char on any other value. More...
 
 ~PublishMFD ()
 
template<typename V >
std::string get_value_string (V value)
 
std::string get_value_string (char value)
 
template<typename V >
void progressValue (V value)
 
void JoyCallback (const sensor_msgs::JoyConstPtr &msg)
 
template<class MSGPTR >
void Callback (const MSGPTR &msg)
 
template<class MSG , class MSGPTR >
void start ()
 
void startJoy ()
 

Private Types

enum  { LEFT, CENTER, RIGHT }
 

Private Attributes

std::set< PairSortModranges
 
ros::NodeHandle * n
 The node handler. More...
 
ros::Publisher pub
 The publisher. More...
 
ros::Subscriber sub
 The subscriber. More...
 
int line
 The line where the string will be placed. More...
 
int pos
 Position from the beginning of the line. More...
 
int field_length
 Field length. More...
 
int align
 Align of the text in the field, 0=Left, 1=Center, 2 (or anything else)=Right. More...
 
std::string positive_oversize
 String to show if the integer part of a value is bigger then the size (positiv) More...
 
std::string negative_oversize
 String to show if the integer part of a value is bigger then the size (negative) More...
 
bool axis_or_button
 Joy topic addition. More...
 
int axis_button
 The button or axis number if using Joy topic. More...
 
bool stringprint
 If this is true, there will be strings instead of values. More...
 
std::string stringprint_setup
 if stringprint is enabled, this will store the strings to be displayed More...
 
int char_as_int
 

Detailed Description

template<typename T>
class PublishMFD< T >

Definition at line 185 of file mfd_writer.cpp.

Member Enumeration Documentation

template<typename T>
anonymous enum
private
Enumerator
LEFT 
CENTER 
RIGHT 

Definition at line 187 of file mfd_writer.cpp.

Constructor & Destructor Documentation

template<typename T>
PublishMFD< T >::~PublishMFD ( )
inline

Definition at line 314 of file mfd_writer.cpp.

Member Function Documentation

template<typename T>
template<class MSGPTR >
void PublishMFD< T >::Callback ( const MSGPTR &  msg)
inline

Definition at line 494 of file mfd_writer.cpp.

References PublishMFD< T >::progressValue().

Here is the call graph for this function:

template<typename T>
template<typename V >
std::string PublishMFD< T >::get_value_string ( value)
inline

Definition at line 320 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue().

Here is the caller graph for this function:

template<typename T>
std::string PublishMFD< T >::get_value_string ( char  value)
inline

Definition at line 333 of file mfd_writer.cpp.

References PublishMFD< T >::char_as_int, and PublishMFD< T >::field_length.

template<typename T>
void PublishMFD< T >::JoyCallback ( const sensor_msgs::JoyConstPtr &  msg)
inline
template<typename T>
template<typename V >
void PublishMFD< T >::progressValue ( value)
inline
template<typename T>
template<class MSG , class MSGPTR >
void PublishMFD< T >::start ( )
inline

Definition at line 500 of file mfd_writer.cpp.

References PublishMFD< T >::n, and PublishMFD< T >::sub.

template<typename T>
void PublishMFD< T >::startJoy ( )
inline

Definition at line 507 of file mfd_writer.cpp.

References PublishMFD< T >::n, and PublishMFD< T >::sub.

Referenced by main().

Here is the caller graph for this function:

Member Data Documentation

template<typename T>
int PublishMFD< T >::align
private

Align of the text in the field, 0=Left, 1=Center, 2 (or anything else)=Right.

Definition at line 210 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
int PublishMFD< T >::axis_button
private

The button or axis number if using Joy topic.

Definition at line 214 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::JoyCallback(), and PublishMFD< T >::PublishMFD().

template<typename T>
bool PublishMFD< T >::axis_or_button
private

Joy topic addition.

Definition at line 213 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::JoyCallback(), and PublishMFD< T >::PublishMFD().

template<typename T>
int PublishMFD< T >::char_as_int
private
template<typename T>
int PublishMFD< T >::field_length
private
template<typename T>
int PublishMFD< T >::line
private

The line where the string will be placed.

Definition at line 207 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
ros::NodeHandle* PublishMFD< T >::n
private

The node handler.

Definition at line 203 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::start(), and PublishMFD< T >::startJoy().

template<typename T>
std::string PublishMFD< T >::negative_oversize
private

String to show if the integer part of a value is bigger then the size (negative)

Definition at line 212 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
int PublishMFD< T >::pos
private

Position from the beginning of the line.

Definition at line 208 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
std::string PublishMFD< T >::positive_oversize
private

String to show if the integer part of a value is bigger then the size (positiv)

Definition at line 211 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
ros::Publisher PublishMFD< T >::pub
private

The publisher.

Definition at line 204 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
std::set<PairSortMod> PublishMFD< T >::ranges
private

Definition at line 202 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
bool PublishMFD< T >::stringprint
private

If this is true, there will be strings instead of values.

Definition at line 215 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().

template<typename T>
std::string PublishMFD< T >::stringprint_setup
private

if stringprint is enabled, this will store the strings to be displayed

Definition at line 216 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::PublishMFD().

template<typename T>
ros::Subscriber PublishMFD< T >::sub
private

The subscriber.

Definition at line 205 of file mfd_writer.cpp.

Referenced by PublishMFD< T >::start(), and PublishMFD< T >::startJoy().


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