#include <stdio.h>
#include <vector>
#include <math.h>
#include <sstream>
#include <ros/ros.h>
#include <cereal_port/CerealPort.h>
#include "sensorhand_speed/hand_cmd.h"
#include "sensorhand_speed/hand_dump.h"
Go to the source code of this file.
Classes | |
struct | Command |
Defines | |
#define | TIMEOUT 100 |
Enumerations | |
enum | Command_id { START_DUMP = 0, STOP_DUMP = 1, OPEN = 2, CLOSE = 3, STOP = 4, GET_SN = 5, RESET = 6, PRGM = 7 } |
enum | State { IDLE, READ_FIRST, READ_LEN, READ_DATA, READ_CS } |
Functions | |
int | main (int argc, char **argv) |
void | publish_dump (ros::Publisher &dump_pub, char *data) |
bool | readByte (cereal::CerealPort *device, char *data) |
bool | sendCommand (cereal::CerealPort *device, Command *cmd) |
bool | srv_callback (sensorhand_speed::hand_cmd::Request &request, sensorhand_speed::hand_cmd::Response &response) |
Variables | |
bool | dump_mode = false |
std::vector< Command > | pending_cmd |
enum State | state |
#define TIMEOUT 100 |
Definition at line 43 of file hand_node.cpp.
enum Command_id |
Definition at line 46 of file hand_node.cpp.
enum State |
Definition at line 53 of file hand_node.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 72 of file hand_node.cpp.
void publish_dump | ( | ros::Publisher & | dump_pub, |
char * | data | ||
) |
Definition at line 463 of file hand_node.cpp.
bool readByte | ( | cereal::CerealPort * | device, |
char * | data | ||
) |
Definition at line 266 of file hand_node.cpp.
bool sendCommand | ( | cereal::CerealPort * | device, |
Command * | cmd | ||
) |
Definition at line 286 of file hand_node.cpp.
bool srv_callback | ( | sensorhand_speed::hand_cmd::Request & | request, |
sensorhand_speed::hand_cmd::Response & | response | ||
) |
Definition at line 434 of file hand_node.cpp.
bool dump_mode = false |
Definition at line 64 of file hand_node.cpp.
std::vector<Command> pending_cmd |
Definition at line 63 of file hand_node.cpp.