Pixels Plugin for Unity
Enable communications with Pixels dice using Bluetooth Low Energy.
Loading...
Searching...
No Matches
Systemic::BluetoothLE::ScannedPeripheral Class Reference

Holds the information from advertisement packet(s) received from a peripheral. More...

#include <ScannedPeripheral.h>

Public Member Functions

const DateTime & timestamp () const
 Gets the time at which the last advertisement packet used for initializing this instance was received.
 
bluetooth_address_t address () const
 Gets the Bluetooth address of the peripheral that send the advertisement packet(s).
 
const std::wstring & name () const
 The name of the peripheral as advertised.
 
bool isConnectable () const
 Indicates whether the received advertisement is connectable.
 
int rssi () const
 Gets the received signal strength indicator (RSSI) value, in dBm, of the advertisement packet.
 
int txPowerLevel () const
 Gets the received transmit power of the advertisement packet.
 
const std::vector< winrt::guid > & services () const
 Gets the list of services contained in the advertisement packet(s).
 
const std::vector< ManufacturerData > & manufacturersData () const
 Gets the list of manufacturer data contained in the advertisement packet(s).
 
const std::vector< ServiceData > & servicesData () const
 Gets the list of service data contained in the advertisement packet(s).
 
const std::vector< AdvertisementData > & advertisingData () const
 Gets the list of binary advertisement data contained in the advertisement packet(s).
 

Detailed Description

Holds the information from advertisement packet(s) received from a peripheral.

The data includes the peripheral's Bluetooth address, name, services manufacturer data, etc.

The data may come from several advertisement packet as the data from scan responses is combined with the data from an existing DiscoveredPeripheral instance for the same peripheral.

Note
This is a read only class.

Member Function Documentation

◆ address()

bluetooth_address_t Systemic::BluetoothLE::ScannedPeripheral::address ( ) const

Gets the Bluetooth address of the peripheral that send the advertisement packet(s).

If multiple advertisement packets were used to initialize this instance, the returned value is the from the last received packet.

Returns
The Bluetooth address of the peripheral.

◆ advertisingData()

const std::vector< AdvertisementData > & Systemic::BluetoothLE::ScannedPeripheral::advertisingData ( ) const

Gets the list of binary advertisement data contained in the advertisement packet(s).

If multiple advertisement packets were used to initialize this instance, the returned value is the concatenation of data from all the packets.

Returns
The list of binary advertisement data of the peripheral.

◆ isConnectable()

bool Systemic::BluetoothLE::ScannedPeripheral::isConnectable ( ) const

Indicates whether the received advertisement is connectable.

If multiple advertisement packets were used to initialize this instance, the returned value is the from the last received packet.

Returns
Whether the received advertisement is connectable.

◆ manufacturersData()

const std::vector< ManufacturerData > & Systemic::BluetoothLE::ScannedPeripheral::manufacturersData ( ) const

Gets the list of manufacturer data contained in the advertisement packet(s).

If multiple advertisement packets were used to initialize this instance, the returned value is the concatenation of data from all the packets.

Returns
The list of manufacturer data of the peripheral.

◆ name()

const std::wstring & Systemic::BluetoothLE::ScannedPeripheral::name ( ) const

The name of the peripheral as advertised.

If multiple advertisement packets were used to initialize this instance, the returned value is the from the last received packet that contained a value for the name.

Returns
The name of the peripheral.

◆ rssi()

int Systemic::BluetoothLE::ScannedPeripheral::rssi ( ) const

Gets the received signal strength indicator (RSSI) value, in dBm, of the advertisement packet.

If multiple advertisement packets were used to initialize this instance, the returned value is the from the last received packet.

Returns
The RSSI value of the advertisement packet.

◆ services()

const std::vector< winrt::guid > & Systemic::BluetoothLE::ScannedPeripheral::services ( ) const

Gets the list of services contained in the advertisement packet(s).

If multiple advertisement packets were used to initialize this instance, the returned value is the concatenation of data from all the packets.

Returns
The list of advertised services of the peripheral.

◆ servicesData()

const std::vector< ServiceData > & Systemic::BluetoothLE::ScannedPeripheral::servicesData ( ) const

Gets the list of service data contained in the advertisement packet(s).

If multiple advertisement packets were used to initialize this instance, the returned value is the concatenation of data from all the packets.

Returns
The list of service data of the peripheral.

◆ timestamp()

const DateTime & Systemic::BluetoothLE::ScannedPeripheral::timestamp ( ) const

Gets the time at which the last advertisement packet used for initializing this instance was received.

Returns
The time at which the advertisement packet was received.

◆ txPowerLevel()

int Systemic::BluetoothLE::ScannedPeripheral::txPowerLevel ( ) const

Gets the received transmit power of the advertisement packet.

If multiple advertisement packets were used to initialize this instance, the returned value is the from the last received packet that contained a value for the received transmit power.

Returns
The received transmit power of the advertisement packet.

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