Whether a scan may be started.
The duration in milliseconds for which a Scanned Pixel should be considered available since the last received advertisement. A value of 0 keeps the dice forever.
The minimum time interval in milliseconds between two "onScanListChange" notifications. (calls to PixelScanner.scanListener). A value of 0 will generate a notification on every scan event.
An optional filter to only keep certain Pixels in the list. Setting a new filter will only affect new scan events, the current list of scanned Pixels will stay unchanged.
A copy of the list of scanned dice bootloaders (cleared on loosing Bluetooth access if PixelScanner.keepAliveDuration is greater than zero).
A copy of the list of scanned chargers (cleared on loosing Bluetooth access if PixelScanner.keepAliveDuration is greater than zero).
A copy of the list of scanned dice (cleared on loosing Bluetooth access if PixelScanner.keepAliveDuration is greater than zero). Only Pixels matching the PixelScanner.scanFilter are included.
The scan status of this instance.
Registers a listener function that will be called when the specified event is raised. See PixelScannerEventMap for the list of events and their associated data.
A case-sensitive string representing the event type to listen for.
The callback function.
Unregisters a listener from receiving events identified by the given event name. See PixelScannerEventMap for the list of events and their associated data.
A case-sensitive string representing the event type.
The callback function to unregister.
Queues a command to start a Bluetooth scan for Pixels and update the list as advertisement packets are being received. If the instance is already scanning it will just notify of pending list operations or clear the list if clearOnStop is true.
A promise.
Represents a list of scanned Pixels that is updated when scanning. Set a callback to PixelScanner.scanListener to get notified when the list is updated.
When powered on but not yet connected, a Pixels die will periodically emit information which is picked up by the scanner. Typically the information is send a few times per second.
Calls to the async methods of this class are queued and executed in order across all instances.
Remarks
Even though the roll state and roll face are included in a ScannedPixel instance, this data is not emitted in a reliable way.
To get reliably notified for rolls, first connect to the die and listen for roll events.