![]() |
dnp3 (C++ API) 1.6.0
|
Custom request. More...
#include <dnp3.hpp>
Public Member Functions | |
| Request (Request &&other) noexcept | |
| Transfer ownership of the underlying C-type to this instance and invalidate the other instance. More... | |
| Request () | |
| Create a new request. More... | |
| ~Request () | |
| Destroy a request created with Request::Request() or Request::class_request(). More... | |
| void | add_one_byte_range_header (Variation variation, uint8_t start, uint8_t stop) |
| Add a one-byte start/stop header for use with a READ request. More... | |
| void | add_two_byte_range_header (Variation variation, uint16_t start, uint16_t stop) |
| Add a two-byte start/stop header for use with a READ request. More... | |
| void | add_all_objects_header (Variation variation) |
| Add an all objects variation request. More... | |
| void | add_one_byte_limited_count_header (Variation variation, uint8_t count) |
| Add a one-byte limited count variation header for use with a READ request. More... | |
| void | add_two_byte_limited_count_header (Variation variation, uint16_t count) |
| Add a two-byte limited count variation header for use with a READ request. More... | |
| void | add_time_and_interval (uint64_t time, uint32_t interval_ms) |
| Add a single g51v1 time-and-interval. More... | |
| void | add_specific_attribute (uint8_t variation, uint8_t set) |
| Add a one-byte start/stop header for use with a READ request. More... | |
| void | add_string_attribute (uint8_t variation, uint8_t set, const std::string &value) |
| Add a one-byte start/stop header containing for use with a WRITE request. More... | |
| void | add_uint_attribute (uint8_t variation, uint8_t set, uint32_t value) |
| Add a one-byte start/stop header containing for use with a WRITE request. More... | |
Static Public Member Functions | |
| static Request | class_request (bool class0, bool class1, bool class2, bool class3) |
| Create a new request asking for classes. More... | |
| static Request | all_objects (Variation variation) |
| Create a new request asking for all objects of a particular variation. More... | |
| static Request | one_byte_range (Variation variation, uint8_t start, uint8_t stop) |
| Create a new request asking for range of objects (using 8-bit start/stop). More... | |
| static Request | two_byte_range (Variation variation, uint16_t start, uint16_t stop) |
| Create a new request asking for range of objects (using 16-bit start/stop). More... | |
| static Request | one_byte_limited_count (Variation variation, uint8_t count) |
| Create a new request asking for a limited count of objects (using 8-bit start/stop). More... | |
| static Request | two_byte_limited_count (Variation variation, uint16_t count) |
| Create a new request asking for a limited count of objects (using 16-bit start/stop). More... | |
Friends | |
| class | CppRequestFriend |
Custom request.
Whenever a method takes a request as a parameter, the request is internally copied. Therefore, it is possible to reuse the same requests over and over.
|
inlinenoexcept |
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
| other | Class from which ownership will be transfer to this instance |
| dnp3::Request::Request | ( | ) |
Create a new request.
| dnp3::Request::~Request | ( | ) |
Destroy a request created with Request::Request() or Request::class_request().
| void dnp3::Request::add_all_objects_header | ( | Variation | variation | ) |
Add an all objects variation request.
| variation | Variation to ask for |
| void dnp3::Request::add_one_byte_limited_count_header | ( | Variation | variation, |
| uint8_t | count | ||
| ) |
Add a one-byte limited count variation header for use with a READ request.
| variation | Variation to ask for |
| count | Maximum number of events |
| void dnp3::Request::add_one_byte_range_header | ( | Variation | variation, |
| uint8_t | start, | ||
| uint8_t | stop | ||
| ) |
Add a one-byte start/stop header for use with a READ request.
| variation | Variation to ask for |
| start | Start index to ask |
| stop | Stop index to ask (inclusive) |
| void dnp3::Request::add_specific_attribute | ( | uint8_t | variation, |
| uint8_t | set | ||
| ) |
Add a one-byte start/stop header for use with a READ request.
| variation | Variation of the device attribute |
| set | The set (point) to which the attribute belongs |
| void dnp3::Request::add_string_attribute | ( | uint8_t | variation, |
| uint8_t | set, | ||
| const std::string & | value | ||
| ) |
Add a one-byte start/stop header containing for use with a WRITE request.
| variation | Variation of the attribute |
| set | The set (point) to which the attribute belongs |
| value | Value of the attribute |
| void dnp3::Request::add_time_and_interval | ( | uint64_t | time, |
| uint32_t | interval_ms | ||
| ) |
Add a single g51v1 time-and-interval.
This is useful when constructing freeze-at-time requests
| time | DNP3 48-bit timestamp representing count of milliseconds since epoch UTC |
| interval_ms | Interval expressed in milliseconds |
| void dnp3::Request::add_two_byte_limited_count_header | ( | Variation | variation, |
| uint16_t | count | ||
| ) |
Add a two-byte limited count variation header for use with a READ request.
| variation | Variation to ask for |
| count | Maximum number of events |
| void dnp3::Request::add_two_byte_range_header | ( | Variation | variation, |
| uint16_t | start, | ||
| uint16_t | stop | ||
| ) |
Add a two-byte start/stop header for use with a READ request.
| variation | Variation to ask for |
| start | Start index to ask |
| stop | Stop index to ask (inclusive) |
| void dnp3::Request::add_uint_attribute | ( | uint8_t | variation, |
| uint8_t | set, | ||
| uint32_t | value | ||
| ) |
Add a one-byte start/stop header containing for use with a WRITE request.
| variation | Variation of the attribute |
| set | The set (point) to which the attribute belongs |
| value | Value of the attribute |
Create a new request asking for all objects of a particular variation.
An identical request can be created manually with Request::Request() and Request::add_all_objects_header().
| variation | Variation to ask for |
|
static |
Create a new request asking for classes.
An identical request can be created manually with Request::add_all_objects_header() and variations Variation::group60_var1, Variation::group60_var2, Variation::group60_var3 and Variation::group60_var4.
| class0 | Ask for class 0 (static data) |
| class1 | Ask for class 1 events |
| class2 | Ask for class 2 events |
| class3 | Ask for class 3 events |
Create a new request asking for a limited count of objects (using 8-bit start/stop).
An identical request can be created manually with Request::Request() and Request::add_one_byte_limited_count_header().
| variation | Variation to ask for |
| count | Maximum number of events |
|
static |
Create a new request asking for range of objects (using 8-bit start/stop).
An identical request can be created manually with Request::Request() and Request::add_one_byte_range_header().
| variation | Variation to ask for |
| start | Start index to ask |
| stop | Stop index to ask (inclusive) |
Create a new request asking for a limited count of objects (using 16-bit start/stop).
An identical request can be created manually with Request::Request() and Request::add_two_byte_limited_count_header().
| variation | Variation to ask for |
| count | Maximum number of events |
|
static |
Create a new request asking for range of objects (using 16-bit start/stop).
An identical request can be created manually with Request::Request() and Request::add_two_byte_range_header().
| variation | Variation to ask for |
| start | Start index to ask |
| stop | Stop index to ask (inclusive) |