18 #ifndef WRITE_MODBUS_REGISTER_CALL_H 19 #define WRITE_MODBUS_REGISTER_CALL_H 23 #include <prbt_hardware_support/WriteModbusRegister.h> 31 WriteModbusRegister srv;
32 srv.request.holding_register_block.start_idx = start_idx;
33 srv.request.holding_register_block.values = values;
36 bool call_success = modbus_service.call(srv);
39 ROS_ERROR_STREAM(
"Service call " << modbus_service.getService() <<
" failed.");
43 if (!srv.response.success)
54 #endif // WRITE_MODBUS_REGISTER_CALL_H std::vector< uint16_t > RegCont
Convenience data type defining the data type for a collection of registers.
#define ROS_DEBUG_STREAM(args)
#define ROS_ERROR_STREAM(args)
static bool writeModbusRegisterCall(T &modbus_service, const uint16_t &start_idx, const RegCont &values)