Abstract
Protected
constructorProtected
Readonly
_msgProtected
Readonly
_serializerReadonly
isAbstract
typeStatic
MutableAbstract
batteryThe Pixel battery level (percentage).
Abstract
colorwayThe Pixel color.
Abstract
currentThe value of the die face that is currently facing up.
Abstract
currentThe 0-based index of the die face that is currently facing up.
A D20 die will have face indices ranging from 0 to 19.
Index 0 corresponds to face 1 and index 19 to face 20.
D10 and D00 share the same face indices but have different face values.
Index 0 corresponds to face 0 of both dice types.
Index 9 corresponds to face 9 for a D10 and to face 90 for a D00.
The fudge die returns the following indices:
- O and 5 for the "+" face .
- 1 and 4 for the "-" face.
- 2 and 3 for the "blank" face.
Abstract
dieThe Pixel die type.
Abstract
firmwareThe Pixel firmware build date.
Abstract
isWhether the Pixel battery is charging or not. Set to 'true' if fully charged but still on charger.
Abstract
ledThe number of LEDs of the Pixel.
Set logger to use by this instance.
Toggle logging information about each send and received message.
Toggle logging the serialized (binary) data for each send and received message.
Abstract
nameThe Pixels die name.
Abstract
pixelThe unique Pixel id of the device.
Abstract
rollThe Pixel roll state.
Abstract
rssiThe last RSSI value measured by the Pixel.
Protected
sessionGets the Pixel last known connection status.
Abstract
systemThe unique id assigned by the system to the Pixel Bluetooth peripheral.
Protected
_internalProtected
Abstract
_internalProtected
_internalProtected
Abstract
_internalProtected
_internalSends a message to the Pixel and wait for a specific response.
Message with the data to send or just a message type.
Expected response type.
Optional
timeoutMs: numberTimeout in mill-seconds before aborting waiting for the response.
A promise resolving to the response in the form of a message type or a message object.
Protected
_internalSends a message to the Pixel and wait for a specific response which is returned casted to the expected type.
Message with the data to send or just a message type.
Expected response class type.
Optional
timeoutMs: numberA promise resolving to a message object of the expected type.
Protected
_internalSends a message to the Pixel.
Message with the data to send or just a message type.
Optional
withoutAck: booleanWhether to request a confirmation that the message was received.
A promise that resolves once the message has been send.
Protected
Abstract
_internalProtected
_internalWaits for a message from the Pixel.
Type of the message to expect.
Optional
timeoutMs: numberTimeout before aborting the wait.
A promise with the received message of the expected type.
Protected
_logProtected
_logProtected
Abstract
_onProtected
_tagProtected
_warnRegisters a listener function that will be called on receiving raw messages of a given type from the Pixel.
The type of message to watch for.
The callback function.
Adds the given listener function for the specified property.
The name of the property.
The callback function.
Protected
emitUnregisters a listener from receiving raw messages of a given type.
The type of message to watch for.
The callback function to unregister.
Removes the given listener function for the specified property.
The name of the property.
The callback function to unregister.
Abstract class that represents a connection to a Pixel device (die, charger, etc.).