| | |
| | | // do something, if parameter not present |
| | | } |
| | | |
| | | |
| | | |
| | | SCPI_NumberToStr(context, scpi_special_numbers_def, ¶m1, bf, 15); |
| | | fprintf(stderr, "\tP1=%s\r\n", bf); |
| | | |
| | | |
| | | |
| | | SCPI_NumberToStr(context, scpi_special_numbers_def, ¶m2, bf, 15); |
| | | fprintf(stderr, "\tP2=%s\r\n", bf); |
| | | |
| | | SCPI_ResultDouble(context, 0); |
| | | |
| | | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | |
| | | scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) { |
| | | scpi_number_t param1, param2; |
| | |
| | | SCPI_CHOICE_LIST_END /* termination of option list */ |
| | | }; |
| | | |
| | | |
| | | scpi_result_t TEST_ChoiceQ(scpi_t * context) { |
| | | |
| | | int32_t param; |
| | |
| | | } |
| | | |
| | | SCPI_ChoiceToName(trigger_source, param, &name); |
| | | fprintf(stderr, "\tP1=%s (%ld)\r\n", name, (long int)param); |
| | | fprintf(stderr, "\tP1=%s (%ld)\r\n", name, (long int) param); |
| | | |
| | | SCPI_ResultInt32(context, param); |
| | | |
| | |
| | | |
| | | scpi_result_t TEST_Numbers(scpi_t * context) { |
| | | |
| | | fprintf(stderr, "RAW CMD %.*s\r\n", (int)context->param_list.cmd_raw.length, context->param_list.cmd_raw.data); |
| | | fprintf(stderr, "RAW CMD %.*s\r\n", (int) context->param_list.cmd_raw.length, context->param_list.cmd_raw.data); |
| | | |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | char buffer[100]; |
| | | size_t copy_len; |
| | | |
| | | if(!SCPI_ParamCopyText(context, buffer, sizeof(buffer), ©_len, false)) { |
| | | if (!SCPI_ParamCopyText(context, buffer, sizeof (buffer), ©_len, false)) { |
| | | buffer[0] = '\0'; |
| | | } |
| | | |
| | |
| | | |
| | | scpi_t scpi_context = { |
| | | /* cmdlist */ scpi_commands, |
| | | /* buffer */ { /* length */ SCPI_INPUT_BUFFER_LENGTH, /* position */ 0, /* data */ scpi_input_buffer}, |
| | | /* param_list */ { /* cmd */ NULL, /* lex_state */ {NULL, NULL, 0}, /* cmd_raw */ {0, 0, NULL}}, |
| | | /* buffer */ |
| | | { /* length */ SCPI_INPUT_BUFFER_LENGTH, /* position */ 0, /* data */ scpi_input_buffer}, |
| | | /* param_list */ |
| | | { /* cmd */ NULL, /* lex_state */ |
| | | {NULL, NULL, 0}, /* cmd_raw */ |
| | | {0, 0, NULL}}, |
| | | /* interface */ &scpi_interface, |
| | | /* output_count */ 0, |
| | | /* input_count */ 0, |
| | |
| | | /* registers */ scpi_regs, |
| | | /* units */ scpi_units_def, |
| | | /* user_context */ NULL, |
| | | /* parser_state */ { /* programHeader */ {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* programData */ {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* numberOfParameters */ 0, /* termination */ SCPI_MESSAGE_TERMINATION_NONE}, |
| | | /* idn */ {"MANUFACTURE", "INSTR2013", NULL, "01-02"}, |
| | | /* parser_state */ |
| | | { /* programHeader */ |
| | | {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* programData */ |
| | | {SCPI_TOKEN_UNKNOWN, NULL, 0}, /* numberOfParameters */ 0, /* termination */ SCPI_MESSAGE_TERMINATION_NONE |
| | | }, |
| | | /* idn */ |
| | | {"MANUFACTURE", "INSTR2013", NULL, "01-02"}, |
| | | }; |
| | | |