| | |
| | | // 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; |
| | | } |
| | | |
| | | |
| | | static scpi_result_t DMM_MeasureVoltageAcQ(scpi_t * context) { |
| | | scpi_number_t param1, param2; |
| | |
| | | // 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_CHOICE_LIST_END /* termination of option list */ |
| | | }; |
| | | |
| | | |
| | | static scpi_result_t TEST_ChoiceQ(scpi_t * context) { |
| | | |
| | | int32_t param; |
| | | const char * name; |
| | | |
| | | |
| | | if (!SCPI_ParamChoice(context, trigger_source, ¶m, TRUE)) { |
| | | return SCPI_RES_ERR; |
| | | } |
| | | |
| | | |
| | | 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); |
| | | |
| | | 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 = { |
| | | .buffer = |
| | | { |
| | | .length = SCPI_INPUT_BUFFER_LENGTH, |
| | | .data = scpi_input_buffer, |
| | | }, |
| | | .interface = &scpi_interface, |
| | | .registers = scpi_regs, |
| | | .units = scpi_units_def, |
| | | .idn = {"MANUFACTURE", "INSTR2013", NULL, "01-02"}, |
| | | .idn = |
| | | {"MANUFACTURE", "INSTR2013", NULL, "01-02"}, |
| | | }; |
| | | |