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 tokens. More...
#include <scpi_types.h>
Public Member Functions | |
SCPI_Commands () | |
Default constructor. | |
SCPI_Commands (char *message) | |
Parse command tokens 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 token 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 tokens.
Derived from SCPI_String_Array
, this class is used to tokenize an SCPI command message into parts separated by ':'.
Remaining unparsed text is stored in not_processed_message
.
Definition at line 74 of file scpi_types.h.
SCPI_Commands::SCPI_Commands | ( | ) |
SCPI_Commands::SCPI_Commands | ( | char * | message | ) |
Parse command tokens from a message.
Construct and tokenize a SCPI command from a message.
Splits the input string on ':' characters, storing resulting tokens in the array. Terminates tokenization at the first whitespace (space or tab), storing the rest in not_processed_message
.
message | Null-terminated string containing the SCPI command message. |
Definition at line 129 of file scpi_types.cpp.
char* SCPI_Commands::not_processed_message |
Remaining message text after token parsing.
Definition at line 79 of file scpi_types.h.