File Information
Library: IoT/BtLE
Package: Generated
Header: IoT/BtLE/IPeripheralBrowser.h
Description
This class provides browsing (scanning) for available Bt LE devices.
Inheritance
Direct Base Classes: Poco::OSP::Service
All Base Classes: Poco::OSP::Service, Poco::RefCountedObject
Known Derived Classes: PeripheralBrowserRemoteObject
Member Summary
Member Functions: browse, browseInProgress, cancelBrowse, isA, remoting__enableEvents, remoting__typeId, type
Inherited Functions: duplicate, isA, referenceCount, release, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < IPeripheralBrowser >;
Constructors
IPeripheralBrowser
Creates a IPeripheralBrowser.
Destructor
~IPeripheralBrowser
virtual ~IPeripheralBrowser();
Destroys the IPeripheralBrowser.
Member Functions
browse
virtual void browse(
bool activeScan = bool (false)
) = 0;
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 bool browseInProgress() = 0;
Returns true if a browse (scan) is currently in progress, otherwise false.
cancelBrowse
virtual void cancelBrowse() = 0;
Cancels an ongoing browse operation.
isA
bool isA(
const std::type_info & otherType
) const;
Returns true if the class is a subclass of the class given by otherType.
See also: Poco::OSP::Service::isA()
remoting__enableEvents
virtual std::string remoting__enableEvents(
Poco::RemotingNG::Listener::Ptr pListener,
bool enable = bool (true)
) = 0;
Enable or disable delivery of remote events.
The given Listener instance must implement the Poco::RemotingNG::EventListener interface, otherwise this method will fail with a RemotingException.
This method is only used with Proxy objects; calling this method on a RemoteObject will do nothing.
remoting__typeId
static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();
Returns the TypeId of the class.
type
const std::type_info & type() const;
Returns the type information for the object's class.
See also: Poco::OSP::Service::type()
Variables
browseComplete
Poco::BasicEvent < void > browseComplete;
browseError
Poco::BasicEvent < const std::string > browseError;
browseStarted
Poco::BasicEvent < void > browseStarted;
peripheralFound
Poco::BasicEvent < const IoT::BtLE::PeripheralInfo > peripheralFound;