Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

connection_role_t Struct Reference

connection_role_t Struct Reference
[Gap]

Enumeration of GAP roles. More...

#include <Types.h>

Inherits SafeEnum< connection_role_t, uint8_t >.

Public Types

enum  type { CENTRAL = 0x00, PERIPHERAL = 0x01 }
 

struct scoped enum wrapped by the class

More...
typedef uint8_t representation_t
 Type of the representation.

Public Member Functions

 connection_role_t (type value)
 Construct a new instance of role_t.
 connection_role_t (uint8_t raw_value)
 Explicit constructor from a raw value.
uint8_t value () const
 Explicit access to the inner value of the SafeEnum instance.
const uint8_t * storage () const
 Return a pointer to the inner storage.

Friends

bool operator== (connection_role_tlhs, connection_role_trhs)
 Equal to operator for Target instances.
bool operator!= (connection_role_tlhs, connection_role_trhs)
 Not equal to operator for Target instances.
bool operator< (connection_role_tlhs, connection_role_trhs)
 Less than operator for Target instances.
bool operator<= (connection_role_tlhs, connection_role_trhs)
 Less than or equal to operator for Target instances.
bool operator> (connection_role_tlhs, connection_role_trhs)
 Greater than operator for Target instances.
bool operator>= (connection_role_tlhs, connection_role_trhs)
 Greater than or equal to operator for Target instances.

Detailed Description

Enumeration of GAP roles.

Note:
The BLE API does not express the broadcaster and scanner roles.
Attention:
A device can fulfill different roles concurrently.

Definition at line 707 of file Types.h.


Member Typedef Documentation

typedef uint8_t representation_t [inherited]

Type of the representation.

Definition at line 113 of file SafeEnum.h.


Member Enumeration Documentation

enum type

struct scoped enum wrapped by the class

Enumerator:
CENTRAL 

Central Role.

The device can scan and initiate connection to peripherals. It acts as the master when a connection is established.

Note:
A central is a scanner.
PERIPHERAL 

Peripheral Role.

The device can advertise, and you can connect it by a central. It acts as a slave when connected.

Note:
A peripheral is a broadcaster.

Definition at line 709 of file Types.h.


Constructor & Destructor Documentation

connection_role_t ( type  value )

Construct a new instance of role_t.

Parameters:
valueThe value of the role_t created.

Definition at line 736 of file Types.h.

connection_role_t ( uint8_t  raw_value ) [explicit]

Explicit constructor from a raw value.

Parameters:
raw_valueThe role.

Definition at line 746 of file Types.h.


Member Function Documentation

const uint8_t * storage (  ) const [inherited]

Return a pointer to the inner storage.

Definition at line 209 of file SafeEnum.h.

uint8_t value (  ) const [inherited]

Explicit access to the inner value of the SafeEnum instance.

Definition at line 202 of file SafeEnum.h.


Friends And Related Function Documentation

bool operator!= ( connection_role_t  lhs,
connection_role_t  rhs 
) [friend, inherited]

Not equal to operator for Target 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 144 of file SafeEnum.h.

bool operator< ( connection_role_t  lhs,
connection_role_t  rhs 
) [friend, inherited]

Less than operator for Target 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 156 of file SafeEnum.h.

bool operator<= ( connection_role_t  lhs,
connection_role_t  rhs 
) [friend, inherited]

Less than or equal to operator for Target 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 169 of file SafeEnum.h.

bool operator== ( connection_role_t  lhs,
connection_role_t  rhs 
) [friend, inherited]

Equal to operator for Target 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 131 of file SafeEnum.h.

bool operator> ( connection_role_t  lhs,
connection_role_t  rhs 
) [friend, inherited]

Greater than operator for Target 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 182 of file SafeEnum.h.

bool operator>= ( connection_role_t  lhs,
connection_role_t  rhs 
) [friend, inherited]

Greater than or equal to operator for Target 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 195 of file SafeEnum.h.