| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef SCPI_BASE_H
- #define SCPI_BASE_H
- // ==============================================================================================
- // @eScpiStatus_t
- // Parser-functions returns statuses:
- typedef enum
- {
- eScpiStatus__min = -2147483648, // don't care, just makes the enum to take 4 bytes
- // ------------------------------------------------------------------------------------------
- // Error statuses:
- eScpiStatus_invalid = -2, // Invalid argument value, check the input parameters and repeat
- eScpiStatus_failed = -1, // Operation failed due to some run-time error
- // Success status:
- eScpiStatus_success = 0, // Operation succeeded
- // Warning status:
- eScpiStatus_need_data = 1, // Operation is in progress, need more data to continue
- // ------------------------------------------------------------------------------------------
- eScpiStatus__max = 2147483647 // don't care, just makes the enum to take 4 bytes
- }
- eScpiStatus_t;
- // ==============================================================================================
- typedef struct
- {
- const char * shead; // token beginning
- const char * stail; // token ending
- }
- sStrToken_t;
- // ==============================================================================================
- typedef const char * xArgument_t; // NULL-terminated string, command argument string
- // ==============================================================================================
-
- // ==============================================================================================
- #define SCPI_VERSION_YEAR 1999 // SCPI Version 1999.0
- #define SCPI_VERSION_REVISION 0 // SCPI Version 1999.0
- // SCPI Maximum input command string length
- #define SCPI_MAX_INPUT_COMMAND 384
- // SCPI Error log capacity in bytes (including service overhead)
- #define SCPI_ERRORLOG_CAPACITY 384
- // SCPI Error description length (maximum)
- #define SCPI_ERRORMSG_MAX 128
- // SCPI Command Arguments limit for all the commands
- #define SCPI_MAX_ARGS 5
- // General purpose command buffer
- #define SCPI_MAX_CMD_TEMP_BUFFER 128
-
- // SCPI Array Arguments Buffer
- #define SCPI_MAX_ARRAY_ARG_BUFFER 50
- // Maximum recursive call depth during command processing
- // If no optional subsystems is used, set the value to 1.
- #define SCPI_MAX_CMD_SEARCH_DEPTH 5
- // @SCPI_MAX_NUMBER_LENGTH
- // Maximum supporting length of SCPI Numbers
- // See @processNumericArgument for details
- #define SCPI_MAX_NUMBER_LENGTH 64
- #endif
|