MC Protocol Serial C++ 0.2.3
MC protocol serial library for MCU-oriented environments
Loading...
Searching...
No Matches
mcprotocol::serial::ProtocolConfig Struct Reference

Top-level protocol configuration shared by codecs and client requests. More...

#include <types.hpp>

Public Attributes

FrameKind frame_kind = FrameKind::C4
 Selected serial frame family.
 
CodeMode code_mode = CodeMode::Binary
 Selected payload encoding inside the frame.
 
AsciiFormat ascii_format = AsciiFormat::Format3
 Selected ASCII framing flavor when code_mode == CodeMode::Ascii.
 
std::uint8_t ascii_block_number = 0x00
 
PlcSeries target_series = PlcSeries::Q_L
 PLC family used for device and subcommand differences.
 
bool sum_check_enabled = true
 Enables or disables the ASCII/binary sum-check where that frame family supports it.
 
RouteConfig route {}
 Route header fields used for every encoded request.
 
TimeoutConfig timeout {}
 Request timeout policy used by the async client and stream decoder.
 

Detailed Description

Top-level protocol configuration shared by codecs and client requests.

Treat this as the immutable session configuration for one serial link. The same object is used by:

Definition at line 323 of file types.hpp.

Member Data Documentation

◆ ascii_block_number

std::uint8_t mcprotocol::serial::ProtocolConfig::ascii_block_number = 0x00

Block number used only by ASCII Format2 on 2C/3C/4C.

The external device chooses this value in the range 0x00..0xFF. It is ignored by Format1, Format3, Format4, binary Format5, 1C, and 1E.

Definition at line 334 of file types.hpp.

◆ ascii_format

AsciiFormat mcprotocol::serial::ProtocolConfig::ascii_format = AsciiFormat::Format3

Selected ASCII framing flavor when code_mode == CodeMode::Ascii.

Definition at line 329 of file types.hpp.

◆ code_mode

CodeMode mcprotocol::serial::ProtocolConfig::code_mode = CodeMode::Binary

Selected payload encoding inside the frame.

Definition at line 327 of file types.hpp.

◆ frame_kind

FrameKind mcprotocol::serial::ProtocolConfig::frame_kind = FrameKind::C4

Selected serial frame family.

Definition at line 325 of file types.hpp.

◆ route

RouteConfig mcprotocol::serial::ProtocolConfig::route {}

Route header fields used for every encoded request.

Definition at line 340 of file types.hpp.

◆ sum_check_enabled

bool mcprotocol::serial::ProtocolConfig::sum_check_enabled = true

Enables or disables the ASCII/binary sum-check where that frame family supports it.

Definition at line 338 of file types.hpp.

◆ target_series

PlcSeries mcprotocol::serial::ProtocolConfig::target_series = PlcSeries::Q_L

PLC family used for device and subcommand differences.

Definition at line 336 of file types.hpp.

◆ timeout

TimeoutConfig mcprotocol::serial::ProtocolConfig::timeout {}

Request timeout policy used by the async client and stream decoder.

Definition at line 342 of file types.hpp.


The documentation for this struct was generated from the following file: