Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
ZyonzChlorophyllMeterDriver Class Reference

IRI ROS Specific Driver Class. More...

#include <zyonz_chlorophyll_meter_driver.h>

Inheritance diagram for ZyonzChlorophyllMeterDriver:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
zyonz_chlorophyll_meter::ZyonzChlorophyllMeterConfig 
Config
 define config type

Public Member Functions

bool close_meter (void)
bool closeDriver (void)
 close driver
void config_update (Config &new_cfg, uint32_t level=0)
 config update
float get_current_angle (void)
float get_current_effort (void)
float get_max_angle ()
float get_max_effort (void)
float get_min_angle ()
bool is_at_max_angle ()
bool is_at_min_angle ()
bool open_meter (void)
bool openDriver (void)
 open driver
void set_baudrate (int baudrate)
void set_bus_id (int bus_id)
void set_effort (double effort)
void set_max_angle (double max_angle)
void set_min_angle (double min_angle)
void set_servo_id (unsigned char servo_id)
bool startDriver (void)
 start driver
void stop_meter (void)
bool stopDriver (void)
 stop driver
 ZyonzChlorophyllMeterDriver (void)
 constructor
 ~ZyonzChlorophyllMeterDriver (void)
 Destructor.

Public Attributes

Config config_
 config variable

Private Member Functions

bool move_gripper (const double position_in_radians)

Private Attributes

int baudrate_
int bus_id_
double effort_
double max_angle_
double min_angle_
boost::shared_ptr
< CDynamixelMotor > 
motor_
unsigned char servo_id_

Detailed Description

IRI ROS Specific Driver Class.

This class inherits from the IRI Base class IriBaseDriver, which provides the guidelines to implement any specific driver. The IriBaseDriver class offers an easy framework to integrate functional drivers implemented in C++ with the ROS driver structure. ROS driver_base state transitions are already managed by IriBaseDriver.

The ZyonzChlorophyllMeterDriver class must implement all specific driver requirements to safetely open, close, run and stop the driver at any time. It also must guarantee an accessible interface for all driver's parameters.

The ZyonzChlorophyllMeterConfig.cfg needs to be filled up with those parameters suitable to be changed dynamically by the ROS dyanmic reconfigure application. The implementation of the CIriNode class will manage those parameters through methods like postNodeOpenHook() and reconfigureNodeHook().

Definition at line 54 of file zyonz_chlorophyll_meter_driver.h.


Member Typedef Documentation

typedef zyonz_chlorophyll_meter::ZyonzChlorophyllMeterConfig ZyonzChlorophyllMeterDriver::Config

define config type

Define a Config type with the ZyonzChlorophyllMeterConfig. All driver implementations will then use the same variable type Config.

Definition at line 73 of file zyonz_chlorophyll_meter_driver.h.


Constructor & Destructor Documentation

constructor

In this constructor parameters related to the specific driver can be initalized. Those parameters can be also set in the openDriver() function. Attributes from the main node driver class IriBaseDriver such as loop_rate, may be also overload here.

Definition at line 3 of file zyonz_chlorophyll_meter_driver.cpp.

Destructor.

This destructor is called when the object is about to be destroyed.

Definition at line 239 of file zyonz_chlorophyll_meter_driver.cpp.


Member Function Documentation

Definition at line 127 of file zyonz_chlorophyll_meter_driver.cpp.

close driver

In this function, the driver must be closed. Variables related to the driver state must also be taken into account. This function is automatically called by IriBaseDriver::doClose(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 60 of file zyonz_chlorophyll_meter_driver.cpp.

void ZyonzChlorophyllMeterDriver::config_update ( Config new_cfg,
uint32_t  level = 0 
)

config update

In this function the driver parameters must be updated with the input config variable. Then the new configuration state will be stored in the Config attribute.

Parameters:
new_cfgthe new driver configuration state
levellevel in which the update is taken place

Definition at line 78 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 158 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 148 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 163 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 153 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 168 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 173 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 180 of file zyonz_chlorophyll_meter_driver.cpp.

bool ZyonzChlorophyllMeterDriver::move_gripper ( const double  position_in_radians) [private]

Definition at line 217 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 122 of file zyonz_chlorophyll_meter_driver.cpp.

open driver

In this function, the driver must be openned. Openning errors must be taken into account. This function is automatically called by IriBaseDriver::doOpen(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 14 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 187 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 192 of file zyonz_chlorophyll_meter_driver.cpp.

void ZyonzChlorophyllMeterDriver::set_effort ( double  effort)

Definition at line 212 of file zyonz_chlorophyll_meter_driver.cpp.

void ZyonzChlorophyllMeterDriver::set_max_angle ( double  max_angle)

Definition at line 202 of file zyonz_chlorophyll_meter_driver.cpp.

void ZyonzChlorophyllMeterDriver::set_min_angle ( double  min_angle)

Definition at line 207 of file zyonz_chlorophyll_meter_driver.cpp.

void ZyonzChlorophyllMeterDriver::set_servo_id ( unsigned char  servo_id)

Definition at line 197 of file zyonz_chlorophyll_meter_driver.cpp.

start driver

After this function, the driver and its thread will be started. The driver and related variables should be properly setup. This function is automatically called by IriBaseDriver::doStart(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 66 of file zyonz_chlorophyll_meter_driver.cpp.

Definition at line 132 of file zyonz_chlorophyll_meter_driver.cpp.

stop driver

After this function, the driver's thread will stop its execution. The driver and related variables should be properly setup. This function is automatically called by IriBaseDriver::doStop(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 72 of file zyonz_chlorophyll_meter_driver.cpp.


Member Data Documentation

Definition at line 59 of file zyonz_chlorophyll_meter_driver.h.

Definition at line 60 of file zyonz_chlorophyll_meter_driver.h.

config variable

This variable has all the driver parameters defined in the cfg config file. Is updated everytime function config_update() is called.

Definition at line 81 of file zyonz_chlorophyll_meter_driver.h.

Definition at line 64 of file zyonz_chlorophyll_meter_driver.h.

Definition at line 62 of file zyonz_chlorophyll_meter_driver.h.

Definition at line 63 of file zyonz_chlorophyll_meter_driver.h.

boost::shared_ptr<CDynamixelMotor> ZyonzChlorophyllMeterDriver::motor_ [private]

Definition at line 58 of file zyonz_chlorophyll_meter_driver.h.

unsigned char ZyonzChlorophyllMeterDriver::servo_id_ [private]

Definition at line 61 of file zyonz_chlorophyll_meter_driver.h.


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


zyonz_chlorophyll_meter
Author(s): Sergi Hernandez Juan
autogenerated on Fri Dec 6 2013 20:05:20