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

Public Member Functions | Protected Member Functions | List of all members
TWiMODLRHCI Class Reference

Internal helper class for processing SLIP frames. More...

`#include <HCI/WiMODLRHCI.h>`

Inheritance diagram for TWiMODLRHCI:
[legend]
Collaboration diagram for TWiMODLRHCI:
[legend]

## Public Member Functions
| TWiMODLRHCI (Stream &s)
| Constructor. More...
| ~TWiMODLRHCI (void)
| Destructor.
virtual void | begin (void)
| Init function of the generic HCI message handler. More...
virtual void | end (void)
| shutdown function
TWiMODLRResultCodes | SendHCIMessage (UINT8 dstSapID, UINT8 msgID, UINT8 rxMsgID, UINT8 *payload, UINT16 length)
| Generic function for transferring a HCI message to the WiMOD module. More...
TWiMODLRResultCodes | SendHCIMessageWithoutRx (UINT8 dstSapID, UINT8 msgID, UINT8 *payload, UINT16 length)
| Generic function for transferring a HCI message to the WiMOD module. More...
void | Process (void)
| Handle the receiver path; process all incomming bytes from the WiMOD. More...
void | SendWakeUpSequence (void)
| : Send a sequence of dummy chars to give the WiMOD some time to wake up
void | RegisterStackErrorClient (TWiMODStackErrorClient cb)
const TWiMODLR_HCIMessage & | GetRxMessage (void)
void | EnableWakeupSequence (bool flag)

## Protected Member Functions
TWiMODLRResultCodes | PostMessage (UINT8 sapID, UINT8 msgID, UINT8 *payload, UINT16 length)
TWiMODLRResultCodes | SendPacket (UINT8 *txData, UINT16 length)
bool | WaitForResponse (UINT8 rxSapID, UINT8 rxMsgID)
UINT8 * | ProcessRxMessage (UINT8 *rxBuffer, UINT16 length)

## Detailed Description

Internal helper class for processing SLIP frames.

## Constructor & Destructor Documentation

## ◆ TWiMODLRHCI()

TWiMODLRHCI::TWiMODLRHCI | ( | Stream & | s | ) |

Constructor.

Parameters

  s | Reference to the serial interface the the WiMOD. The interface must be initialized before any other function of this class can be used.

## Member Function Documentation

## ◆ begin()

void TWiMODLRHCI::begin | ( | void |  | ) |
| virtual

Init function of the generic HCI message handler.

This function must be called once before any other service can be used.

Reimplemented in WiMODLRBASE, and WiMODLRBASE_PLUS.

## ◆ Process()

void TWiMODLRHCI::Process | ( | void |  | ) |

Handle the receiver path; process all incomming bytes from the WiMOD.

This function checks if there are any bytes from the WiMOD available and tries to start decoding the received data.

Note
  this function must be called at regular base from the main loop.

## ◆ SendHCIMessage()

TWiMODLRResultCodes TWiMODLRHCI::SendHCIMessage | ( | UINT8 | dstSapID,
|  | UINT8 | msgID,
|  | UINT8 | rxMsgID,
|  | UINT8 * | payload,
|  | UINT16 | length
| ) |  |

Generic function for transferring a HCI message to the WiMOD module.

Parameters

  dstSapID | the SAP endpoint to address
  msgID | the command ID to address within the SAP
  rxMsgID | the expected response ID according to the msgID
  payload | pointer to the payload bytes to send
  length | the number of payload bytes to send

Return values

  WiMODLR_RESULT_OK | if everything was OK

Here is the call graph for this function:

## ◆ SendHCIMessageWithoutRx()

TWiMODLRResultCodes TWiMODLRHCI::SendHCIMessageWithoutRx | ( | UINT8 | dstSapID,
|  | UINT8 | msgID,
|  | UINT8 * | payload,
|  | UINT16 | length
| ) |  |

Generic function for transferring a HCI message to the WiMOD module.

Parameters

  dstSapID | the SAP endpoint to address
  msgID | the command ID to address within the SAP
  payload | pointer to the payload bytes to send
  length | the number of payload bytes to send

Return values

  WiMODLR_RESULT_OK | if everything was OK

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

- HCI/WiMODLRHCI.h
- HCI/WiMODLRHCI.cpp