Package-level declarations
A framework to develop your own additional customized frame processing.
What is a plugin?
A plugin adds the support of features or formats that are specific to a manufacturer. It is of one of the following three kinds.
Processor
The plugin is fully in charge of the frame analysis. Its role is similar to the built-in processors, but for the support of a private or manufacturer specific frame format. For that reason, a listener instance is expected by the constructor of the abstract default implementation in order to dispatch the device lifecycle events (onDiscovered, onUpdated, onLost).
Explorer
Some manufacturers implement only the Advertising data frame, not a Scan Response data frame that can be the support to publish extra information, such as the battery level, in the same transaction. Still, these extra information may be published, but in an additional Advertising data frame. This kind of plugin is in charge to spot these frames, to track the extra information, and to deliver these extra fields when requested by the engine to enrich the main beacon processing.
Parser
In an advertisement data payload, which can be up to 31 bytes, the iBeacon protocol specifies the use of 30 bytes for its data structures, so it leaves one byte unallocated. Some manufacturers may use this available space to transport a custom bit of information, like a battery level. Of course, this behaviour is out of any standardization. Some other manufacturers make use of the Manufacturer Specific Data structure to provide any piece of information of their own, and so encoded in their specific format. It is the work of the plugin to parse the payload submitted by the engine and to return these extra fields if found.
Inheritance tree
APlugin
┌───────────┴──────────┐
ADevicePlugin │
┌───────────┴──────┐ │
AProcessorPlugin AExplorerPlugin │
│ │ │
xxProcessorPlugin xxExplorerPlugin xxParserPlugin
Types
Implementation common to Processor and Explorer plugins, mainly related to device management.
Implementation common to Explorer plugins.
Implementation common to Processor plugins.
Interface for an Explorer plugin.
Interface for a Parser plugin.
Interface for a listener of device lifecycle events.
Interface for a Processor plugin.