BlueToe
an alternative GATT/BLE implementation
Classes | Public Member Functions | List of all members
bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options > Class Template Reference

link layer implementation More...

#include <bluetoe/link_layer/link_layer.hpp>

Inheritance diagram for bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >:

Public Member Functions

void run (Server &)
 this function passes the CPU to the link layer implementation More...
 
void adv_received (const read_buffer &receive)
 call back that will be called when the master responds to an advertising PDU More...
 
void adv_timeout ()
 call back that will be called when the master does not respond to an advertising PDU More...
 
void timeout ()
 call back that will be called when connect event times out More...
 
void end_event ()
 call back that will be called after a connect event was closed. More...
 
bool connection_parameter_update_request (std::uint16_t interval_min, std::uint16_t interval_max, std::uint16_t latency, std::uint16_t timeout)
 initiating the change of communication parameters of an established connection More...
 
void disconnect ()
 terminates the give connection More...
 
std::size_t fill_l2cap_advertising_data (std::uint8_t *buffer, std::size_t buffer_size) const
 fills the given buffer with l2cap advertising payload
 
const device_addresslocal_address () const
 returns the own local device address
 

Detailed Description

template<class Server, template< std::size_t TransmitSize, std::size_t ReceiveSize, class CallBack > class ScheduledRadio, typename ... Options>
class bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >

link layer implementation

Implements a binding to a server by implementing a link layout on top of a ScheduleRadio device.

See also
connectable_undirected_advertising
connectable_directed_advertising
scannable_undirected_advertising
non_connectable_undirected_advertising
auto_start_advertising
no_auto_start_advertising
Examples:
change_advertising_example.cpp.

Member Function Documentation

◆ adv_received()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
void bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::adv_received ( const read_buffer receive)

call back that will be called when the master responds to an advertising PDU

See also
scheduled_radio::schedule_advertisment_and_receive

◆ adv_timeout()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
void bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::adv_timeout ( )

call back that will be called when the master does not respond to an advertising PDU

See also
scheduled_radio::schedule_advertisment_and_receive

◆ connection_parameter_update_request()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
bool bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::connection_parameter_update_request ( std::uint16_t  interval_min,
std::uint16_t  interval_max,
std::uint16_t  latency,
std::uint16_t  timeout 
)

initiating the change of communication parameters of an established connection

If it was not possible to initiate the connection parameter update, the function returns false.

Todo:
Add parameter that identifies the connection.

◆ disconnect()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
void bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::disconnect ( )

terminates the give connection

Todo:
Add parameter that identifies the connection.

◆ end_event()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
void bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::end_event ( )

call back that will be called after a connect event was closed.

See also
scheduled_radio::schedule_connection_event

◆ run()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
void bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::run ( Server &  server)

this function passes the CPU to the link layer implementation

This function should return on certain events to alow user code to do usefull things. Details depend on the ScheduleRadio implemention.

◆ timeout()

template<class Server , template< std::size_t, std::size_t, class > class ScheduledRadio, typename ... Options>
void bluetoe::link_layer::link_layer< Server, ScheduledRadio, Options >::timeout ( )

call back that will be called when connect event times out

See also
scheduled_radio::schedule_connection_event

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