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

String array class used to store the parameters found after a command. More...

#include <Vrekrer_scpi_parser.h>

Inheritance diagram for SCPI_Parameters:
SCPI_String_Array

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]
 

Detailed Description

String array class used to store the parameters found after a command.

See also
SCPI_String_Array

Constructor & Destructor Documentation

◆ SCPI_Parameters()

SCPI_Parameters::SCPI_Parameters ( char *  message)

Constructor that extracts and splits parameters from a message.


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