IoT::BtLE

class IPeripheralManager

File Information

Library: IoT/BtLE
Package: Generated
Header: IoT/BtLE/IPeripheralManager.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: Poco::OSP::Service

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

Known Derived Classes: PeripheralManagerRemoteObject

Member Summary

Member Functions: findPeripheral, isA, remoting__typeId, removePeripheral, type

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

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < IPeripheralManager >;

Constructors

IPeripheralManager

IPeripheralManager();

Creates a IPeripheralManager.

Destructor

~IPeripheralManager virtual

virtual ~IPeripheralManager();

Destroys the IPeripheralManager.

Member Functions

findPeripheral virtual

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

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.

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.

removePeripheral virtual

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

Removes the Peripheral with the given service ID.

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