MyoLinux
Public Member Functions | List of all members
Client Class Reference

Class for communication using the BlueGiga protocol. More...

#include <bled112client.h>

Public Member Functions

template<typename T >
void write (const T &)
 Write. More...
 
template<typename T >
void write (const T &, const Buffer &)
 Write. More...
 
template<typename T >
read ()
 Read. More...
 
template<typename T >
read (Buffer &)
 Read. More...
 
template<typename... Functions>
void read (const Functions &... functions)
 Read the payload of unknown type. More...
 

Detailed Description

Class for communication using the BlueGiga protocol.

Member Function Documentation

§ read() [1/3]

T read ( )

Read.

Returns
the payload

§ read() [2/3]

T read ( Buffer leftover)

Read.

Parameters
[out]leftoveradditional payload
Returns
the payload

§ read() [3/3]

void read ( const Functions &...  functions)

Read the payload of unknown type.

The dispatch works by iterating over a list of functions, the right one is selected based on the first argument. In the case that the data type is partial an additional argument is required to pass the leftover data.

Accepted function signatures:

  • void(Type)
  • void(Type, Buffer)
Parameters
functionscallbacks

§ write() [1/2]

void write ( const T &  payload)

Write.

Parameters
payloadthe payload

§ write() [2/2]

void write ( const T &  payload,
const Buffer leftover 
)

Write.

Parameters
payloadthe payload
[in]leftoveradditional payload

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