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
Loading...
Searching...
No Matches
scpi_types.h
Go to the documentation of this file.
1/* This file has been prepared for Doxygen automatic documentation generation.*/
28
29#ifndef _SCPI_TYPES_CODE_H
30#define _SCPI_TYPES_CODE_H
31
32#include <Arduino.h>
33#include "scpi_config.h"
34
50{
51public:
52 char *operator[](const byte index) const;
53 void Append(char *value);
54 char *Pop();
55 char *First() const;
56 char *Last() const;
57 uint8_t Size() const;
58 bool overflow_error = false;
59 const uint8_t storage_size = SCPI_ARRAY_SYZE;
60protected:
61 uint8_t size_ = 0;
63};
64
75{
76public:
78 SCPI_Commands(char *message);
80};
81
93{
94public:
96 SCPI_Parameters(char *message);
98};
99
103
107
111
134
135#endif
Stores parsed command tokens.
Definition scpi_types.h:75
SCPI_Commands()
Default constructor.
char * not_processed_message
Remaining message text after token parsing.
Definition scpi_types.h:79
Stores parsed command parameters.
Definition scpi_types.h:93
char * not_processed_message
Remaining message text after parsing.
Definition scpi_types.h:97
SCPI_Parameters()
Default constructor.
Variable size string array class.
Definition scpi_types.h:50
uint8_t size_
Current size of the array.
Definition scpi_types.h:61
uint8_t Size() const
Get the number of stored strings.
char * operator[](const byte index) const
Read-only array indexing.
bool overflow_error
Flag set when exceeding storage_size.
Definition scpi_types.h:58
const uint8_t storage_size
Max number of entries allowed.
Definition scpi_types.h:59
void Append(char *value)
Append a new string to the array (LIFO push).
char * values_[6]
Internal storage for string pointers.
Definition scpi_types.h:62
char * Last() const
Get the last appended string.
char * Pop()
Remove and return the last string (LIFO pop).
char * First() const
Get the first appended string.
SCPI parser configuration header file.
#define SCPI_HASH_TYPE
Integer data type used for calculating and storing command hash codes.
#define SCPI_ARRAY_SYZE
Maximum branch size of the command tree and the maximum number of parameters that can be parsed from ...
Definition scpi_config.h:94
uint8_t scpi_hash_t
Alias for SCPI integer hash type defined in SCPI_HASH_TYPE.
Definition scpi_types.h:110
ErrorCode
SCPI Error codes.
Definition scpi_types.h:118
@ MissingOrInvalidParameter
A required parameter was missing or an invalid parameter was provided.
Definition scpi_types.h:132
@ BufferOverflow
The message buffer was exceeded during message reception.
Definition scpi_types.h:129
@ NoError
No error occurred.
Definition scpi_types.h:120
@ Timeout
A timeout occurred before receiving the expected termination characters.
Definition scpi_types.h:126
@ UnknownCommand
An unknown command was received that could not be matched to a known handler.
Definition scpi_types.h:123
SCPI_Parameters SCPI_P
Alias for SCPI_Parameters.
Definition scpi_types.h:106
SCPI_Commands SCPI_C
Alias for SCPI_Commands.
Definition scpi_types.h:102