| | |
| | | */ |
| | | scpi_result_t SCPI_CoreEse(scpi_t * context) { |
| | | int32_t new_ESE; |
| | | if (SCPI_ParamInt(context, &new_ESE, TRUE)) { |
| | | SCPI_RegSet(context, SCPI_REG_ESE, new_ESE); |
| | | if (SCPI_ParamInt32(context, &new_ESE, TRUE)) { |
| | | SCPI_RegSet(context, SCPI_REG_ESE, (scpi_reg_val_t)new_ESE); |
| | | } |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreEseQ(scpi_t * context) { |
| | | SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_ESE)); |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_ESE)); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreEsrQ(scpi_t * context) { |
| | | SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_ESR)); |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_ESR)); |
| | | SCPI_RegSet(context, SCPI_REG_ESR, 0); |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreIdnQ(scpi_t * context) { |
| | | SCPI_ResultMnemonic(context, context->idn[0]); |
| | | SCPI_ResultMnemonic(context, context->idn[1]); |
| | | SCPI_ResultMnemonic(context, context->idn[2]); |
| | | SCPI_ResultMnemonic(context, context->idn[3]); |
| | | int i; |
| | | for (i = 0; i<4; i++) { |
| | | if (context->idn[i]) { |
| | | SCPI_ResultMnemonic(context, context->idn[i]); |
| | | } else { |
| | | SCPI_ResultMnemonic(context, "0"); |
| | | } |
| | | } |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | */ |
| | | scpi_result_t SCPI_CoreOpcQ(scpi_t * context) { |
| | | /* Operation is always completed */ |
| | | SCPI_ResultInt(context, 1); |
| | | SCPI_ResultInt32(context, 1); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | */ |
| | | scpi_result_t SCPI_CoreSre(scpi_t * context) { |
| | | int32_t new_SRE; |
| | | if (SCPI_ParamInt(context, &new_SRE, TRUE)) { |
| | | SCPI_RegSet(context, SCPI_REG_SRE, new_SRE); |
| | | if (SCPI_ParamInt32(context, &new_SRE, TRUE)) { |
| | | SCPI_RegSet(context, SCPI_REG_SRE, (scpi_reg_val_t)new_SRE); |
| | | } |
| | | return SCPI_RES_OK; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreSreQ(scpi_t * context) { |
| | | SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_SRE)); |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_SRE)); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreStbQ(scpi_t * context) { |
| | | SCPI_ResultInt(context, SCPI_RegGet(context, SCPI_REG_STB)); |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_STB)); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | */ |
| | | scpi_result_t SCPI_CoreTstQ(scpi_t * context) { |
| | | (void) context; |
| | | SCPI_ResultInt(context, 0); |
| | | SCPI_ResultInt32(context, 0); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |