| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_StubQ(scpi_t * context) { |
| | | SCPI_ResultString(context, ""); |
| | | SCPI_ResultInt32(context, 0); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_SystemVersionQ(scpi_t * context) { |
| | | SCPI_ResultString(context, SCPI_DEV_VERSION); |
| | | SCPI_ResultMnemonic(context, SCPI_STD_VERSION_REVISION); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_SystemErrorNextQ(scpi_t * context) { |
| | | int16_t err = SCPI_ErrorPop(context); |
| | | scpi_error_t error; |
| | | if(!SCPI_ErrorPopEx(context, &error))return SCPI_RES_ERR; |
| | | |
| | | //int16_t err = SCPI_ErrorPop(context); |
| | | |
| | | SCPI_ResultInt(context, err); |
| | | SCPI_ResultText(context, SCPI_ErrorTranslate(err)); |
| | | SCPI_ResultInt32(context, error.error_code); |
| | | SCPI_ResultText(context, SCPI_ErrorTranslate(error.error_code)); |
| | | |
| | | size_t info_len=0; |
| | | if(error.device_dependent_info){ |
| | | info_len=SCPIDEFINE_strnlen(error.device_dependent_info,255); |
| | | SCPI_ResultCharacters(context, ";", 1); |
| | | SCPI_ResultText(context, error.device_dependent_info); |
| | | SCPIDEFINE_free(error.device_dependent_info); |
| | | } |
| | | |
| | | |
| | | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_SystemErrorCountQ(scpi_t * context) { |
| | | SCPI_ResultInt(context, SCPI_ErrorCount(context)); |
| | | SCPI_ResultInt32(context, SCPI_ErrorCount(context)); |
| | | |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_StatusQuestionableEventQ(scpi_t * context) { |
| | | // return value |
| | | SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_QUES)); |
| | | /* return value */ |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_QUES)); |
| | | |
| | | // clear register |
| | | /* clear register */ |
| | | SCPI_RegSet(context, SCPI_REG_QUES, 0); |
| | | |
| | | return SCPI_RES_OK; |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_StatusQuestionableEnableQ(scpi_t * context) { |
| | | // return value |
| | | SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_QUESE)); |
| | | /* return value */ |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_QUESE)); |
| | | |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | */ |
| | | scpi_result_t SCPI_StatusQuestionableEnable(scpi_t * context) { |
| | | int32_t new_QUESE; |
| | | if (SCPI_ParamInt(context, &new_QUESE, TRUE)) { |
| | | SCPI_RegSet(context, SCPI_REG_QUESE, new_QUESE); |
| | | if (SCPI_ParamInt32(context, &new_QUESE, TRUE)) { |
| | | SCPI_RegSet(context, SCPI_REG_QUESE, (scpi_reg_val_t) new_QUESE); |
| | | } |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_StatusPreset(scpi_t * context) { |
| | | // clear STATUS:... |
| | | /* clear STATUS:... */ |
| | | SCPI_RegSet(context, SCPI_REG_QUES, 0); |
| | | return SCPI_RES_OK; |
| | | } |