|
moddef-cpp
Idiomatic C++ runtime for ModDef
|
Namespaces | |
| namespace | detail |
Classes | |
| class | Device |
| A device bound to a transport: read and write its points by id. More... | |
| class | Document |
| A parsed ModDef document. More... | |
| class | Transport |
| Blocking register-level transport. More... | |
| class | Value |
A decoded point value: a typed view over the C core's md_value_t. More... | |
Typedefs | |
| template<class T > | |
| using | Result = std::expected< T, Error > |
The canonical result type across the API; Result<void> for actions. | |
Enumerations | |
| enum class | Error : int { Ok = MD_OK , Transport = MD_ERR_TRANSPORT , Parse = MD_ERR_PARSE , NotFound = MD_ERR_NOT_FOUND , ShortRead = MD_ERR_SHORT_READ , Buffer = MD_ERR_BUFFER , UnresolvedRef = MD_ERR_UNRESOLVED_REF , ZeroScaleDenominator = MD_ERR_ZERO_SCALE_DEN , ComposedBase = MD_ERR_COMPOSED_BASE , NotWritable = MD_ERR_NOT_WRITABLE , WrongType = MD_ERR_WRONG_TYPE , Unsupported = MD_ERR_UNSUPPORTED , ConstraintMin = MD_ERR_CONSTRAINT_MIN , ConstraintMax = MD_ERR_CONSTRAINT_MAX , ConstraintStep = MD_ERR_CONSTRAINT_STEP , ConstraintAllowed = MD_ERR_CONSTRAINT_ALLOWED , Discovery = MD_ERR_DISCOVERY , Unavailable = MD_ERR_UNAVAILABLE } |
Strongly typed mirror of md_err_t (same underlying values, so casts are free in both directions). More... | |
| enum class | ValueKind : std::uint8_t { F64 = MD_VAL_F64 , U64 = MD_VAL_U64 , I64 = MD_VAL_I64 , Bool = MD_VAL_BOOL , Flags = MD_VAL_FLAGS , Fields = MD_VAL_FIELDS , DateTime = MD_VAL_DATETIME , Unavailable = MD_VAL_UNAVAILABLE } |
Functions | |
| Error | from_c (md_err_t e) noexcept |
| md_err_t | to_c (Error e) noexcept |
| std::string_view | to_string (Error e) noexcept |
| template<class T > | |
| Result< T > | ok_or (md_err_t e, T value) |
| Result< void > | check (md_err_t e) |
| md_str_t | to_c (std::string_view s) noexcept |
| std::string_view | from_c (md_str_t s) noexcept |
| using moddef::Result = typedef std::expected<T, Error> |
The canonical result type across the API; Result<void> for actions.
|
strong |
Strongly typed mirror of md_err_t (same underlying values, so casts are free in both directions).
|
strong |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |