String array class used to store the tokens of a command. More...
#include <Vrekrer_scpi_parser.h>
Public Member Functions | |
SCPI_Commands () | |
Dummy constructor. | |
SCPI_Commands (char *message) | |
Constructor that extracts and tokenize a command from a message. More... | |
char * | operator[] (const byte index) |
Add indexing capability. | |
void | Append (char *value) |
Append new string (LIFO stack Push). | |
char * | Pop () |
LIFO stack Pop. | |
char * | First () |
Returns the first element of the array. | |
char * | Last () |
Returns the last element of the array. | |
uint8_t | Size () |
Array size. | |
Data Fields | |
char * | not_processed_message |
Not processed part of the message after the constructor is called. | |
Protected Attributes | |
uint8_t | size_ = 0 |
char * | values_ [SCPI_ARRAY_SYZE] |
String array class used to store the tokens of a command.
SCPI_Commands::SCPI_Commands | ( | char * | message | ) |
Constructor that extracts and tokenize a command from a message.
message | Message to process. |
The message is processed until a space, ';' or the end of the string is found, the rest is available at not_processed_message.
The processed part is split on the ':' characters, the resulting parts (tokens) are stored in the array.