IoT::Devices

class Counter

File Information

Library: IoT/Devices
Package: Devices
Header: IoT/Devices/Counter.h

Description

A counter counts events.

Inheritance

Direct Base Classes: Device

All Base Classes: Device

Known Derived Classes: RotaryEncoder

Member Summary

Member Functions: count, reset

Inherited Functions: getFeature, getPropertyBool, getPropertyDouble, getPropertyInt, getPropertyInt16, getPropertyInt64, getPropertyString, getPropertyTimestamp, hasFeature, hasProperty, setFeature, setPropertyBool, setPropertyDouble, setPropertyInt, setPropertyInt16, setPropertyInt64, setPropertyString, setPropertyTimestamp

Types Aliases

CounterType

using CounterType = Poco::Int32;

Constructors

Counter

Counter();

Creates the Counter.

Destructor

~Counter virtual

~Counter();

Destroys the Counter.

Member Functions

count virtual

virtual CounterType count() const = 0;

Returns the current value of the counter.

reset virtual

virtual CounterType reset() = 0;

Returns the current value of the counter and sets the counter to 0.

Variables

countChanged

Poco::BasicEvent < const CounterType > countChanged;

Fired when the counter has changed.

Securely control IoT edge devices from anywhere   Connect a Device