OcaUint64Sensor#
This document describes the controller implementation of OcaUint64Sensor. This class is documented in the AES70 standard as:
64-bit unsigned integer sensor
Overview#
- ClassID: 1.1.2.1.9
- Header:
aes70/controller/OcaUint64Sensor.hpp
- Namespace:
aes70::controller
- Inheritance: aes70::controller::OcaBasicSensor, aes70::controller::OcaSensor, aes70::controller::OcaWorker, aes70::controller::OcaRoot, aes70::controller::object
Class Declaration#
namespace aes70::controller
{
class OcaUint64Sensor : public OcaBasicSensor
{
public:
OcaUint64Sensor(std::shared_ptr<connection> connection,
uin32_t object_number);
OcaUint64Sensor(const OcaUint64Sensor &o);
// Control Methods
// Calls GetReading and calls on_result or on_failure
void GetReading(auto on_result, failure_callback on_failure);
// Observing Properties
subscription observeReading(auto callback, failure_callback on_failure);
// Property Changed Subscriptions
subscription OnReadingChanged(auto callback, failure_callback on_failure);
};
}
Methods#
GetReading#
void GetReading(auto on_result, failure_callback on_failure)
Calls the method GetReading in the remote device.
Parameters:#
auto on_result
: A callable (e.g. a lambda) with the following arguments:OcaUint64 Reading
OcaUint64 minReading
OcaUint64 maxReading
failure_callback on_failure
: A callback which is called on error.
observeReading#
subscription observeReading(auto callback, failure_callback on_failure)
Fetches the remote property Reading and subscribes for modifications. The callback is called with the initial values of Reading and whenever it changes.
Parameters:#
auto callback
: A callable (e.g. a lambda) with one argument:OcaUint64 Reading
failure_callback on_failure
: A callback which is called on error.
OnReadingChanged#
subscription OnReadingChanged(auto callback, failure_callback on_failure)
Parameters#
auto callback
: A callable (e.g. a lambda) with one argument:OcaUint64 Reading
failure_callback on_failure
: A callback which is called on error.