My Project
|
#include <uuid/modbus.h>
Public Member Functions | |
Request (uint16_t device, uint8_t function_code, uint16_t timeout_ms, const std::shared_ptr< Response > &response) | |
Create a new request message (not directly useful). More... | |
virtual uint16_t | encode (frame_buffer_t &frame) |
Encode this request and store it in a message frame buffer. More... | |
uint16_t | device () const |
Get the destination device address. More... | |
uint8_t | function_code () const |
Get the function code of the request. More... | |
uint16_t | timeout_ms () const |
Get the timeout to wait for a response in milliseconds. More... | |
Response & | response () const |
Get the response object. More... | |
Private Attributes | |
const uint16_t | device_ |
const uint8_t | function_code_ |
const uint16_t | timeout_ms_ |
const std::shared_ptr< Response > | response_ |
Request message.
This will be created when a request is submitted and then discarded when the response is updated with the outcome.
uuid::modbus::Request::Request | ( | uint16_t | device, |
uint8_t | function_code, | ||
uint16_t | timeout_ms, | ||
const std::shared_ptr< Response > & | response | ||
) |
Create a new request message (not directly useful).
[in] | device | Destination device address. |
[in] | function_code | Function code of the request. |
[in] | timeout_ms | Timeout to wait for a response in milliseconds. |
[in] | response | Response object. |
Definition at line 32 of file generic_functions.cpp.
|
inline |
|
virtual |
Encode this request and store it in a message frame buffer.
[out] | frame | Message frame buffer. |
Reimplemented in uuid::modbus::RegisterRequest.
Definition at line 38 of file generic_functions.cpp.
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |