MyoLinux
|
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 > | |
T | read () |
Read. More... | |
template<typename T > | |
T | read (Buffer &) |
Read. More... | |
template<typename... Functions> | |
void | read (const Functions &... functions) |
Read the payload of unknown type. More... | |
Class for communication using the BlueGiga protocol.
T read | ( | ) |
Read.
T read | ( | Buffer & | leftover | ) |
Read.
[out] | leftover | additional payload |
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:
functions | callbacks |
void write | ( | const T & | payload | ) |
Write.
payload | the payload |
void write | ( | const T & | payload, |
const Buffer & | leftover | ||
) |
Write.
payload | the payload | |
[in] | leftover | additional payload |