Direct-BT v3.3.0-1-gc2d430c
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 hasTemperatureType () const noexcept
 
bool hasTimestamp () const noexcept
 
bool isFahrenheit () const noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

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

Public Attributes

const uint8_t flags
 Bitfields of Bits. More...
 
const uint8_t temperature_type
 Temperature Type, if HAS_TEMP_TYPE is set: Format ????. 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...
 

Detailed Description

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

Definition at line 383 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 385 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 412 of file GattNumbers.hpp.

Member Function Documentation

◆ get() [1/2]

std::shared_ptr< GattTemperatureMeasurement > GattTemperatureMeasurement::get ( const jau::TROOctets source)
staticnoexcept

Definition at line 457 of file GATTNumbers.cpp.

◆ get() [2/2]

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

Definition at line 407 of file GattNumbers.hpp.

◆ isFahrenheit()

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

Definition at line 416 of file GattNumbers.hpp.

Here is the caller graph for this function:

◆ hasTimestamp()

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

Definition at line 417 of file GattNumbers.hpp.

Here is the caller graph for this function:

◆ hasTemperatureType()

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

Definition at line 418 of file GattNumbers.hpp.

Here is the caller graph for this function:

◆ toString()

std::string GattTemperatureMeasurement::toString ( ) const
noexcept

Definition at line 496 of file GATTNumbers.cpp.

Member Data Documentation

◆ flags

const uint8_t direct_bt::GattTemperatureMeasurement::flags

Bitfields of Bits.

1 byte.

Definition at line 394 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 397 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 400 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 403 of file GattNumbers.hpp.


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