IoT::BtLE

class PeripheralManagerRemoteObject

File Information

Library: IoT/BtLE
Package: Generated
Header: IoT/BtLE/PeripheralManagerRemoteObject.h

Description

This class manages Peripheral objects in the service registry.

Given the address of a Bt LE Peripheral device, the findPeripheral() method will return an existing Peripheral object representing that device if it already exists, or otherwise create a new Peripheral object using the PeripheralFactory.

Once a Peripheral is no longer needed, it can be disposed by calling remove().

Inheritance

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

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

Member Summary

Member Functions: findPeripheral, remoting__typeId, removePeripheral

Inherited Functions: duplicate, findPeripheral, isA, mutex, referenceCount, release, remoting__enableRemoteEvents, remoting__getURI, remoting__hasEvents, remoting__objectId, remoting__setURI, remoting__typeId, removePeripheral, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < PeripheralManagerRemoteObject >;

Constructors

PeripheralManagerRemoteObject

PeripheralManagerRemoteObject(
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    Poco::SharedPtr < IoT::BtLE::PeripheralManager > pServiceObject
);

Destructor

~PeripheralManagerRemoteObject virtual

virtual ~PeripheralManagerRemoteObject();

Member Functions

findPeripheral virtual inline

std::string findPeripheral(
    const std::string & address,
    const std::string & controller = std::string ()
);

Returns the service ID of a Peripheral object for the Peripheral with the given address (e.g., "C4:BE:84:72:C5:06"), using the given controller. The controller ID may be empty if there is only one controller on the system.

If such a Peripheral object already exists in the service registry, the existing object's ID will be returned. Otherwise, a new Peripheral object for that address will be created (using the PeripheralFactory for the given interface) and its service ID returned.

The ServiceID can then be used in Poco::OSP::ServiceRegistry::findByName() to obtain a ServiceRef for that service, and subsequently the service instance.

remoting__typeId virtual inline

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

removePeripheral virtual inline

virtual void removePeripheral(
    const std::string & serviceID
);

Removes the Peripheral with the given service ID.

Securely control IoT edge devices from anywhere   Connect a Device