#include <string.h>
#include "robotiq_ft_sensor/rq_sensor_state.h"
#include "robotiq_ft_sensor/rq_sensor_com.h"
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 |
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.
Gets the value of high level information from the sensor.
command | has to be in [1, 2, 4, 8] corresponding to SerialNumber, FirmwareVersion and ProductionYear, Reset |
value | return string with requested Data |
values correnspond to constants in sensor_accessor.srv
Definition at line 263 of file rq_sensor_state.cpp.
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 |
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 |
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 |
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 |
Definition at line 212 of file rq_sensor_state.cpp.
|
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.
|
static |
Definition at line 51 of file rq_sensor_state.cpp.