IoT::BtLE

class PeripheralBrowserRemoteObject

File Information

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

Description

This class provides browsing (scanning) for available Bt LE devices.

Inheritance

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

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

Member Summary

Member Functions: browse, browseInProgress, cancelBrowse, event__browseComplete, event__browseError, event__browseStarted, event__peripheralFound, remoting__enableEvents, remoting__enableRemoteEvents, remoting__hasEvents, remoting__typeId

Inherited Functions: browse, browseInProgress, cancelBrowse, duplicate, isA, mutex, referenceCount, release, remoting__enableEvents, remoting__enableRemoteEvents, remoting__getURI, remoting__hasEvents, remoting__objectId, remoting__setURI, remoting__typeId, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < PeripheralBrowserRemoteObject >;

Constructors

PeripheralBrowserRemoteObject

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

Destructor

~PeripheralBrowserRemoteObject virtual

virtual ~PeripheralBrowserRemoteObject();

Member Functions

browse virtual inline

virtual void browse(
    bool activeScan = bool (false)
);

Scan for peripherals.

If activeScan is true, an active scan will be performed, otherwise a passive scan. Full advertising data will only be provided in an active scan. Advertising data for a passive scan is limited to at most 31 bytes. For extended advertising data provided by an active scan, the maximum size is 1650 bytes.

Any peripherals found will be reported through the peripheralFound event. Scanning for peripherals will be done asynchronously, therefore this method returns immediately.

An active scan will stop automatically after some time, firing the browseComplete event. A passive scan will go on until canceled by calling cancelBrowse().

If a browse is already in progress, throws a Poco::IllegalStateException.

browseInProgress virtual inline

virtual bool browseInProgress();

Returns true if a browse (scan) is currently in progress, otherwise false.

cancelBrowse virtual inline

virtual void cancelBrowse();

Cancels an ongoing browse operation.

remoting__enableEvents virtual

virtual std::string remoting__enableEvents(
    Poco::RemotingNG::Listener::Ptr pListener,
    bool enable = bool (true)
);

remoting__enableRemoteEvents virtual

virtual void remoting__enableRemoteEvents(
    const std::string & protocol
);

remoting__hasEvents virtual

virtual bool remoting__hasEvents() const;

remoting__typeId virtual inline

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

event__browseComplete protected

void event__browseComplete();

event__browseError protected

void event__browseError(
    const std::string & data
);

event__browseStarted protected

void event__browseStarted();

event__peripheralFound protected

void event__peripheralFound(
    const IoT::BtLE::PeripheralInfo & data
);

Securely control IoT edge devices from anywhere   Connect a Device