18 #ifndef WRITE_MODBUS_REGISTER_CALL_H 19 #define WRITE_MODBUS_REGISTER_CALL_H 23 #include <prbt_hardware_support/WriteModbusRegister.h> 32 const uint16_t& start_idx,
35 WriteModbusRegister srv;
36 srv.request.holding_register_block.start_idx = start_idx;
37 srv.request.holding_register_block.values = values;
40 bool call_success = modbus_service.call(srv);
43 ROS_ERROR_STREAM(
"Service call " << modbus_service.getService() <<
" failed.");
47 if (!srv.response.success)
58 #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)