IoT::DeviceStatus

class DeviceStatusServiceRemoteObject

File Information

Library: IoT/DeviceStatus
Package: Generated
Header: IoT/DeviceStatus/DeviceStatusServiceRemoteObject.h

Description

The DeviceStatusService keeps track of the current operational status of a device.

Inheritance

Direct Base Classes: IDeviceStatusService, Poco::RemotingNG::RemoteObject

All Base Classes: IDeviceStatusService, Poco::OSP::Service, Poco::RefCountedObject, Poco::RemotingNG::Identifiable, Poco::RemotingNG::RemoteObject

Member Summary

Member Functions: acknowledge, acknowledgeUpTo, clearStatus, clearStatusOfSource, event__statusChanged, event__statusUpdated, messages, postStatus, postStatusAsync, remoting__enableEvents, remoting__enableRemoteEvents, remoting__hasEvents, remoting__typeId, remove, reset, status, statusOfSource

Inherited Functions: acknowledge, acknowledgeUpTo, clearStatus, clearStatusOfSource, duplicate, isA, messages, mutex, postStatus, postStatusAsync, referenceCount, release, remoting__enableEvents, remoting__enableRemoteEvents, remoting__getURI, remoting__hasEvents, remoting__objectId, remoting__setURI, remoting__typeId, remove, reset, status, statusOfSource, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < DeviceStatusServiceRemoteObject >;

Constructors

DeviceStatusServiceRemoteObject

DeviceStatusServiceRemoteObject(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    Poco::SharedPtr < IoT::DeviceStatus::DeviceStatusService > pServiceObject
);

Destructor

~DeviceStatusServiceRemoteObject virtual

virtual ~DeviceStatusServiceRemoteObject();

Member Functions

acknowledge virtual inline

IoT::DeviceStatus::DeviceStatus acknowledge(
    Poco::Int64 id
);

Marks the message with the given ID as acknowledged, if it is acknowledgeable.

Returns the new device status.

acknowledgeUpTo virtual inline

IoT::DeviceStatus::DeviceStatus acknowledgeUpTo(
    Poco::Int64 id
);

Marks all acknowledgeable messages up to (and including) the given ID as acknowledged.

Returns the new device status.

clearStatus virtual inline

IoT::DeviceStatus::DeviceStatus clearStatus(
    const std::string & messageClass
);

Clears the status update with the given messageClass and removes it from the message history.

Returns the new device status.

clearStatusOfSource virtual inline

IoT::DeviceStatus::DeviceStatus clearStatusOfSource(
    const std::string & source
);

Clears all status updates with the given source and removes them from the message history.

Returns the new device status.

messages virtual inline

std::vector < IoT::DeviceStatus::StatusMessage > messages(
    int maxMessages = int (0)
) const;

Retrieves stored status messages. If maxMessages is > 0, will at most return maxMessages messages.

postStatus virtual inline

IoT::DeviceStatus::DeviceStatusChange postStatus(
    const IoT::DeviceStatus::StatusUpdate & statusUpdate
);

Updates the device status.

Returns a DeviceStatusChange structure.

postStatusAsync virtual inline

virtual void postStatusAsync(
    const IoT::DeviceStatus::StatusUpdate & statusUpdate
);

Updates the device status asynchronously.

The actual status update in the database will be done asynchronously in a separate thread.

remoting__enableEvents virtual

virtual std::string remoting__enableEvents(
    Poco::RemotingNG::Listener::Ptr pListener,
    bool enable = bool (true)
);

remoting__enableRemoteEvents virtual

virtual void remoting__enableRemoteEvents(
    const std::string & protocol
);

remoting__hasEvents virtual

virtual bool remoting__hasEvents() const;

remoting__typeId virtual inline

virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;

remove virtual inline

IoT::DeviceStatus::DeviceStatus remove(
    Poco::Int64 id
);

Removes the message with the given ID from the message history.

Returns the new device status.

reset virtual inline

virtual void reset();

Resets the device status to DEVICE_STATUS_OK and removes all messages.

status virtual inline

IoT::DeviceStatus::DeviceStatus status() const;

Returns the current global device status.

Only unacknowledged status updates are considered in determining the current status.

statusOfSource virtual inline

IoT::DeviceStatus::DeviceStatus statusOfSource(
    const std::string & source
) const;

Returns the current source-specific device status, considering only status updates with the given source.

Only unacknowledged status updates are considered in determining the current status.

event__statusChanged protected

void event__statusChanged(
    const IoT::DeviceStatus::DeviceStatusChange & data
);

event__statusUpdated protected

void event__statusUpdated(
    const IoT::DeviceStatus::DeviceStatusChange & data
);

Securely control IoT edge devices from anywhere   Connect a Device