|
BAOS SDK
18.2.0
|
Cache for Baos Datapoint Descriptions Holds BaosDatapointDescriptions so we don't have to continually read them from the remote device. More...
#include <BaosDatapointDescriptions.h>
Public Member Functions | |
| DatapointDescriptionHolder () | |
| Creates a default DatapointDescriptionHolder. More... | |
| ~DatapointDescriptionHolder () | |
| Destroys the DatapointDescriptionHolder. More... | |
| BaosDatapointDescription | get (std::shared_ptr< BaosConnector > connector, unsigned short id) |
| Gets the description associated with the datapoint id. More... | |
| void | clear () |
| empties the cache for all devices More... | |
| void | clear (const std::shared_ptr< BaosConnector > connector) |
| empties the cache for a given connector More... | |
| void | enable (bool enabled=true) |
| enable/disable the caching mechanism by default the cache is enabled More... | |
| void | disable () |
| disable the cache, the description will always be read from the bus More... | |
Static Public Member Functions | |
| static DatapointDescriptionHolder & | instance () |
Cache for Baos Datapoint Descriptions Holds BaosDatapointDescriptions so we don't have to continually read them from the remote device.
If a description is available it is returned, otherwise it is read from the device. Subsequence reads will return the description without reading from the device. This is a singleton class.
| DatapointDescriptionHolder::DatapointDescriptionHolder | ( | ) |
Creates a default DatapointDescriptionHolder.
| DatapointDescriptionHolder::~DatapointDescriptionHolder | ( | ) |
Destroys the DatapointDescriptionHolder.
| void DatapointDescriptionHolder::clear | ( | ) |
empties the cache for all devices
| void DatapointDescriptionHolder::clear | ( | const std::shared_ptr< BaosConnector > | connector | ) |
empties the cache for a given connector
| void DatapointDescriptionHolder::disable | ( | ) |
disable the cache, the description will always be read from the bus
| void DatapointDescriptionHolder::enable | ( | bool | enabled = true | ) |
enable/disable the caching mechanism by default the cache is enabled
| BaosDatapointDescription DatapointDescriptionHolder::get | ( | std::shared_ptr< BaosConnector > | connector, |
| unsigned short | id | ||
| ) |
Gets the description associated with the datapoint id.
Either locally from the cache, or remotely from the device if not in the cache
|
static |
1.8.11