Represents a BAOS IP4 device with an underlying TCP connection (with BAOS secure)
More...
|
| | BaosSecureIp4Device (const std::string &ip4Address, const PasswordHash &passwordHash, std::uint16_t port=12004) |
| | Construct a new Baos Ip 4 Device object from an ip address and a port. More...
|
| |
|
| BaosSecureIp4Device (const std::string &ip4Address, const PasswordHash &passwordHash, const AuthenticationCode &authenticationCode, std::uint16_t port=12004) |
| |
| BaosConnection_UPtr | getConnection () override |
| | Get a BaosConnection to the device. More...
|
| |
| void | setConnectionData (const std::string &ip4Address, const PasswordHash &passwordHash, std::uint16_t port=12004) |
| | Explicitly sets the connection data for a secure Baos Ip 4 Device object. More...
|
| |
| void | setConnectionData (const std::string &ip4Address, const PasswordHash &passwordHash, const AuthenticationCode &authenticationCode, std::uint16_t port=12004) |
| | Explicitly sets the connection data for a secure Baos Ip 4 Device object. More...
|
| |
| | 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) |
| | Explicitly sets the connection data for a Baos Ip 4 Device object from an ip address and a port. More...
|
| |
| void | enableEnsureAutoConnect (bool enable) |
| | Enables the option for ensure auto connect in legacy mode (e.g. 774.1 with auto connect mode). The default value is true (enabled). More...
|
| |
|
void | enableVerifyProtocolVersion (bool enable) |
| | Enables the option for verify the BAOS binary protocol version. The default value is true (enabled).
|
| |
| 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.
|
| |
|
void | registerConnectionEventCallback (ConnectionEventCb callback) |
| | Register one or more functions as callbacks, invoked on connection lifecycle events.
|
| |
| 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...
|
| |
| void | readDpValuesFromBus (const 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 (with BAOS secure)
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.
This connection type is supported by BAOS 774.1 when configured as auto-connect or unsecure BAOS 777.1 when configured as auto-connect or unsecure