C++ Pixels Library For Windows
Enable communications with Pixels dice using Bluetooth Low Energy.
Loading...
Searching...
No Matches
Systemic::Pixels::ScannedPixel Class Reference

Data periodically emitted by a Pixel when not connected to a device. More...

#include <ScannedPixel.h>

Inheritance diagram for Systemic::Pixels::ScannedPixel:

Public Member Functions

 ScannedPixel (const ScannedPixelData &data)
 Initializes a new instance of ScannedPixel with the given data.
 
virtual ~ScannedPixel ()=default
 Default virtual destructor.
 
virtual bluetooth_address_t systemId () const override
 Gets the unique id assigned by the OS to Pixel Bluetooth peripheral. More...
 
virtual bluetooth_address_t address () const override
 Gets the Bluetooth address of the Pixel. More...
 
virtual pixel_id_t pixelId () const override
 Gets the unique Pixel id of the die. More...
 
virtual const std::wstring & name () const override
 Gets the Pixel name. More...
 
virtual int ledCount () const override
 Gets the number of LEDs of the Pixel. More...
 
virtual PixelDesignAndColor designAndColor () const override
 Gets the design and color of the Pixel. More...
 
virtual Date firmwareDate () const override
 Gets the firmware build date of the Pixel. More...
 
virtual int rssi () const override
 Gets the last RSSI value measured by the Pixel. More...
 
virtual int batteryLevel () const override
 Gets the Pixel battery level (percentage). More...
 
virtual bool isCharging () const override
 Indicates whether the Pixel battery is charging or not. Set to 'true' if fully charged but still on charger. More...
 
virtual PixelRollState rollState () const override
 Gets the Pixel roll state. More...
 
virtual int currentFace () const override
 Gets the Pixel face value that is currently facing up. More...
 
- Public Member Functions inherited from Systemic::Pixels::PixelInfo
virtual bluetooth_address_t systemId () const =0
 Gets the unique id assigned by the OS to Pixel Bluetooth peripheral. More...
 
virtual bluetooth_address_t address () const =0
 Gets the Bluetooth address of the Pixel. More...
 
virtual pixel_id_t pixelId () const =0
 Gets the unique Pixel id of the die. More...
 
virtual const std::wstring & name () const =0
 Gets the Pixel name. More...
 
virtual int ledCount () const =0
 Gets the number of LEDs of the Pixel. More...
 
virtual PixelDesignAndColor designAndColor () const =0
 Gets the design and color of the Pixel. More...
 
virtual Date firmwareDate () const =0
 Gets the firmware build date of the Pixel. More...
 
virtual int rssi () const =0
 Gets the last RSSI value measured by the Pixel. More...
 
virtual int batteryLevel () const =0
 Gets the Pixel battery level (percentage). More...
 
virtual bool isCharging () const =0
 Indicates whether the Pixel battery is charging or not. Set to 'true' if fully charged but still on charger. More...
 
virtual PixelRollState rollState () const =0
 Gets the Pixel roll state. More...
 
virtual int currentFace () const =0
 Gets the Pixel face value that is currently facing up. More...
 
DieType dieType ()
 Gets die type of the Pixel. More...
 
int dieFaceCount ()
 Gets the number of faces of the Pixel. More...
 

Public Attributes

ScannedPixelData data {}
 The raw data of the instance.
 

Additional Inherited Members

- Public Types inherited from Systemic::Pixels::PixelInfo
using Date = std::chrono::system_clock::time_point
 Type for a system Date.
 

Detailed Description

Data periodically emitted by a Pixel when not connected to a device.

Member Function Documentation

◆ address()

virtual bluetooth_address_t Systemic::Pixels::ScannedPixel::address ( ) const
overridevirtual

Gets the Bluetooth address of the Pixel.

Returns
The Bluetooth address of the Pixel.

Implements Systemic::Pixels::PixelInfo.

◆ batteryLevel()

virtual int Systemic::Pixels::ScannedPixel::batteryLevel ( ) const
overridevirtual

Gets the Pixel battery level (percentage).

Returns
The Pixel battery level (percentage).

Implements Systemic::Pixels::PixelInfo.

◆ currentFace()

virtual int Systemic::Pixels::ScannedPixel::currentFace ( ) const
overridevirtual

Gets the Pixel face value that is currently facing up.

Returns
The Pixel face value that is currently facing up.

Implements Systemic::Pixels::PixelInfo.

◆ designAndColor()

virtual PixelDesignAndColor Systemic::Pixels::ScannedPixel::designAndColor ( ) const
overridevirtual

Gets the design and color of the Pixel.

Returns
The design and color of the Pixel.

Implements Systemic::Pixels::PixelInfo.

◆ firmwareDate()

virtual Date Systemic::Pixels::ScannedPixel::firmwareDate ( ) const
overridevirtual

Gets the firmware build date of the Pixel.

Returns
The firmware build date of the Pixel.

Implements Systemic::Pixels::PixelInfo.

◆ isCharging()

virtual bool Systemic::Pixels::ScannedPixel::isCharging ( ) const
overridevirtual

Indicates whether the Pixel battery is charging or not. Set to 'true' if fully charged but still on charger.

Returns
Whether the Pixel battery is charging or not.

Implements Systemic::Pixels::PixelInfo.

◆ ledCount()

virtual int Systemic::Pixels::ScannedPixel::ledCount ( ) const
overridevirtual

Gets the number of LEDs of the Pixel.

Returns
The number of LEDs of the Pixel.

Implements Systemic::Pixels::PixelInfo.

◆ name()

virtual const std::wstring & Systemic::Pixels::ScannedPixel::name ( ) const
overridevirtual

Gets the Pixel name.

Returns
The Pixel name.

Implements Systemic::Pixels::PixelInfo.

◆ pixelId()

virtual pixel_id_t Systemic::Pixels::ScannedPixel::pixelId ( ) const
overridevirtual

Gets the unique Pixel id of the die.

Returns
The unique Pixel id of the die.

Implements Systemic::Pixels::PixelInfo.

◆ rollState()

virtual PixelRollState Systemic::Pixels::ScannedPixel::rollState ( ) const
overridevirtual

Gets the Pixel roll state.

Returns
The Pixel roll state.

Implements Systemic::Pixels::PixelInfo.

◆ rssi()

virtual int Systemic::Pixels::ScannedPixel::rssi ( ) const
overridevirtual

Gets the last RSSI value measured by the Pixel.

Returns
The last RSSI value measured by the Pixel.

Implements Systemic::Pixels::PixelInfo.

◆ systemId()

virtual bluetooth_address_t Systemic::Pixels::ScannedPixel::systemId ( ) const
overridevirtual

Gets the unique id assigned by the OS to Pixel Bluetooth peripheral.

Note
This member exist only to keep similar interface than other implementations, the Bluetooth address is returned.
Returns
The unique id for the Pixel.

Implements Systemic::Pixels::PixelInfo.


The documentation for this class was generated from the following file: