OS  v7.3.3
Documentation
Loading...
Searching...
No Matches
Response handler

API to simplify the handling of requested responses from terminal interfaces. More...

Collaboration diagram for Response handler:

Data Structures

struct  qResponse_t
 A Response Handler object. More...
 

Functions

qBool_t qResponse_Setup (qResponse_t *const r, char *xLocBuff, const size_t nMax)
 Initialize the instance of the response handler object.
 
qBool_t qResponse_Reset (qResponse_t *const r)
 Reset the Response Handler.
 
qBool_t qResponse_Received (qResponse_t *const r, const char *pattern, const size_t n)
 Non-Blocking Response check.
 
qBool_t qResponse_ReceivedWithTimeout (qResponse_t *const r, const char *pattern, const size_t n, const qTime_t t)
 Non-Blocking Response check with timeout.
 
qBool_t qResponse_ISRHandler (qResponse_t *const r, const char rxChar)
 ISR receiver for the response handler.
 

Detailed Description

API to simplify the handling of requested responses from terminal interfaces.

Function Documentation

◆ qResponse_ISRHandler()

qBool_t qResponse_ISRHandler ( qResponse_t *const r,
const char rxChar )

ISR receiver for the response handler.

Parameters
[in]rA pointer to the Response Handler object.
[in]rxCharThe byte-data from the receiver
Returns
qTrue when the Response handler match the request from qResponse_Received()

◆ qResponse_Received()

qBool_t qResponse_Received ( qResponse_t *const r,
const char * pattern,
const size_t n )

Non-Blocking Response check.

Parameters
[in]rA pointer to the Response Handler object.
[in]patternThe data checked in the receiver ISR
[in]nThe length of the data pointer by Pattern (if Pattern is string, set n to 0 to auto-compute the length)
Returns
qTrue if there is a response acknowledge, otherwise returns qFalse.

◆ qResponse_ReceivedWithTimeout()

qBool_t qResponse_ReceivedWithTimeout ( qResponse_t *const r,
const char * pattern,
const size_t n,
const qTime_t t )

Non-Blocking Response check with timeout.

Parameters
[in]rA pointer to the Response Handler object.
[in]patternThe data checked in the receiver ISR
[in]nThe length of the data pointer by Pattern (if pattern is string, set n to 0 to auto-compute the length)
[in]tThe timeout value given in seconds
Returns
qTrue if there is a response acknowledge, qResponseTimeout if timeout expires otherwise returns qFalse

◆ qResponse_Reset()

qBool_t qResponse_Reset ( qResponse_t *const r)

Reset the Response Handler.

Parameters
[in]rA pointer to the Response Handler object.
Returns
qTrue on success. Otherwise returns qFalse.

◆ qResponse_Setup()

qBool_t qResponse_Setup ( qResponse_t *const r,
char * xLocBuff,
const size_t nMax )

Initialize the instance of the response handler object.

Parameters
[in]rA pointer to the Response Handler object.
[in]xLocBuffA pointer to the memory block where the desired response will remain.
[in]nMaxThe size of xLocBuff
Returns
On success returns qTrue, otherwise returns qFalse.