File Information
Library: IoT/Devices
Package: Devices
Header: IoT/Devices/DeviceTree.h
Description
Inheritance
Known Derived Classes: DeviceTreeImpl
Member Summary
Member Functions: deviceById, deviceByPath, findDeviceById, findDeviceByPath
Constructors
DeviceTree
DeviceTree();
Creates the DeviceTree.
Destructor
~DeviceTree
virtual ~DeviceTree();
Destroys the DeviceTree.
Member Functions
deviceById
virtual 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 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 Poco::Optional < DeviceNode > findDeviceById(
const std::string & id
) const = 0;
Returns the DeviceNode of the device with the given device identifier, if it exists.
findDeviceByPath
virtual Poco::Optional < 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.