| | |
| | | #include "scpi/utils.h" |
| | | #include "scpi/error.h" |
| | | #include "lexer_private.h" |
| | | #include "scpi/types.h" |
| | | |
| | | |
| | | /* |
| | |
| | | /* |
| | | * units definition IEEE 488.2-1992 tab 7-1 |
| | | */ |
| | | |
| | | |
| | | /* |
| | | scpi_units_def 是单位定义表 提供单位转换 |
| | | 拓展单位在此处添加 |
| | | */ |
| | | |
| | | const scpi_unit_def_t scpi_units_def[] = { |
| | | #if USE_UNITS_PARTICLES |
| | | /* Absorbet dose */ |
| | |
| | | /* |
| | | * Special number values definition |
| | | */ |
| | | |
| | | |
| | | //特殊数值定义 |
| | | const scpi_choice_def_t scpi_special_numbers_def[] = { |
| | | {/* name */ "MINimum", /* type */ SCPI_NUM_MIN}, |
| | | {/* name */ "MAXimum", /* type */ SCPI_NUM_MAX}, |
| | |
| | | |
| | | if (value->special) { |
| | | if (SCPI_ChoiceToName(special, value->content.tag, &type)) { |
| | | strncpy(str, type, len); |
| | | memcpy(str, type, len); |
| | | result = SCPIDEFINE_strnlen(str, len - 1); |
| | | str[result] = '\0'; |
| | | return result; |