String array class used to store the parameters found after a command. More...
#include <Vrekrer_scpi_parser.h>
Public Member Functions | |
SCPI_Parameters () | |
Dummy constructor. | |
SCPI_Parameters (char *message) | |
Constructor that extracts and splits parameters 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 parameters found after a command.
SCPI_Parameters::SCPI_Parameters | ( | char * | message | ) |
Constructor that extracts and splits parameters from a message.
message[in,out] | Message to process. |
The message is processed until ';' 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 (parameters) are stored in the array after trimming any start or end spaces.