|
xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
|
A description of a Xentara attribute. More...
#include <xentara/workbench/model/Attribute.hpp>
Public Types | |
| enum class | Access { ReadOnly , WriteOnly , ReadWrite } |
| An Access type for an attribute. More... | |
Public Member Functions | |
| template<std::convertible_to< std::string_view > Name> | |
| Attribute (Name &&name, Access access, data::DataType dataType, io::Directions ioDirections={}) | |
| Constructor. | |
| Attribute (std::string &&name, Access access, data::DataType dataType, io::Directions ioDirections={}) | |
| Constructor that moves a name from an existing std::string. | |
| constexpr auto | name () const noexcept -> std::string_view |
| Gets the name. | |
| auto | access () const -> Access |
| Gets the access modes. | |
| auto | dataType () const -> const data::DataType & |
| Gets the data type. | |
| auto | ioDirections () const -> io::Directions |
| Gets the relevant I/O directions. | |
| auto | changeEvent () const &noexcept -> const process::Event & |
| Gets the change event associated with this attribute. | |
| auto | changeEvent () &&noexcept -> process::Event && |
| Gets the change event associated with this attribute. | |
Reconfiguring the Attribute | |
| auto | setAccess (Access access) -> bool |
| Sets the access modes. | |
| auto | setDataType (const data::DataType &dataType) -> bool |
| Sets the data type. | |
Static Public Attributes | |
Standard Attributes | |
| static const Attribute | kPrimaryKey |
| The attribute for the primary key of an element. | |
| static const Attribute | kName |
| The attribute for the name of an element. | |
| static const Attribute | kUuid |
| The attribute for the UUID of an element. | |
| static const Attribute | kType |
| The attribute for the type (class) of an element. | |
| static const Attribute | kCategory |
| The attribute for the element category of an element. | |
| static const Attribute | kSourceTime |
| The attribute for the time stamp of a value provided by the data source, like the device. | |
| static const Attribute | kUpdateTime |
| The attribute for the update time stamp of a value. | |
| static const Attribute | kChangeTime |
| The attribute for the change time stamp of a value. | |
| static const Attribute | kWriteTime |
| The attribute for the time stamp of the last attempted write operation of an output. | |
| static const Attribute | kQuality |
| The attribute for the quality of a value. | |
| static const Attribute | kDeviceState |
| The attribute for the state of a device. | |
Standard Attributes with Templated Properties | |
| template<Access kAccess, data::PrimitiveType kType, int kBitSize = defaultBitSize(kType)> | |
| static const Attribute | kValue |
| The attribute for a value. | |
| template<data::PrimitiveType kType, int kBitSize = defaultBitSize(kType)> | |
| static const Attribute | kError |
| The attribute for an error. | |
| template<data::PrimitiveType kType, int kBitSize = defaultBitSize(kType)> | |
| static const Attribute | kWriteError |
| The attribute for a write error. | |
Standard Names | |
| static const std::string | kAddress |
| The standard name for an address. | |
| static const std::string | kOffset |
| The standard name for an offset. | |
| static const std::string | kLength |
| The standard name for a length. | |
| static const std::string | kChannel |
| The standard name for a channel. | |
| static const std::string | kDataType |
| The role for a data type. | |
A description of a Xentara attribute.
|
strong |
|
explicit |
Constructor.
| name | The name of the event, in UTF-8 encoding. |
| access | The possible access modes for the attribute |
| dataType | The data type of the attribute |
| ioDirections | The I/O directions. The I/O directions are used for I/O attributes to specify whether a data point should inherit this attribute from its attached input and/or output. |
|
explicit |
Constructor that moves a name from an existing std::string.
| name | The name of the event, in UTF-8 encoding. |
| access | The possible access modes for the attribute |
| dataType | The data type of the attribute |
| ioDirections | The I/O directions. The I/O directions are used for I/O attributes to specify whether a data point should inherit this attribute from its attached input and/or output. |
| auto xentara::workbench::model::Attribute::access | ( | ) | const -> Access |
Gets the access modes.
|
noexcept |
Gets the change event associated with this attribute.
|
noexcept |
Gets the change event associated with this attribute.
| auto xentara::workbench::model::Attribute::dataType | ( | ) | const -> const data::DataType & |
Gets the data type.
| auto xentara::workbench::model::Attribute::ioDirections | ( | ) | const -> io::Directions |
Gets the relevant I/O directions.
|
constexprnoexcept |
Gets the name.
| auto xentara::workbench::model::Attribute::setAccess | ( | Access | access | ) | -> bool |
Sets the access modes.
| access | The new access modes |
| auto xentara::workbench::model::Attribute::setDataType | ( | const data::DataType & | dataType | ) | -> bool |
Sets the data type.
| dataType | The new data type |
|
static |
The standard name for an address.
|
static |
The attribute for the element category of an element.
|
static |
The attribute for the change time stamp of a value.
|
static |
The standard name for a channel.
|
static |
The role for a data type.
|
static |
The attribute for the state of a device.
|
static |
The attribute for an error.
| kType | The primitive type of the attribute’s value |
| kBitSize | The bit size of the attribute’s value |
|
static |
The standard name for a length.
|
static |
The attribute for the name of an element.
|
static |
The standard name for an offset.
|
static |
The attribute for the primary key of an element.
|
static |
The attribute for the quality of a value.
|
static |
The attribute for the time stamp of a value provided by the data source, like the device.
|
static |
The attribute for the type (class) of an element.
|
static |
The attribute for the update time stamp of a value.
|
static |
The attribute for the UUID of an element.
|
static |
The attribute for a value.
| kAccess | The possible access modes for the attribute |
| kType | The primitive type of the attribute’s value |
| kBitSize | The bit size of the attribute’s value |
|
static |
The attribute for a write error.
| kType | The primitive type of the attribute’s value |
| kBitSize | The bit size of the attribute’s value |
|
static |
The attribute for the time stamp of the last attempted write operation of an output.