Vrekrer SCPI parser  0.5
A simple SCPI parser for small Arduino projects.
SCPI_Commands Class Reference

String array class used to store the tokens of a command. More...

#include <Vrekrer_scpi_parser.h>

Inheritance diagram for SCPI_Commands:
SCPI_String_Array

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]
 

Detailed Description

String array class used to store the tokens of a command.

See also
SCPI_String_Array

Constructor & Destructor Documentation

◆ SCPI_Commands()

SCPI_Commands::SCPI_Commands ( char *  message)

Constructor that extracts and tokenize a command from a message.


Parameters
messageMessage 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.