OS
v1.7.5
Documentation
|
The command argument with all the regarding information of the incoming AT command. More...
#include <cli.hpp>
Public Member Functions | |
commandType | getType (void) const |
Retrieve the he incoming command type.*. | |
char * | getStringData (void) |
The string data received after the detected command. | |
void * | getData (void) |
Retrieve a pointer to the user-defined data - Storage Pointer. | |
size_t | getStringLength (void) const |
The length of the stringStrData. | |
size_t | getNumArgs (void) const |
Retrieve the number of arguments of the incoming AT command. only available if Type = commandType::PARA. | |
char * | getArgPtr (index_t n) const |
Helper method to get the pointer where the desired argument starts. | |
int | getArgInt (index_t n) const |
Helper method to get the n argument parsed as integer from the incoming AT command. | |
float32_t | getArgFloat (index_t n) const |
Helper method to get the n argument parsed as float from the incoming AT command. | |
uint32_t | getArgHex (index_t n) const |
Helper method to get the n HEX argument parsed uint32_t from the incoming AT command. | |
char * | getArgString (index_t n, char *pOut) |
Helper method to get the n argument parsed as string from the incoming AT command. | |
void | writeOut (const char c) const |
Helper method for printing a character to the CLI output. It displays only one character at a time. | |
void | writeOut (const char *s) const |
Writes a string to CLI output without the EOF string appended at the end. | |
command & | thisCommand (void) noexcept |
return the instance of command being evaluated | |
Public Attributes | |
char * | output |
The CLI output buffer. Can be written by the user. | |
The command argument with all the regarding information of the incoming AT command.
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.
Helper method to get the n argument parsed as float from the incoming AT command.
[in] | n | The number of the argument |
uint32_t qOS::cli::handler_t::getArgHex | ( | index_t | n | ) | const |
Helper method to get the n HEX argument parsed uint32_t
from the incoming AT command.
[in] | n | The number of the argument |
uint32_t
. Same behavior of util::hexStringToUnsigned()(). If argument not found returns 0. int qOS::cli::handler_t::getArgInt | ( | index_t | n | ) | const |
Helper method to get the n argument parsed as integer from the incoming AT command.
[in] | n | The number of the argument |
char * qOS::cli::handler_t::getArgPtr | ( | index_t | n | ) | const |
Helper method to get the pointer where the desired argument starts.
[in] | n | The number of the argument |
NULL
pointer if the argument is not present. char * qOS::cli::handler_t::getArgString | ( | index_t | n, |
char * | pOut ) |
Helper method to get the n argument parsed as string from the incoming AT command.
[in] | n | The number of the argument |
[out] | pOut | Array in memory where to store the resulting null-terminated string. |
nullptr
.
|
inline |
Retrieve a pointer to the user-defined data - Storage Pointer.
|
inline |
Retrieve the number of arguments of the incoming AT command. only available if Type = commandType::PARA.
|
inline |
The string data received after the detected command.
|
inline |
The length of the stringStrData.
|
inline |
Retrieve the he incoming command type.*.
|
inlinenoexcept |
return the instance of command being evaluated
void qOS::cli::handler_t::writeOut | ( | const char * | s | ) | const |
Writes a string to CLI output without the EOF
string appended at the end.
[in] | s | This is the C string to be written. |
void qOS::cli::handler_t::writeOut | ( | const char | c | ) | const |
Helper method for printing a character to the CLI output. It displays only one character at a time.
[in] | c | The ASCII character. |
char* qOS::cli::handler_t::output |
The CLI output buffer. Can be written by the user.