19 #include <uuid/modbus.h>
28 #include <make_unique.cpp>
35 uint16_t device, uint16_t timeout_ms) {
36 auto response = std::make_shared<ExceptionStatusResponse>();
38 if (device < DeviceAddressType::MIN_UNICAST
39 || device > DeviceAddressType::MAX_UNICAST) {
40 response->status(ResponseStatus::FAILURE_INVALID);
42 if (timeout_ms == 0) {
46 requests_.push_back(std::make_unique<Request>(device,
47 FunctionCode::READ_EXCEPTION_STATUS, timeout_ms, response));
55 return ResponseStatus::FAILURE_LENGTH;
60 return ResponseStatus::SUCCESS;