|
moddef-cpp
Idiomatic C++ runtime for ModDef
|
A device bound to a transport: read and write its points by id. More...
#include <device.hpp>
Public Member Functions | |
| Result< Value > | read (std::string_view point_id) |
| Read and decode a point (numeric / bool / flags / fields / datetime). | |
| Result< std::string_view > | read_string (std::string_view point_id, std::span< char > buf) |
Read a string point (§15) into buf; returns a view into buf. | |
| Result< void > | write_f64 (std::string_view point_id, double value) |
| Encode and write; validates access mode and §11.4 constraints first. | |
| Result< void > | write_i64 (std::string_view point_id, std::int64_t value) |
| Result< void > | write_bool (std::string_view point_id, bool on) |
| Device (Device &&o) noexcept | |
| Device & | operator= (Device &&o) noexcept |
| Device (const Device &)=delete | |
| Device & | operator= (const Device &)=delete |
Static Public Member Functions | |
| static Result< Device > | open (const Document &doc, std::string_view device_id, Transport &transport) |
Bind transport to the named profile in doc (empty id = first). | |
A device bound to a transport: read and write its points by id.
Movable; non-copyable.
|
inlinenoexcept |
|
delete |
|
inlinestatic |
Bind transport to the named profile in doc (empty id = first).
Both doc and transport must outlive the Device.
Read and decode a point (numeric / bool / flags / fields / datetime).
|
inline |
Read a string point (§15) into buf; returns a view into buf.
|
inline |
Encode and write; validates access mode and §11.4 constraints first.
|
inline |
|
inline |