| Demo HCI Implementation for WiMOD-LR Devices V2.0.3

Public Member Functions | List of all members
TComSlip Class Reference

Class for handling SLIP encoding and decoding of HCI messages. More...

`#include <utils/ComSLIP.h>`

## Public Member Functions
| TComSlip (Stream &s)
| Constructor. More...
void | begin ()
| Init function that must be called once prior to any other function of this object.
void | end (void)
| De-Init function.
void | RegisterClient (TComSlipClient *client)
| register a client for processing More...
bool | SendMessage (UINT8 *msg, UINT16 msgLength)
| Generic function to transfer a message from the host to the module. More...
bool | SetRxBuffer (UINT8 *rxBuffer, UINT16 rxbufferSize)
| configure a rx-buffer and enable receiver/decoder More...
void | DecodeData (UINT8 *rxData, UINT16 length)
| process received byte stream More...
void | SendWakeUpSequence (UINT8 nbr)
| : Send a sequence of dummy chars to give the WiMOD some time to wake up More...

## Detailed Description

Class for handling SLIP encoding and decoding of HCI messages.

## Constructor & Destructor Documentation

## ◆ TComSlip()

TComSlip::TComSlip | ( | Stream & | s | ) |

Constructor.

Parameters

  s | Reference to the serial interface to use for communication

## Member Function Documentation

## ◆ DecodeData()

void TComSlip::DecodeData | ( | UINT8 * | rxData,
|  | UINT16 | length
| ) |  |

process received byte stream

Parameters

  rxData | pointer to received bytes
  length | number of bytes received

## ◆ RegisterClient()

void TComSlip::RegisterClient | ( | TComSlipClient * | client | ) |

register a client for processing

Parameters

  client | pointer to client that should handle a received SLIP frame

## ◆ SendMessage()

bool TComSlip::SendMessage | ( | UINT8 * | msg,
|  | UINT16 | msgLength
| ) |  |

Generic function to transfer a message from the host to the module.

This is a generic function to send out a stream of bytes. The bytes are encoded into the SLIP format before transmission. Therefore a complete message has to be given.

Parameters

  msg | pointer to the bytes to encoded and send via serial interface
  msgLength | number of bytes

## ◆ SendWakeUpSequence()

void TComSlip::SendWakeUpSequence | ( | UINT8 | nbr | ) |

: Send a sequence of dummy chars to give the WiMOD some time to wake up

Parameters

  nbr | number of dummy bytes to send

## ◆ SetRxBuffer()

bool TComSlip::SetRxBuffer | ( | UINT8 * | rxBuffer,
|  | UINT16 | rxBufferSize
| ) |  |

configure a rx-buffer and enable receiver/decoder

Parameters

  rxBuffer | pointer to plain buffer
  rxBufferSize | size of buffer in bytes

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

- utils/ComSLIP.h
- utils/ComSLIP.cpp