51    #define     qATCLI_ERROR_CODE(ecode)     (-(ecode) ) 
   55    typedef volatile struct _qATCLI_Input_s { 
 
   64    #define QATCLI_CMDTYPE_UNDEF    ( 0x0000 ) 
   65    #define QATCLI_CMDTYPE_PARA     ( 0x0100 ) 
   66    #define QATCLI_CMDTYPE_TEST     ( 0x0200 ) 
   67    #define QATCLI_CMDTYPE_READ     ( 0x0400 ) 
   68    #define QATCLI_CMDTYPE_ACT      ( 0x0800 ) 
   70    #define QATCLI_CMDTYPE_SET      ( QATCLI_CMDTYPE_PARA ) 
   71    #define QATCLI_CMDTYPE_CHECK    ( QATCLI_CMDTYPE_ACT ) 
   99    typedef struct _qATCLI_PublicData_s { 
 
 
  190    _qATCLI_PublicData_t; 
 
  202    typedef struct _qATCLI_ControlBlock_s { 
 
  204        struct _qATCLI_Private_s { 
 
  212            void (*xNotifyFcn)(
struct _qATCLI_ControlBlock_s * 
const arg);  
 
  214            qATCLI_Input_t xInput;                                          
 
  215            _qATCLI_PublicData_t xPublic;                                   
 
 
  255    typedef struct _qATCLI_Command_s { 
 
  257        struct _qATCLI_Command_Private_s {               
 
  259            struct _qATCLI_Command_s *next;             
 
 
  310                          const size_t sizeInput,
 
  312                          const size_t sizeOutput );
 
qATCLI_Response_t qATCLI_Exec(qATCLI_t *const cli, char *cmd)
Try to execute the requested command.
Definition qatcli.c:345
 
qBool_t qATCLI_Input_Flush(qATCLI_t *const cli)
Flush the CLI input buffer.
Definition qatcli.c:448
 
qBool_t qATCLI_Raise(qATCLI_t *const cli, const char *cmd)
Sends a command to the specified AT Command Line Interface instance.
Definition qatcli.c:322
 
qBool_t qATCLI_SetBuiltInString(qATCLI_t *const cli, qATCLI_BuiltInString_t which, const char *str)
Set a CLI built-in string to a custom one.
Definition qatcli.c:72
 
qATCLI_Response_t(* qATCLI_CommandCallback_t)(qATCLI_Handler_t arg1)
Pointer to function : An AT-Command callback.
Definition qatcli.h:245
 
qBool_t qATCLI_Setup(qATCLI_t *const cli, const qPutChar_t outFcn, char *pInput, const size_t sizeInput, char *pOutput, const size_t sizeOutput)
Setup an instance of the AT Command Line Interface.
Definition qatcli.c:112
 
qATCLI_Command_t * qATCLI_CmdIterate(const qATCLI_t *const cli, const qBool_t reload)
Iterate between the commands available inside the AT-CLI instance.
Definition qatcli.c:198
 
qBool_t qATCLI_ISRHandlerBlock(qATCLI_t *const cli, char *pData, const size_t n)
Feed the CLI input with a string. This call is mandatory from an interrupt context....
Definition qatcli.c:257
 
qATCLI_BuiltInString_t
Possible values for built-in string identifiers.
Definition qatcli.h:273
 
qATCLI_CommandType_t
An enum to describe the available AT command types.
Definition qatcli.h:78
 
qBool_t qATCLI_ISRHandler(qATCLI_t *const cli, const char c)
Feed the CLI input with a single character. This call is mandatory from an interrupt context....
Definition qatcli.c:224
 
qBool_t qATCLI_Run(qATCLI_t *const cli)
Run the AT Command Line Interface when the input is ready.
Definition qatcli.c:465
 
qATCLI_Response_t
an enumeration to define the possible values that can be returned from the callback of a command.
Definition qatcli.h:31
 
qUINT16_t qATCLI_Options_t
A typedef that holds the options for an AT-Command object.
Definition qatcli.h:250
 
qBool_t qATCLI_CmdSubscribe(qATCLI_t *const cli, qATCLI_Command_t *const cmd, char *textCommand, const qATCLI_CommandCallback_t cFcn, qATCLI_Options_t cmdOpt, void *param)
This function subscribes the CLI instance to a specific command with an associated Callback function,...
Definition qatcli.c:154
 
@ QATCLI_BUILTIN_STR_ERROR_RESPONSE
Definition qatcli.h:276
 
@ QATCLI_BUILTIN_STR_IDENTIFIER
Definition qatcli.h:274
 
@ QATCLI_BUILTIN_STR_TERM_EOL
Definition qatcli.h:278
 
@ QATCLI_BUILTIN_STR_NOTFOUND_RESPONSE
Definition qatcli.h:277
 
@ QATCLI_BUILTIN_STR_OK_RESPONSE
Definition qatcli.h:275
 
@ qATCLI_CMDTYPE_TEST
Definition qatcli.h:81
 
@ qATCLI_CMDTYPE_ACT
Definition qatcli.h:83
 
@ qATCLI_CMDTYPE_PARA
Definition qatcli.h:80
 
@ qATCLI_CMDTYPE_UNDEF
Definition qatcli.h:79
 
@ qATCLI_CMDTYPE_READ
Definition qatcli.h:82
 
@ qATCLI_NOTALLOWED
Definition qatcli.h:33
 
@ qATCLI_OK
Definition qatcli.h:35
 
@ qATCLI_NOTFOUND
Definition qatcli.h:37
 
@ qATCLI_DEVID
Definition qatcli.h:36
 
@ qATCLI_ERROR
Definition qatcli.h:32
 
@ qATCLI_NORESPONSE
Definition qatcli.h:34
 
@ qATCLI_OUTPUT
Definition qatcli.h:38
 
void(* qPutChar_t)(void *arg1, const char arg2)
Pointer to function that write-out a single character.
Definition qioutils.h:52
 
qUINT8_t qBool_t
A type to instantiate an OS boolean variable.
Definition qtypes.h:139
 
size_t qIndex_t
A type to instantiate an OS index variable. Can store the maximum size of a theoretically possible ob...
Definition qtypes.h:146
 
uint32_t qUINT32_t
Unsigned integer type with width of exactly 32 bits respectively.
Definition qtypes.h:48
 
uint16_t qUINT16_t
Unsigned integer type with width of exactly 16 bits respectively.
Definition qtypes.h:46
 
float qFloat32_t
A type to instantiate a single-precision variable of 32-bits IEEE 754.
Definition qtypes.h:111
 
An AT-Command object.
Definition qatcli.h:255
 
void * param
Definition qatcli.h:265
 
char * Text
Definition qatcli.h:266
 
The command argument with all the regarding information of the incoming AT command.
Definition qatcli.h:99
 
qUINT32_t(* GetArgHex)(qIndex_t n)
Helper method to get the n HEX argument parsed qUINT32_t from the incoming AT command.
Definition qatcli.h:142
 
int(* GetArgInt)(qIndex_t n)
Helper method to get the n argument parsed as integer from the incoming AT command.
Definition qatcli.h:124
 
char * Output
The CLI output buffer. Can be written by the user.
Definition qatcli.h:169
 
size_t NumArgs
Number of arguments, only available if Type = qATCLI_CMDTYPE_PARA.
Definition qatcli.h:181
 
void * Data
Points to the user-defined data - Storage Pointer.
Definition qatcli.h:173
 
size_t StrLen
The length of StrData.
Definition qatcli.h:177
 
void * Command
A pointer to the calling AT Command object.
Definition qatcli.h:103
 
qFloat32_t(* GetArgFlt)(qIndex_t n)
Helper method to get the n argument parsed as float from the incoming AT command.
Definition qatcli.h:133
 
qATCLI_CommandType_t Type
The incoming command type. *.
Definition qatcli.h:185
 
void(* puts)(const char *s)
Writes a string to CLI output without the EOF string appended at the end.
Definition qatcli.h:165
 
char * StrData
The string data received after the detected command.
Definition qatcli.h:107
 
void(* putch)(const char c)
Helper method for printing character to the CLI output. It displays only one character at a time.
Definition qatcli.h:158
 
An AT Command Line Interface (CLI) object.
Definition qatcli.h:202