|
| BaosIp4Device (const std::string &ip4Address, std::uint16_t port=12004) |
| Construct a new Baos Ip 4 Device object from an ip address and a port. More...
|
|
void | setConnectionData (const std::string &ip4Address, std::uint16_t port=12004) |
| Construct a new Baos Ip 4 Device object from an ip address and a port. More...
|
|
BaosConnection_UPtr | getConnection () override |
| Get a BaosConnection to the device. More...
|
|
virtual void | close () |
|
ServerItemReadStrategy | setServerItemReadStrategy (ServerItemReadStrategy strategy) |
| Set the strategy to use for reading the serveritems. More...
|
|
bool | enableCaching (bool state) |
| Enable or Disable the internal caching for datapoint and parameter bytes. More...
|
|
bool | isCachingEnabled () const |
| Return the current caching state. More...
|
|
void | clearCaches () |
| Clear the internal caches for datapoints and parameter bytes.
|
|
bool | wasCacheHit () |
| Returns if the last request could be statisfied by the cache or not. More...
|
|
std::optional< DeviceMeta > | getMetaInfo () |
| Get the metadata set for this device if available. More...
|
|
void | setMetaInfo (DeviceMeta &&meta) |
| Set the meta data for this device. More...
|
|
void | registerServerItemCallback (ServerItemIndicationCb) |
| Register one or more functions ascallbacks, invoked on serveritem changes.
|
|
void | registerDPValueCallback (DatapointValueCb) |
| Register one or more functions ascallbacks, invoked on datapoint value changes.
|
|
DeviceStaticInfo | getStaticInfo (bool reload=false) |
| Get the information about a connected BAOS device that is never changed. Like serial number. More...
|
|
DeviceConfigInfo | getConfigInfo (bool reload=false) |
| Get the information about a connected BAOS device that is typically only changed during configuration. More...
|
|
DeviceRuntimeInfo | getRuntimeInfo (bool reload=false) |
| Get the information about a connected BAOS device that may change during runtime. More...
|
|
void | setBoolServerItem (protocol::ServerItemId id, bool value) |
| Set the a bool value to a server item. More...
|
|
protocol::ParameterBytes | getParameterBytes (std::uint16_t byteIndex=1, std::uint16_t numberOfBytes=UINT16_MAX, bool reload=false) |
| Get the parameter bytes If caching is enabled, the result of this call will be stored in cache. More...
|
|
protocol::ParameterBytes | getAllParameterBytes (bool reload=false) |
| Load all the parameter bytes and cache them. More...
|
|
std::optional< DatapointConfig > | getDpConfiguration (std::uint16_t dpId=1, bool withDescStrings=true, bool reload=false) |
| Get the datapoint configuration of a single datapoint If caching is enabled, the result of this call will be stored in cache. More...
|
|
DatapointConfigurations | getDpConfigurations (std::uint16_t startDpId=1, std::uint16_t endDpId=UINT16_MAX, bool withDescStrings=true, bool reload=false) |
| Get the datapoint configurations If caching is enabled, the result of this call will be stored in cache. More...
|
|
DatapointConfigurations | getAllDpConfigurations (bool reload=false) |
| Load all the datapoint configurations and cache them. More...
|
|
void | setDpValue (std::uint16_t dpId, Buffer dpData, protocol::DatapointSetCommand command=protocol::DatapointSetCommand::SetNewValueAndSendOnBus) |
| Set the value of a single datapoint. More...
|
|
void | setDpValues (std::map< std::uint16_t, Buffer > &&values, protocol::DatapointSetCommand command=protocol::DatapointSetCommand::SetNewValueAndSendOnBus) |
| Set the value of multiple datapoints. More...
|
|
void | readDpValueFromBus (std::uint16_t dpId) |
| Triggers a read request for the datapoint on the bus. More...
|
|
void | readDpValuesFromBus (std::vector< std::uint16_t > &&dpIds) |
| Triggers read requests for a set of datapoints on the bus. More...
|
|
std::optional< protocol::DatapointValue > | getDpValueRaw (std::uint16_t dpId, bool reload=false) |
| Get the value of a single datapoint as raw bytes. More...
|
|
template<class T > |
std::optional< T > | getDatapointValue (std::uint16_t dpId, bool reload=false) |
| Get the value of a single datapoint as type T. More...
|
|
protocol::DatapointValues | getDpValuesRaw (std::vector< std::uint16_t > dpIds, bool reload=false) |
| Get the values of multiple datapoints as raw bytes. More...
|
|
protocol::DatapointValues | getDpValuesRaw (std::uint16_t startDpId, std::uint16_t endDpId, bool reload=false, protocol::DatapointValueFilter filter=protocol::DatapointValueFilter::VALID) |
| Get the values of multiple datapoints as raw bytes. More...
|
|
protocol::DatapointValues | getAllDpValuesRaw (bool reload=false, protocol::DatapointValueFilter filter=protocol::DatapointValueFilter::VALID) |
| Load all the datapoint values and cache them. More...
|
|
Represents a BAOS IP4 device with an underlying TCP connection.
The connection information like ip address and the port can either be set in the constructor or later with setConnectionData. This has to be done before opening a the connection to the device.