|
MC Protocol Serial C++ 0.2.3
MC protocol serial library for MCU-oriented environments
|
Namespaces | |
| namespace | detail |
Classes | |
| struct | RandomReadSpec |
| String-address spec used to build sparse random-read or monitor requests. More... | |
| struct | RandomWriteBitSpec |
| String-address spec used to build sparse random bit-write items. More... | |
| struct | RandomWriteWordSpec |
| String-address spec used to build sparse random word-write items. More... | |
Functions | |
| constexpr ProtocolConfig | make_c4_binary_protocol (PlcSeries series=PlcSeries::Q_L) noexcept |
Returns a practical default for Q/L-era Format5 / Binary / C4. | |
| constexpr ProtocolConfig | make_c4_ascii_format4_protocol (PlcSeries series=PlcSeries::Q_L) noexcept |
Returns a practical default for Format4 / ASCII / C4. | |
| constexpr ProtocolConfig | make_c4_ascii_format2_protocol (PlcSeries series=PlcSeries::Q_L) noexcept |
Returns a practical default for Format2 / ASCII / C4. | |
| Status | parse_device_address (std::string_view text, DeviceAddress &out_device) noexcept |
Parses a plain MC device string such as D100, M100, X10, or B20. | |
| Status | make_batch_read_words_request (std::string_view head_device, std::uint16_t points, BatchReadWordsRequest &out_request) noexcept |
Builds a contiguous word-read request from a string address such as D100. | |
| Status | make_batch_read_bits_request (std::string_view head_device, std::uint16_t points, BatchReadBitsRequest &out_request) noexcept |
Builds a contiguous bit-read request from a string address such as M100. | |
| Status | make_batch_write_words_request (std::string_view head_device, std::span< const std::uint16_t > words, BatchWriteWordsRequest &out_request) noexcept |
Builds a contiguous word-write request from a string address such as D100. | |
| Status | make_batch_write_bits_request (std::string_view head_device, std::span< const BitValue > bits, BatchWriteBitsRequest &out_request) noexcept |
Builds a contiguous bit-write request from a string address such as M100. | |
| Status | make_random_read_item (std::string_view device, RandomReadItem &out_item, bool double_word=false) noexcept |
| Builds one sparse random-read item from a string address. | |
| Status | make_random_write_word_item (std::string_view device, std::uint32_t value, RandomWriteWordItem &out_item, bool double_word=false) noexcept |
| Builds one sparse random word-write item from a string address. | |
| Status | make_random_write_bit_item (std::string_view device, BitValue value, RandomWriteBitItem &out_item) noexcept |
| Builds one sparse random bit-write item from a string address. | |
| Status | make_random_read_request (std::span< const RandomReadSpec > specs, std::span< RandomReadItem > out_items, RandomReadRequest &out_request) noexcept |
| Builds a sparse random-read request from string-address specs. | |
| Status | make_monitor_registration (std::span< const RandomReadSpec > specs, std::span< RandomReadItem > out_items, MonitorRegistration &out_request) noexcept |
| Builds a sparse monitor registration payload from string-address specs. | |
| Status | make_random_write_word_items (std::span< const RandomWriteWordSpec > specs, std::span< RandomWriteWordItem > out_items, std::span< const RandomWriteWordItem > &out_item_view) noexcept |
| Builds sparse random word-write items from string-address specs. | |
| Status | make_random_write_bit_items (std::span< const RandomWriteBitSpec > specs, std::span< RandomWriteBitItem > out_items, std::span< const RandomWriteBitItem > &out_item_view) noexcept |
| Builds sparse random bit-write items from string-address specs. | |
|
inlinenoexcept |
Builds a contiguous bit-read request from a string address such as M100.
Definition at line 269 of file high_level.hpp.
|
inlinenoexcept |
Builds a contiguous word-read request from a string address such as D100.
Definition at line 252 of file high_level.hpp.
|
inlinenoexcept |
Builds a contiguous bit-write request from a string address such as M100.
Definition at line 303 of file high_level.hpp.
|
inlinenoexcept |
Builds a contiguous word-write request from a string address such as D100.
Definition at line 286 of file high_level.hpp.
|
constexprnoexcept |
Returns a practical default for Format2 / ASCII / C4.
Format2 is the Format1 style ENQ/ACK/NAK/STX/ETX link with an extra 1-byte block number inserted before the frame ID. The default block number is 0x00; change ProtocolConfig::ascii_block_number if the host side needs a different value.
Definition at line 175 of file high_level.hpp.
|
constexprnoexcept |
Returns a practical default for Format4 / ASCII / C4.
Definition at line 149 of file high_level.hpp.
|
constexprnoexcept |
Returns a practical default for Q/L-era Format5 / Binary / C4.
Definition at line 127 of file high_level.hpp.
|
inlinenoexcept |
Builds a sparse monitor registration payload from string-address specs.
The resulting payload is intended for 0801. Readback still happens through the normal monitor read API.
Definition at line 402 of file high_level.hpp.
|
inlinenoexcept |
Builds one sparse random-read item from a string address.
Definition at line 320 of file high_level.hpp.
|
inlinenoexcept |
Builds a sparse random-read request from string-address specs.
Use this when you want 0403 style sparse addressing without hand-filling RandomReadItem entries.
Definition at line 376 of file high_level.hpp.
|
inlinenoexcept |
Builds one sparse random bit-write item from a string address.
Definition at line 356 of file high_level.hpp.
|
inlinenoexcept |
Builds sparse random bit-write items from string-address specs.
Definition at line 443 of file high_level.hpp.
|
inlinenoexcept |
Builds one sparse random word-write item from a string address.
Definition at line 337 of file high_level.hpp.
|
inlinenoexcept |
Builds sparse random word-write items from string-address specs.
Definition at line 419 of file high_level.hpp.
|
inlinenoexcept |
Parses a plain MC device string such as D100, M100, X10, or B20.
This helper is intentionally limited to plain device syntax. It does not parse Jn\\... link- direct addresses or helper-qualified U...\\G... addresses.
Definition at line 216 of file high_level.hpp.