![]()  | 
  
    PS_Fgen_FW
    4da88f4073c1cc65ea45c3a652a2751e495e50db
    
   Firmware for an Power Supply and Function Generator build from an ATX power supply 
   | 
 
Containing defines and function prototypes of the SCPI part of the device. More...
#include "../libraries/scpi-parser/inc/scpi/parser.h"#include "../libraries/scpi-parser/inc/scpi/ieee488.h"#include "../libraries/scpi-parser/inc/scpi/error.h"#include "../libraries/scpi-parser/inc/scpi/constants.h"#include "../libraries/scpi-parser/inc/scpi/minimal.h"#include "../libraries/scpi-parser/inc/scpi/units.h"#include "../libraries/scpi-parser/inc/scpi/utils.h"#include "../libraries/scpi-parser/inc/scpi/expression.h"#include "../Configuration.h"Go to the source code of this file.
Typedefs | |
| typedef enum SCPIChannelParameters | SCPIChannelParameters_t | 
| Available SCPI channel parameters.   | |
Enumerations | |
| enum | SCPIChannelParameters {  SCPI_CHPARAM_OUTPUTSTATE , SCPI_CHPARAM_AMPLITUDE , SCPI_CHPARAM_OFFSET , SCPI_CHPARAM_FREQUENCY , SCPI_CHPARAM_SIGNALFORM , SCPI_CHPARAM_MEASURED_AMPLITUDE , SCPI_CHPARAM_MEASURED_CURRENT , SCPI_CHPARAM_MEASURED_POWER , SCPI_CHPARAM_OVP_LEVEL , SCPI_CHPARAM_OVP_STATE , SCPI_CHPARAM_OVP_DELAY , SCPI_CHPARAM_OCP_LEVEL , SCPI_CHPARAM_OCP_STATE , SCPI_CHPARAM_OCP_DELAY , SCPI_CHPARAM_OPP_LEVEL , SCPI_CHPARAM_OPP_STATE , SCPI_CHPARAM_OPP_DELAY }  | 
| Available SCPI channel parameters.  More... | |
Functions | |
| size_t | SCPI_Write (scpi_t *context, const char *data, size_t len) | 
| Write data to SCPI output.   | |
| scpi_result_t | SCPI_Flush (scpi_t *context) | 
| Flush data to SCPI output.   | |
| int | SCPI_Error (scpi_t *context, int_fast16_t err) | 
| Emit error to the SCPI output.   | |
| scpi_result_t | SCPI_Control (scpi_t *context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val) | 
| Wrapper function to control interface from context.   | |
| scpi_result_t | SCPI_Reset (scpi_t *context) | 
| Called when a *RST command is received.   | |
| void | SCPI_Init_Device () | 
| Initialize the SCPI part of the device.  | |
| scpi_result_t | SCPI_SetResult_ChannelOutOfRange (scpi_t *context) | 
| Return a "Channel number out of range." message with the SCPI context.   | |
| scpi_result_t | SCPI_SetResult_NotSupportedByChannel (scpi_t *context) | 
| Return a "Operation not supported by channel." message with the SCPI context.   | |
| scpi_result_t | SCPI_QueryChannelParameter (scpi_t *context, SCPIChannelParameters_t paramType) | 
| Query the value of a specific channel parameter and write it to the output.   | |
| scpi_result_t | SCPI_SetChannelParameter (scpi_t *context, SCPIChannelParameters_t paramType) | 
| Set the value of a specific channel parameter to the value given with the SCPI parameter.   | |
| bool | SCPI_GetNumericFromParam (scpi_t *context, const scpi_number_t ¶m, float &value, scpi_unit_t unit, float min, float max, float def, float step) | 
| Get the numeric repesentation from the SCPI parameter.   | |
| scpi_result_t | scpi_cmd_outputState (scpi_t *context) | 
| Function executed when the OUTPut#[:STATe] command was received.  | |
| scpi_result_t | scpi_cmd_outputStateQ (scpi_t *context) | 
| Function executed when the OUTPut#[:STATe]?   | |
| scpi_result_t | scpi_cmd_outputGeneral (scpi_t *context) | 
| Function executed when the OUTPut:GENeral command was received.  | |
| scpi_result_t | scpi_cmd_outputGeneralQ (scpi_t *context) | 
| Function executed when the OUTPut:GENeral?   | |
| scpi_result_t | scpi_cmd_measureScalarCurrentDCQ (scpi_t *context) | 
| Function executed when the MEASure#[:SCALar]:CURRent[:DC]?   | |
| scpi_result_t | scpi_cmd_measureScalarPowerDCQ (scpi_t *context) | 
| Function executed when the MEASure#[:SCALar]:POWer[:DC]?   | |
| scpi_result_t | scpi_cmd_measureScalarVoltageDCQ (scpi_t *context) | 
| Function executed when the MEASure#[:SCALar][:VOLTage][:DC]?   | |
| scpi_result_t | scpi_cmd_sourceVoltageLevelImmediateAmplitude (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage[:LEVel][:IMMediate][:AMPLitude] command was received.  | |
| scpi_result_t | scpi_cmd_sourceVoltageLevelImmediateAmplitudeQ (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage[:LEVel][:IMMediate][:AMPLitude]?   | |
| scpi_result_t | scpi_cmd_sourceVoltageLevelImmediateOffset (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage[:LEVel][:IMMediate]:OFFSet command was received.  | |
| scpi_result_t | scpi_cmd_sourceVoltageLevelImmediateOffsetQ (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage[:LEVel][:IMMediate]:OFFSet?   | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionLevel (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection[:LEVel] command was received.  | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionLevelQ (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection[:LEVel]?   | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionState (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection:STATe command was received.  | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionStateQ (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection:STATe?   | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionDelay (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection:DELay command was received.  | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionDelayQ (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection:DELay?   | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionTrippedQ (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection:TRIPped?   | |
| scpi_result_t | scpi_cmd_sourceVoltageProtectionClear (scpi_t *context) | 
| Function executed when the SOURce#:VOLTage:PROTection:CLEar command was received.  | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionLevel (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection[:LEVel] command was received.  | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionLevelQ (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection[:LEVel]?   | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionState (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection:STATe command was received.  | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionStateQ (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection:STATe?   | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionDelay (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection:DELay command was received.  | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionDelayQ (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection:DELay?   | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionTrippedQ (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection:TRIPped?   | |
| scpi_result_t | scpi_cmd_sourceCurrentProtectionClear (scpi_t *context) | 
| Function executed when the SOURce#:CURRent:PROTection:CLEar command was received.  | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionLevel (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection[:LEVel] command was received.  | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionLevelQ (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection[:LEVel]?   | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionState (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection:STATe command was received.  | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionStateQ (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection:STATe?   | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionDelay (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection:DELay command was received.  | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionDelayQ (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection:DELay?   | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionTrippedQ (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection:TRIPped?   | |
| scpi_result_t | scpi_cmd_sourcePowerProtectionClear (scpi_t *context) | 
| Function executed when the SOURce#:POWer:PROTection:CLEar command was received.  | |
| scpi_result_t | scpi_cmd_sourceFrequencyFixed (scpi_t *context) | 
| Function executed when the SOURce#:FREQuency[:CW] command was received.  | |
| scpi_result_t | scpi_cmd_sourceFrequencyFixedQ (scpi_t *context) | 
| Function executed when the SOURce#:FREQuency[:CW]?   | |
| scpi_result_t | scpi_cmd_sourceFunctionShape (scpi_t *context) | 
| Function executed when the SOURce#:FUNCtion[:SHAPe] command was received.  | |
| scpi_result_t | scpi_cmd_sourceFunctionShapeQ (scpi_t *context) | 
| Function executed when the SOURce#:FUNCtion[:SHAPe]?   | |
| scpi_result_t | scpi_cmd_sourceFunctionModeQ (scpi_t *context) | 
| Function executed when the SOURce#:FUNCtion:MODE?   | |
| scpi_result_t | scpi_cmd_systemLocal (scpi_t *context) | 
| Function executed when the SYSTem:LOCal command was received.  | |
| scpi_result_t | scpi_cmd_systemRemote (scpi_t *context) | 
| Function executed when the SYSTem:REMote command was received.  | |
| scpi_result_t | scpi_cmd_systemRWLock (scpi_t *context) | 
| Function executed when the SYSTem:RWLock command was received.  | |
| scpi_result_t | scpi_cmd_systemChannelCountQ (scpi_t *context) | 
| Function executed when the SYSTem:CHANnel:COUNt?   | |
| scpi_result_t | scpi_cmd_systemFirmwareQ (scpi_t *context) | 
| Function executed when the SYSTem:FIRMware?   | |
| scpi_result_t | scpi_cmd_systemSnoQ (scpi_t *context) | 
| Function executed when the SYSTem:SNO?   | |
| scpi_result_t | scpi_cmd_systemMeasureScalarVoltageDCQ (scpi_t *context) | 
| Function executed when the SYSTem:MEASure[:SCALar][:VOLTage][:DC]?   | |
| scpi_result_t | scpi_cmd_memoryRcl (scpi_t *context) | 
| Function executed when the *RCL command was received.  | |
| scpi_result_t | scpi_cmd_memorySav (scpi_t *context) | 
| Function executed when the *SAV command was received.  | |
| scpi_result_t | scpi_cmd_instrumentSelect (scpi_t *context) | 
| Function executed when the INSTrument[:SELect] command was received.  | |
| scpi_result_t | scpi_cmd_instrumentSelectQ (scpi_t *context) | 
| Function executed when the INSTrument[:SELect]?   | |
| scpi_result_t | scpi_cmd_instrumentNSelect (scpi_t *context) | 
| Function executed when the INSTrument:NSELect command was received.  | |
| scpi_result_t | scpi_cmd_instrumentNSelectQ (scpi_t *context) | 
| Function executed when the INSTrument:NSELect?   | |
Variables | |
| scpi_t | scpi_context | 
| Global scpi_t object.  | |
Containing defines and function prototypes of the SCPI part of the device.
| typedef enum SCPIChannelParameters SCPIChannelParameters_t | 
Available SCPI channel parameters.
Enumeration with all channel parameters that are available through the SCPI interface.
Available SCPI channel parameters.
Enumeration with all channel parameters that are available through the SCPI interface.
| scpi_result_t scpi_cmd_instrumentNSelectQ | ( | scpi_t * | context | ) | 
Function executed when the INSTrument:NSELect?
command was received.
| scpi_result_t scpi_cmd_instrumentSelectQ | ( | scpi_t * | context | ) | 
Function executed when the INSTrument[:SELect]?
command was received.
| scpi_result_t scpi_cmd_measureScalarCurrentDCQ | ( | scpi_t * | context | ) | 
Function executed when the MEASure#[:SCALar]:CURRent[:DC]?
command was received.
| scpi_result_t scpi_cmd_measureScalarPowerDCQ | ( | scpi_t * | context | ) | 
Function executed when the MEASure#[:SCALar]:POWer[:DC]?
command was received.
| scpi_result_t scpi_cmd_measureScalarVoltageDCQ | ( | scpi_t * | context | ) | 
Function executed when the MEASure#[:SCALar][:VOLTage][:DC]?
command was received.
| scpi_result_t scpi_cmd_outputGeneralQ | ( | scpi_t * | context | ) | 
Function executed when the OUTPut:GENeral?
command was received.
| scpi_result_t scpi_cmd_outputStateQ | ( | scpi_t * | context | ) | 
Function executed when the OUTPut#[:STATe]?
command was received.
| scpi_result_t scpi_cmd_sourceCurrentProtectionDelayQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:CURRent:PROTection:DELay?
command was received.
| scpi_result_t scpi_cmd_sourceCurrentProtectionLevelQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:CURRent:PROTection[:LEVel]?
command was received.
| scpi_result_t scpi_cmd_sourceCurrentProtectionStateQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:CURRent:PROTection:STATe?
command was received.
| scpi_result_t scpi_cmd_sourceCurrentProtectionTrippedQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:CURRent:PROTection:TRIPped?
command was received.
| scpi_result_t scpi_cmd_sourceFrequencyFixedQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:FREQuency[:CW]?
command was received.
| scpi_result_t scpi_cmd_sourceFunctionModeQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:FUNCtion:MODE?
command was received.
| scpi_result_t scpi_cmd_sourceFunctionShapeQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:FUNCtion[:SHAPe]?
command was received.
| scpi_result_t scpi_cmd_sourcePowerProtectionDelayQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:POWer:PROTection:DELay?
command was received.
| scpi_result_t scpi_cmd_sourcePowerProtectionLevelQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:POWer:PROTection[:LEVel]?
command was received.
| scpi_result_t scpi_cmd_sourcePowerProtectionStateQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:POWer:PROTection:STATe?
command was received.
| scpi_result_t scpi_cmd_sourcePowerProtectionTrippedQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:POWer:PROTection:TRIPped?
command was received.
| scpi_result_t scpi_cmd_sourceVoltageLevelImmediateAmplitudeQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:VOLTage[:LEVel][:IMMediate][:AMPLitude]?
command was received.
| scpi_result_t scpi_cmd_sourceVoltageLevelImmediateOffsetQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:VOLTage[:LEVel][:IMMediate]:OFFSet?
command was received.
| scpi_result_t scpi_cmd_sourceVoltageProtectionDelayQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:VOLTage:PROTection:DELay?
command was received.
| scpi_result_t scpi_cmd_sourceVoltageProtectionLevelQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:VOLTage:PROTection[:LEVel]?
command was received.
| scpi_result_t scpi_cmd_sourceVoltageProtectionStateQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:VOLTage:PROTection:STATe?
command was received.
| scpi_result_t scpi_cmd_sourceVoltageProtectionTrippedQ | ( | scpi_t * | context | ) | 
Function executed when the SOURce#:VOLTage:PROTection:TRIPped?
command was received.
| scpi_result_t scpi_cmd_systemChannelCountQ | ( | scpi_t * | context | ) | 
Function executed when the SYSTem:CHANnel:COUNt?
command was received.
| scpi_result_t scpi_cmd_systemFirmwareQ | ( | scpi_t * | context | ) | 
Function executed when the SYSTem:FIRMware?
command was received.
| scpi_result_t scpi_cmd_systemMeasureScalarVoltageDCQ | ( | scpi_t * | context | ) | 
Function executed when the SYSTem:MEASure[:SCALar][:VOLTage][:DC]?
command was received.
| scpi_result_t scpi_cmd_systemSnoQ | ( | scpi_t * | context | ) | 
Function executed when the SYSTem:SNO?
command was received.
| scpi_result_t SCPI_Control | ( | scpi_t * | context, | 
| scpi_ctrl_name_t | ctrl, | ||
| scpi_reg_val_t | val ) | 
Wrapper function to control interface from context.
| context | SCPI parser context | 
| ctrl | Number of control message | 
| val | Value of related register | 
| int SCPI_Error | ( | scpi_t * | context, | 
| int_fast16_t | err ) | 
Emit error to the SCPI output.
| context | SCPI parser context | 
| err | Error to emit | 
| scpi_result_t SCPI_Flush | ( | scpi_t * | context | ) | 
Flush data to SCPI output.
| context | SCPI parser context | 
| bool SCPI_GetNumericFromParam | ( | scpi_t * | context, | 
| const scpi_number_t & | param, | ||
| float & | value, | ||
| scpi_unit_t | unit, | ||
| float | min, | ||
| float | max, | ||
| float | def, | ||
| float | step ) | 
Get the numeric repesentation from the SCPI parameter.
Special parameters like MIN, DEF, UP, ... are supported. The value is also coerced to be between min and max.
| context | SCPI parser context | 
| param | scpi_number_t returned by the SCPI_ParamNumber() method | 
| value | Output variable with the numeric representation of the SCPI parameter | 
| unit | SCPI base unit that is used to discard values with other units. | 
| min | Minimum value. All values below this number are coerced to min. | 
| max | Maximum value. All values above this number are coerced to max. | 
| def | Default value. This value is used if DEF is received as SCPI parameter. | 
| step | Step value. This value is used to step up or down the value if UP or DOWN are received as SCPI parameters. | 
| scpi_result_t SCPI_QueryChannelParameter | ( | scpi_t * | context, | 
| SCPIChannelParameters_t | paramType ) | 
Query the value of a specific channel parameter and write it to the output.
| context | SCPI parser context | 
| paramType | Which channel parameter should be returned | 
| scpi_result_t SCPI_Reset | ( | scpi_t * | context | ) | 
Called when a *RST command is received.
| context | SCPI parser context | 
| scpi_result_t SCPI_SetChannelParameter | ( | scpi_t * | context, | 
| SCPIChannelParameters_t | paramType ) | 
Set the value of a specific channel parameter to the value given with the SCPI parameter.
| context | SCPI parser context | 
| paramType | Which channel parameter should be set | 
| scpi_result_t SCPI_SetResult_ChannelOutOfRange | ( | scpi_t * | context | ) | 
Return a "Channel number out of range." message with the SCPI context.
| context | SCPI parser context | 
| scpi_result_t SCPI_SetResult_NotSupportedByChannel | ( | scpi_t * | context | ) | 
Return a "Operation not supported by channel." message with the SCPI context.
| context | SCPI parser context | 
| size_t SCPI_Write | ( | scpi_t * | context, | 
| const char * | data, | ||
| size_t | len ) | 
Write data to SCPI output.
The SCPI parser uses this function to write the given data to an output stream (e.g. for user response).
| context | SCPI parser context | 
| data | Data to write | 
| len | Length of the data in bytes |