COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
comms::option::def::FailOnInvalid< TStatus > Struct Template Reference

#include "comms/options.h"

Detailed Description

template<comms::ErrorStatus TStatus = comms::ErrorStatus::InvalidMsgData>
struct comms::option::def::FailOnInvalid< TStatus >

Option that forces field's read operation to fail if invalid value is received.

Sometimes protocol is very strict about what field's values are allowed and forces to abandon a message if invalid value is received. If comms::option::def::FailOnInvalid is provided as an option to a field, the validity is going to checked automatically after the read. If invalid value is identified, error will be returned from the read() operation.

Template Parameters
TStatusError status to return when the content of the read field is invalid.

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