Functions | Variables
rq_sensor_state.cpp File Reference
#include <string.h>
#include "robotiq_ft_sensor/rq_sensor_state.h"
#include "robotiq_ft_sensor/rq_sensor_com.h"
Include dependency graph for rq_sensor_state.cpp:

Go to the source code of this file.

Functions

enum rq_sensor_state_values rq_sensor_get_current_state ()
 Returns this module's state machine current state. More...
 
INT_8 rq_sensor_state (unsigned int max_retries, const std::string &ftdi_id)
 
INT_8 rq_sensor_state (unsigned int max_retries)
 
void rq_state_do_zero_force_flag ()
 Command a zero on the sensor. More...
 
bool rq_state_get_command (INT_8 command, INT_8 *const value)
 Gets the value of high level information from the sensor. More...
 
void rq_state_get_command (INT_8 const *const name, INT_8 *const value)
 
float rq_state_get_received_data (UINT_8 i)
 
bool rq_state_got_new_message ()
 Returns true if a stream message is available. More...
 
static INT_8 rq_state_init_com ()
 Initialize communication with the sensor and set the next state to RQ_STATE_READ_INFO. More...
 
static INT_8 rq_state_init_com (const std::string &ftdi_id)
 Initialize communication with the sensor at /dev/ftdi_id and set the next state to RQ_STATE_READ_INFO. More...
 
static void rq_state_read_info_high_lvl ()
 Reads the high level information from the sensor and set the next state to RQ_STATE_START_STREAM. More...
 
static void rq_state_run (unsigned int max_retries)
 
static void rq_state_start_stream ()
 Send the command to start the streaming mode If the stream doesn't start, return to state init. Set the next state to RQ_STATE_RUN. More...
 

Variables

static enum rq_sensor_state_values current_state = RQ_STATE_INIT
 

Function Documentation

enum rq_sensor_state_values rq_sensor_get_current_state ( void  )

Returns this module's state machine current state.

Definition at line 322 of file rq_sensor_state.cpp.

INT_8 rq_sensor_state ( unsigned int  max_retries,
const std::string &  ftdi_id 
)

Definition at line 69 of file rq_sensor_state.cpp.

INT_8 rq_sensor_state ( unsigned int  max_retries)

Definition at line 109 of file rq_sensor_state.cpp.

void rq_state_do_zero_force_flag ( void  )

Command a zero on the sensor.

Definition at line 338 of file rq_sensor_state.cpp.

bool rq_state_get_command ( INT_8  command,
INT_8 *const  value 
)

Gets the value of high level information from the sensor.

Parameters
commandhas to be in [1, 2, 4, 8] corresponding to SerialNumber, FirmwareVersion and ProductionYear, Reset
valuereturn string with requested Data
Returns
true iff command is valid

values correnspond to constants in sensor_accessor.srv

Definition at line 263 of file rq_sensor_state.cpp.

void rq_state_get_command ( INT_8 const *const  name,
INT_8 *const  value 
)

Definition at line 296 of file rq_sensor_state.cpp.

float rq_state_get_received_data ( UINT_8  i)

Definition at line 242 of file rq_sensor_state.cpp.

bool rq_state_got_new_message ( void  )

Returns true if a stream message is available.

Definition at line 330 of file rq_sensor_state.cpp.

static INT_8 rq_state_init_com ( void  )
static

Initialize communication with the sensor and set the next state to RQ_STATE_READ_INFO.

Definition at line 149 of file rq_sensor_state.cpp.

static INT_8 rq_state_init_com ( const std::string &  ftdi_id)
static

Initialize communication with the sensor at /dev/ftdi_id and set the next state to RQ_STATE_READ_INFO.

Definition at line 165 of file rq_sensor_state.cpp.

static void rq_state_read_info_high_lvl ( void  )
static

Reads the high level information from the sensor and set the next state to RQ_STATE_START_STREAM.

Definition at line 182 of file rq_sensor_state.cpp.

static void rq_state_run ( unsigned int  max_retries)
static

Definition at line 212 of file rq_sensor_state.cpp.

static void rq_state_start_stream ( void  )
static

Send the command to start the streaming mode If the stream doesn't start, return to state init. Set the next state to RQ_STATE_RUN.

Definition at line 194 of file rq_sensor_state.cpp.

Variable Documentation

enum rq_sensor_state_values current_state = RQ_STATE_INIT
static

Definition at line 51 of file rq_sensor_state.cpp.



robotiq_ft_sensor
Author(s): Jonathan Savoie
autogenerated on Tue Jun 1 2021 02:30:04