7 int main(
int argc,
char **argv)
16 unsigned char send_data[6] = {0x01,0x06,0x00,0x0A,0x00,0x03};
17 unsigned char * recv_data =
new unsigned char [recv_bytes]{0};
23 fprintf(stderr,
"ret = %d, recv_data: ", ret);
25 for(
int i=0; i<recv_bytes; i++)
27 fprintf(stderr,
"%x\t", recv_data[i]);
29 fprintf(stderr,
"\n");
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int send_tool_modbus(unsigned char *data, int send_len, unsigned char *recv_data=NULL, int recv_len=0)
void init(ros::NodeHandle &nh)