IoT::Devices

class IDeviceTree

File Information

Library: IoT/Devices
Package: Generated
Header: IoT/Devices/IDeviceTree.h

Description

This class manages a hierarchical structure of devices, consisting of Composite and leaf Device objects.

Inheritance

Direct Base Classes: Poco::OSP::Service

All Base Classes: Poco::OSP::Service, Poco::RefCountedObject

Known Derived Classes: DeviceTreeRemoteObject

Member Summary

Member Functions: deviceById, deviceByPath, findDeviceById, findDeviceByPath, isA, remoting__typeId, type

Inherited Functions: duplicate, isA, referenceCount, release, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < IDeviceTree >;

Constructors

IDeviceTree

IDeviceTree();

Creates a IDeviceTree.

Destructor

~IDeviceTree virtual

virtual ~IDeviceTree();

Destroys the IDeviceTree.

Member Functions

deviceById virtual

virtual IoT::Devices::DeviceNode deviceById(
    const std::string & id
) const = 0;

Returns the DeviceNode of the device with the given device identifier.

Throws a Poco::NotFoundException if no DeviceNode is available for the given device identifier.

deviceByPath virtual

virtual IoT::Devices::DeviceNode deviceByPath(
    const std::string & path
) const = 0;

Returns the DeviceNode of the device with the given path. The path name is composed of the instance names of all parent composite devices, as well as the device's instance name, separated by "/".

To obtain the root device, which is always a Composite, specify "/" or "" as pathName.

Throws a Poco::NotFoundException if no DeviceNode is available for the given pathName.

findDeviceById virtual

virtual Poco::Optional < IoT::Devices::DeviceNode > findDeviceById(
    const std::string & id
) const = 0;

Returns the DeviceNode of the device with the given device identifier, if it exists.

findDeviceByPath virtual

virtual Poco::Optional < IoT::Devices::DeviceNode > findDeviceByPath(
    const std::string & path
) const = 0;

Returns the DeviceNode of the device with the given path, if it exists. The path name is composed of the instance names of all parent composite devices, as well as the device's instance name, separated by "/".

To obtain the root device, which is always a Composite, specify "/" or "" as pathName.

isA virtual

bool isA(
    const std::type_info & otherType
) const;

Returns true if the class is a subclass of the class given by otherType.

remoting__typeId static

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

Returns the TypeId of the class.

type virtual

const std::type_info & type() const;

Returns the type information for the object's class.

Securely control IoT edge devices from anywhere   Connect a Device