OS  v7.3.3
Documentation
Loading...
Searching...
No Matches
qATCLI_Handler_t Struct Reference

The command argument with all the regarding information of the incoming AT command. More...

#include <qatcli.h>

Data Fields

void * Command
 A pointer to the calling AT Command object.
 
char * StrData
 The string data received after the detected command.
 
char *(* GetArgPtr )(qIndex_t n)
 Helper method to get the pointer where the desired argument starts.
 
int(* GetArgInt )(qIndex_t n)
 Helper method to get the n argument parsed as integer from the incoming AT command.
 
qFloat32_t(* GetArgFlt )(qIndex_t n)
 Helper method to get the n argument parsed as float from the incoming AT command.
 
qUINT32_t(* GetArgHex )(qIndex_t n)
 Helper method to get the n HEX argument parsed qUINT32_t from the incoming AT command.
 
char *(* GetArgString )(qIndex_t n, char *pOut)
 Helper method to get the n argument parsed as string from the incoming AT command.
 
void(* putch )(const char c)
 Helper method for printing character to the CLI output. It displays only one character at a time.
 
void(* puts )(const char *s)
 Writes a string to CLI output without the EOF string appended at the end.
 
char * Output
 The CLI output buffer. Can be written by the user.
 
void * Data
 Points to the user-defined data - Storage Pointer.
 
size_t StrLen
 The length of StrData.
 
size_t NumArgs
 Number of arguments, only available if Type = qATCLI_CMDTYPE_PARA.
 
qATCLI_CommandType_t Type
 The incoming command type. *.
 

Detailed Description

The command argument with all the regarding information of the incoming AT command.

The type it's just a pointer to public data of the CLI instance where the command it subscribed to. From the callback context, can be used to print out extra information as a command response, parse the command parameters, and query properties with crucial information about the detected command, like the type, the number of arguments, and the subsequent string after the command text.

Note
Should be used only in command-callbacks as the only input argument.
The members of this structure must be read as if it were a pointer.

Field Documentation

◆ GetArgFlt

qFloat32_t(* GetArgFlt) (qIndex_t n)

Helper method to get the n argument parsed as float from the incoming AT command.

See also
qIOUtil_AtoF()
Parameters
[in]nThe number of the argument
Returns
The argument parsed as Float. Same behavior of qIOUtil_AtoF(). If argument not found returns 0.0F

◆ GetArgHex

qUINT32_t(* GetArgHex) (qIndex_t n)

Helper method to get the n HEX argument parsed qUINT32_t from the incoming AT command.

See also
qIOUtil_XtoU32()
Parameters
[in]nThe number of the argument
Returns
The HEX argument parsed as qUINT32_t. Same behavior of qIOUtil_XtoU32(). If argument not found returns 0.

◆ GetArgInt

int(* GetArgInt) (qIndex_t n)

Helper method to get the n argument parsed as integer from the incoming AT command.

See also
qIOUtil_AtoI()
Parameters
[in]nThe number of the argument
Returns
The argument parsed as integer. Same behavior of qIOUtil_AtoI(). If argument not found returns 0.

◆ GetArgPtr

char *(* GetArgPtr) (qIndex_t n)

Helper method to get the pointer where the desired argument starts.

Parameters
[in]nThe number of the argument
Returns
A pointer to the desired argument. NULL pointer if the argument is not present.

◆ GetArgString

char *(* GetArgString) (qIndex_t n, char *pOut)

Helper method to get the n argument parsed as string from the incoming AT command.

Parameters
[in]nThe number of the argument
[out]pOutArray in memory where to store the resulting null-terminated string.
Returns
Same as out on success, otherwise returns NULL.

◆ putch

void(* putch) (const char c)

Helper method for printing character to the CLI output. It displays only one character at a time.

Parameters
[in]cThe ASCII character.
Returns
none.

◆ puts

void(* puts) (const char *s)

Writes a string to CLI output without the EOF string appended at the end.

Parameters
[in]sThis is the C string to be written.
Returns
none.