Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
direct_bt::GattTemperatureMeasurement Class Reference

https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Characteristics/org.bluetooth.characteristic.temperature_measurement.xml More...

#include <GattNumbers.hpp>

Collaboration diagram for direct_bt::GattTemperatureMeasurement:

Public Types

enum  Bits : uint8_t { IS_TEMP_FAHRENHEIT = 1, HAS_TIMESTAMP = 2, HAS_TEMP_TYPE = 4 }
 

Public Member Functions

 GattTemperatureMeasurement (const uint8_t flags_, const float temperatureValue_, const ieee11073::AbsoluteTime &timestamp_, const uint8_t temperature_type_) noexcept
 
bool isFahrenheit () const noexcept
 
bool hasTimestamp () const noexcept
 
bool hasTemperatureType () const noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

static std::shared_ptr< GattTemperatureMeasurementget (const TROOctets &source) noexcept
 
static std::shared_ptr< GattTemperatureMeasurementget (const TOctetSlice &source) noexcept
 

Public Attributes

const uint8_t flags
 Bitfields of Bits. More...
 
const float temperatureValue
 In Celsius if IS_TEMP_FAHRENHEIT is set, otherwise Fahrenheit. More...
 
const ieee11073::AbsoluteTime timestamp
 Timestamp, if HAS_TIMESTAMP is set. More...
 
const uint8_t temperature_type
 Temperature Type, if HAS_TEMP_TYPE is set: Format ????. More...
 

Detailed Description

https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Characteristics/org.bluetooth.characteristic.temperature_measurement.xml

Definition at line 352 of file GattNumbers.hpp.

Member Enumeration Documentation

◆ Bits

Enumerator
IS_TEMP_FAHRENHEIT 

bit 0: If set, temperature is in Fahrenheit, otherwise Celsius.

HAS_TIMESTAMP 

bit 1: If set, timestamp field present, otherwise not.

HAS_TEMP_TYPE 

bit 2: If set, temperature type field present, otherwise not.

Definition at line 354 of file GattNumbers.hpp.

Constructor & Destructor Documentation

◆ GattTemperatureMeasurement()

direct_bt::GattTemperatureMeasurement::GattTemperatureMeasurement ( const uint8_t  flags_,
const float  temperatureValue_,
const ieee11073::AbsoluteTime timestamp_,
const uint8_t  temperature_type_ 
)
inlinenoexcept

Definition at line 381 of file GattNumbers.hpp.

Member Function Documentation

◆ get() [1/2]

static std::shared_ptr<GattTemperatureMeasurement> direct_bt::GattTemperatureMeasurement::get ( const TOctetSlice source)
inlinestaticnoexcept

Definition at line 376 of file GattNumbers.hpp.

Here is the call graph for this function:

◆ get() [2/2]

std::shared_ptr< GattTemperatureMeasurement > GattTemperatureMeasurement::get ( const TROOctets source)
staticnoexcept
Examples
dbt_scanner00.cpp, dbt_scanner01.cpp, and dbt_scanner10.cpp.

Definition at line 414 of file GATTNumbers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasTemperatureType()

bool direct_bt::GattTemperatureMeasurement::hasTemperatureType ( ) const
inlinenoexcept

Definition at line 387 of file GattNumbers.hpp.

Here is the caller graph for this function:

◆ hasTimestamp()

bool direct_bt::GattTemperatureMeasurement::hasTimestamp ( ) const
inlinenoexcept

Definition at line 386 of file GattNumbers.hpp.

Here is the caller graph for this function:

◆ isFahrenheit()

bool direct_bt::GattTemperatureMeasurement::isFahrenheit ( ) const
inlinenoexcept

Definition at line 385 of file GattNumbers.hpp.

Here is the caller graph for this function:

◆ toString()

std::string GattTemperatureMeasurement::toString ( ) const
noexcept
Examples
dbt_scanner00.cpp, dbt_scanner01.cpp, and dbt_scanner10.cpp.

Definition at line 453 of file GATTNumbers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ flags

const uint8_t direct_bt::GattTemperatureMeasurement::flags

Bitfields of Bits.

1 byte.

Definition at line 363 of file GattNumbers.hpp.

◆ temperature_type

const uint8_t direct_bt::GattTemperatureMeasurement::temperature_type

Temperature Type, if HAS_TEMP_TYPE is set: Format ????.

1 byte (!?).

Definition at line 372 of file GattNumbers.hpp.

◆ temperatureValue

const float direct_bt::GattTemperatureMeasurement::temperatureValue

In Celsius if IS_TEMP_FAHRENHEIT is set, otherwise Fahrenheit.

4 bytes.

Definition at line 366 of file GattNumbers.hpp.

◆ timestamp

const ieee11073::AbsoluteTime direct_bt::GattTemperatureMeasurement::timestamp

Timestamp, if HAS_TIMESTAMP is set.

7 bytes(!?) here w/o fractions.

Definition at line 369 of file GattNumbers.hpp.


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