API to simplify the handling of requested responses from terminal interfaces.
More...
API to simplify the handling of requested responses from terminal interfaces.
◆ qResponse_ISRHandler()
ISR receiver for the response handler.
- Parameters
-
[in] | r | A pointer to the Response Handler object. |
[in] | rxChar | The byte-data from the receiver |
- Returns
- qTrue when the Response handler match the request from qResponse_Received()
◆ qResponse_Received()
Non-Blocking Response check.
- Parameters
-
[in] | r | A pointer to the Response Handler object. |
[in] | pattern | The data checked in the receiver ISR |
[in] | n | The 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()
Non-Blocking Response check with timeout.
- Parameters
-
[in] | r | A pointer to the Response Handler object. |
[in] | pattern | The data checked in the receiver ISR |
[in] | n | The length of the data pointer by Pattern (if pattern is string, set n to 0 to auto-compute the length) |
[in] | t | The timeout value given in seconds |
- Returns
- qTrue if there is a response acknowledge, qResponseTimeout if timeout expires otherwise returns qFalse
◆ qResponse_Reset()
Reset the Response Handler.
- Parameters
-
[in] | r | A pointer to the Response Handler object. |
- Returns
- qTrue on success. Otherwise returns qFalse.
◆ qResponse_Setup()
Initialize the instance of the response handler object.
- Parameters
-
[in] | r | A pointer to the Response Handler object. |
[in] | xLocBuff | A pointer to the memory block where the desired response will remain. |
[in] | nMax | The size of xLocBuff |
- Returns
- On success returns qTrue, otherwise returns qFalse.