takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

phy_t Struct Reference

phy_t Struct Reference

Type that describes a bluetooth PHY(sical) transport. More...

#include <BLETypes.h>

Inherits SafeEnum< phy_t, uint8_t >.

Public Types

enum  type { LE_1M = 1, LE_2M = 2, LE_CODED }
 

struct scoped enum wrapped by the class

More...

Public Member Functions

 phy_t (type value)
 Construct a new instance of phy_t.
uint8_t value () const
 Explicit access to the inner value of the SafeEnum instance.

Friends

bool operator== (SafeEnum lhs, SafeEnum rhs)
 Equal to operator for SafeEnum instances.
bool operator!= (SafeEnum lhs, SafeEnum rhs)
 Not equal to operator for SafeEnum instances.
bool operator< (SafeEnum lhs, SafeEnum rhs)
 Less than operator for SafeEnum instances.
bool operator<= (SafeEnum lhs, SafeEnum rhs)
 Less than or equal to operator for SafeEnum instances.
bool operator> (SafeEnum lhs, SafeEnum rhs)
 Greater than operator for SafeEnum instances.
bool operator>= (SafeEnum lhs, SafeEnum rhs)
 Greater than or equal to operator for SafeEnum instances.

Detailed Description

Type that describes a bluetooth PHY(sical) transport.

Definition at line 578 of file BLETypes.h.


Member Enumeration Documentation

enum type

struct scoped enum wrapped by the class

Enumerator:
LE_1M 

1Mbit/s LE.

Note:
This physical transport was available since Bluetooth 4.0
LE_2M 

2Mbit/s LE.

Modulation is similar to LE_1M but differs in rate. Therefore range performances are in the same ballpark as LE_1M while the increased rate minimize time spent to transfer or receive a packet which leads to a better power consumption and/or faster transfer.

Note:
This transport has been introduced with the Bluetooth 5.
When operating at 2Mbit/s range is not exactly identical to the range at 1Mbit/s due to a loss in sensitivity.
LE_CODED 

LE Coded PHY.

This transport reuse the 1Mbit/s channel with different coding schemes. Either two (S=2) or eight (S=8) symbols can be used to represent a bit while the 1Mbit/s transport use 1 symbol to code 1 bit of data.

Here is the data rate of the two coding schemes:

  • S=2: 500kbit/s
  • S=8: 125kbit/s

The goal of the coded PHY is to increase the range of BLE devices. Of course given it takes more time to transfer data, transmission and reception last longer which leads to an increase in power consumption.

Note:
This transport has been introduced with the Bluetooth 5.

Definition at line 580 of file BLETypes.h.


Constructor & Destructor Documentation

phy_t ( type  value )

Construct a new instance of phy_t.

Definition at line 626 of file BLETypes.h.


Member Function Documentation

uint8_t value (  ) const [inherited]

Explicit access to the inner value of the SafeEnum instance.

Definition at line 196 of file SafeEnum.h.


Friends And Related Function Documentation

bool operator!= ( SafeEnum< phy_t, uint8_t >  lhs,
SafeEnum< phy_t, uint8_t >  rhs 
) [friend, inherited]

Not equal to operator for SafeEnum instances.

Parameters:
lhsleft hand side of the comparison
rhsright hand side of the comparison
Returns:
true if the inner value of lhs and rhs are not equal and false otherwise.

Definition at line 138 of file SafeEnum.h.

bool operator< ( SafeEnum< phy_t, uint8_t >  lhs,
SafeEnum< phy_t, uint8_t >  rhs 
) [friend, inherited]

Less than operator for SafeEnum instances.

Parameters:
lhsleft hand side of the comparison
rhsright hand side of the comparison
Returns:
true if the inner value of lhs is less than rhs and false otherwise.

Definition at line 150 of file SafeEnum.h.

bool operator<= ( SafeEnum< phy_t, uint8_t >  lhs,
SafeEnum< phy_t, uint8_t >  rhs 
) [friend, inherited]

Less than or equal to operator for SafeEnum instances.

Parameters:
lhsleft hand side of the comparison
rhsright hand side of the comparison
Returns:
true if the inner value of lhs is less than or equal to rhs and false otherwise.

Definition at line 163 of file SafeEnum.h.

bool operator== ( SafeEnum< phy_t, uint8_t >  lhs,
SafeEnum< phy_t, uint8_t >  rhs 
) [friend, inherited]

Equal to operator for SafeEnum instances.

Parameters:
lhsleft hand side of the comparison
rhsright hand side of the comparison
Returns:
true if the inner value of lhs and rhs are equal and false otherwise.

Definition at line 125 of file SafeEnum.h.

bool operator> ( SafeEnum< phy_t, uint8_t >  lhs,
SafeEnum< phy_t, uint8_t >  rhs 
) [friend, inherited]

Greater than operator for SafeEnum instances.

Parameters:
lhsleft hand side of the comparison
rhsright hand side of the comparison
Returns:
true if the inner value of lhs is greater than rhs; false otherwise.

Definition at line 176 of file SafeEnum.h.

bool operator>= ( SafeEnum< phy_t, uint8_t >  lhs,
SafeEnum< phy_t, uint8_t >  rhs 
) [friend, inherited]

Greater than or equal to operator for SafeEnum instances.

Parameters:
lhsleft hand side of the comparison
rhsright hand side of the comparison
Returns:
true if the inner value of lhs is greater than or equal to rhs; false otherwise.

Definition at line 189 of file SafeEnum.h.