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

Common accessible values between Pixel advertised data and a connected Pixel. More...

#include <PixelInfo.h>

Inheritance diagram for Systemic::Pixels::PixelInfo:

Public Types

using Date = std::chrono::system_clock::time_point
 Type for a system Date.
 

Public Member Functions

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...
 

Detailed Description

Common accessible values between Pixel advertised data and a connected Pixel.

Member Function Documentation

◆ address()

virtual bluetooth_address_t Systemic::Pixels::PixelInfo::address ( ) const
pure virtual

Gets the Bluetooth address of the Pixel.

Returns
The Bluetooth address of the Pixel.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ batteryLevel()

virtual int Systemic::Pixels::PixelInfo::batteryLevel ( ) const
pure virtual

Gets the Pixel battery level (percentage).

Returns
The Pixel battery level (percentage).

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ currentFace()

virtual int Systemic::Pixels::PixelInfo::currentFace ( ) const
pure virtual

Gets the Pixel face value that is currently facing up.

Returns
The Pixel face value that is currently facing up.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ designAndColor()

virtual PixelDesignAndColor Systemic::Pixels::PixelInfo::designAndColor ( ) const
pure virtual

Gets the design and color of the Pixel.

Returns
The design and color of the Pixel.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ dieFaceCount()

int Systemic::Pixels::PixelInfo::dieFaceCount ( )

Gets the number of faces of the Pixel.

Returns
The number of faces of the Pixel.

◆ dieType()

DieType Systemic::Pixels::PixelInfo::dieType ( )

Gets die type of the Pixel.

Returns
The Pixel type.

◆ firmwareDate()

virtual Date Systemic::Pixels::PixelInfo::firmwareDate ( ) const
pure virtual

Gets the firmware build date of the Pixel.

Returns
The firmware build date of the Pixel.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ isCharging()

virtual bool Systemic::Pixels::PixelInfo::isCharging ( ) const
pure virtual

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.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ ledCount()

virtual int Systemic::Pixels::PixelInfo::ledCount ( ) const
pure virtual

Gets the number of LEDs of the Pixel.

Returns
The number of LEDs of the Pixel.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ name()

virtual const std::wstring & Systemic::Pixels::PixelInfo::name ( ) const
pure virtual

Gets the Pixel name.

Returns
The Pixel name.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ pixelId()

virtual pixel_id_t Systemic::Pixels::PixelInfo::pixelId ( ) const
pure virtual

Gets the unique Pixel id of the die.

Returns
The unique Pixel id of the die.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ rollState()

virtual PixelRollState Systemic::Pixels::PixelInfo::rollState ( ) const
pure virtual

Gets the Pixel roll state.

Returns
The Pixel roll state.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ rssi()

virtual int Systemic::Pixels::PixelInfo::rssi ( ) const
pure virtual

Gets the last RSSI value measured by the Pixel.

Returns
The last RSSI value measured by the Pixel.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.

◆ systemId()

virtual bluetooth_address_t Systemic::Pixels::PixelInfo::systemId ( ) const
pure virtual

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.

Implemented in Systemic::Pixels::Pixel, and Systemic::Pixels::ScannedPixel.


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