Motor Driver Evaluation Kit NEVB-MTR1-t01-1.0.0
Firmware for NEVB-MTR1-KIT1 for trapezoidal control of BLDC motors using Hall-effect sensors
|
Stores parsed command parameters. More...
#include <scpi_types.h>
Public Member Functions | |
SCPI_Parameters () | |
Default constructor. | |
SCPI_Parameters (char *message) | |
Parse parameters from a message. | |
![]() | |
char * | operator[] (const byte index) const |
Read-only array indexing. | |
void | Append (char *value) |
Append a new string to the array (LIFO push). | |
char * | Pop () |
Remove and return the last string (LIFO pop). | |
char * | First () const |
Get the first appended string. | |
char * | Last () const |
Get the last appended string. | |
uint8_t | Size () const |
Get the number of stored strings. | |
Public Attributes | |
char * | not_processed_message |
Remaining message text after parsing. | |
![]() | |
bool | overflow_error = false |
Flag set when exceeding storage_size . | |
const uint8_t | storage_size = 6 |
Max number of entries allowed. | |
Additional Inherited Members | |
![]() | |
uint8_t | size_ = 0 |
Current size of the array. | |
char * | values_ [6] |
Internal storage for string pointers. | |
Stores parsed command parameters.
Derived from SCPI_String_Array
, this class splits a message using commas to extract and store parameters following an SCPI command.
Whitespace before each parameter is trimmed. The remaining unprocessed string is stored in not_processed_message
.
Definition at line 92 of file scpi_types.h.
SCPI_Parameters::SCPI_Parameters | ( | ) |
SCPI_Parameters::SCPI_Parameters | ( | char * | message | ) |
Parse parameters from a message.
Construct and tokenize parameters from a message.
Splits the input string on ',' characters and trims leading whitespace for each parameter. Stores each parameter as a separate element in the array.
message | Null-terminated string containing the SCPI parameter message. |
Definition at line 166 of file scpi_types.cpp.
char* SCPI_Parameters::not_processed_message |
Remaining message text after parsing.
Definition at line 97 of file scpi_types.h.