IoT::Devices

class CompositeImpl

File Information

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

Description

Default implementation of a Composite device.

This class listens to the service registry and maintains its list of fragments.

For a Device to be added as a fragment to a CompositeImpl, the device's service properties must include a property named "io.macchina.composite" with the value having the registered service name of the containing Composite.

Inheritance

Direct Base Classes: DeviceImpl < Composite, CompositeImpl >

All Base Classes: DeviceImpl < Composite, CompositeImpl >

Member Summary

Member Functions: fragmentByName, fragments, getCustomData, getName, getSymbolicName, getType, onServiceRegistered, onServiceUnregistered, setCustomData

Constructors

CompositeImpl

CompositeImpl() = delete;

CompositeImpl

CompositeImpl(
    const std::string & serviceName,
    const std::string & compositeName,
    Poco::OSP::ServiceRegistry & registry
);

Creates the CompositeImpl, using the given ServiceRegistry.

Destructor

~CompositeImpl

~CompositeImpl();

Destroys the CompositeImpl.

Member Functions

fragmentByName

Poco::Optional < std::string > fragmentByName(
    const std::string & name
) const;

fragments

std::vector < std::string > fragments() const;

getCustomData protected

Poco::Any getCustomData(
    const std::string & param73
) const;

getName protected

Poco::Any getName(
    const std::string & param70
) const;

getSymbolicName protected

Poco::Any getSymbolicName(
    const std::string & param72
) const;

getType protected

Poco::Any getType(
    const std::string & param71
) const;

onServiceRegistered protected

void onServiceRegistered(
    const Poco::OSP::ServiceRef::Ptr & pServiceRef
);

onServiceUnregistered protected

void onServiceUnregistered(
    const Poco::OSP::ServiceRef::Ptr & pServiceRef
);

setCustomData protected

void setCustomData(
    const std::string & name,
    const Poco::Any & value
);

Variables

SYMBOLIC_NAME static

static const std::string SYMBOLIC_NAME;

TYPE static

static const std::string TYPE;

Securely control IoT edge devices from anywhere   Connect a Device