ABS SCPI Driver 0.2.0
ABS SCPI driver library
Loading...
Searching...
No Matches
Model Control

Model control functionality. More...

+ Collaboration diagram for Model Control:

Classes

struct  AbsModelInfo
 Information about a model. Strings are null-terminated. More...
 

Macros

#define ABS_MODEL_STATUS_RUNNING   (0x01)
 Model is running.
 
#define ABS_MODEL_STATUS_LOADED   (0x02)
 Model is loaded.
 
#define ABS_MODEL_STATUS_ERRORED   (0x04)
 Model has errored.
 

Functions

int AbsScpiClient_GetModelStatus (AbsScpiClientHandle handle, uint8_t *status_out)
 Query the model status.
 
int AbsScpiClient_LoadModel (AbsScpiClientHandle handle)
 Load the model configuration on the device.
 
int AbsScpiClient_StartModel (AbsScpiClientHandle handle)
 Start modeling.
 
int AbsScpiClient_StopModel (AbsScpiClientHandle handle)
 Stop modeling.
 
int AbsScpiClient_UnloadModel (AbsScpiClientHandle handle)
 Unload the model configuration.
 
int AbsScpiClient_GetModelInfo (AbsScpiClientHandle handle, AbsModelInfo *model_info_out)
 Query information about the loaded model.
 
int AbsScpiClient_SetGlobalModelInput (AbsScpiClientHandle handle, unsigned int index, float value)
 Set a single global model input.
 
int AbsScpiClient_SetAllGlobalModelInputs (AbsScpiClientHandle handle, const float values[], unsigned int count)
 Set multiple global model inputs.
 
int AbsScpiClient_GetGlobalModelInput (AbsScpiClientHandle handle, unsigned int index, float *value_out)
 Query the value of a single global model input.
 
int AbsScpiClient_GetAllGlobalModelInputs (AbsScpiClientHandle handle, float values_out[], unsigned int count)
 Query the values of multiple global model inputs.
 
int AbsScpiClient_SetLocalModelInput (AbsScpiClientHandle handle, unsigned int index, float value)
 Set a single local model input.
 
int AbsScpiClient_SetAllLocalModelInputs (AbsScpiClientHandle handle, const float values[], unsigned int count)
 Set multiple local model inputs.
 
int AbsScpiClient_GetLocalModelInput (AbsScpiClientHandle handle, unsigned int index, float *value_out)
 Query the value of a single local model input.
 
int AbsScpiClient_GetAllLocalModelInputs (AbsScpiClientHandle handle, float values_out[], unsigned int count)
 Query the values of multiple local model inputs.
 
int AbsScpiClient_GetModelOutput (AbsScpiClientHandle handle, unsigned int index, float *value_out)
 Query a single model output.
 
int AbsScpiClient_GetAllModelOutputs (AbsScpiClientHandle handle, float values_out[], unsigned int count)
 Query multiple model outputs.
 

Detailed Description

Model control functionality.

Function Documentation

◆ AbsScpiClient_GetAllGlobalModelInputs()

int AbsScpiClient_GetAllGlobalModelInputs ( AbsScpiClientHandle  handle,
float  values_out[],
unsigned int  count 
)

Query the values of multiple global model inputs.

Parameters
[in]handleSCPI client
[out]values_outarray of returned values, one per input
[in]countlength of the array (must not be longer than the total input count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllLocalModelInputs()

int AbsScpiClient_GetAllLocalModelInputs ( AbsScpiClientHandle  handle,
float  values_out[],
unsigned int  count 
)

Query the values of multiple local model inputs.

Parameters
[in]handleSCPI client
[out]values_outarray of returned values, one per input
[in]countlength of the array (must not be longer than the total input count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllModelOutputs()

int AbsScpiClient_GetAllModelOutputs ( AbsScpiClientHandle  handle,
float  values_out[],
unsigned int  count 
)

Query multiple model outputs.

Parameters
[in]handleSCPI client
[out]values_outarray of returned outputs
[in]countlength of the array (must not be greater than the total model output count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetGlobalModelInput()

int AbsScpiClient_GetGlobalModelInput ( AbsScpiClientHandle  handle,
unsigned int  index,
float *  value_out 
)

Query the value of a single global model input.

Parameters
[in]handleSCPI client
[in]indexindex of the input, 0-7
[out]value_outpointer to the returned value
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetLocalModelInput()

int AbsScpiClient_GetLocalModelInput ( AbsScpiClientHandle  handle,
unsigned int  index,
float *  value_out 
)

Query the value of a single local model input.

Parameters
[in]handleSCPI client
[in]indexindex of the input, 0-7
[out]value_outpointer to the returned value
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetModelInfo()

int AbsScpiClient_GetModelInfo ( AbsScpiClientHandle  handle,
AbsModelInfo model_info_out 
)

Query information about the loaded model.

Parameters
[in]handleSCPI client
[out]model_info_outpointer to the returned model info
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetModelOutput()

int AbsScpiClient_GetModelOutput ( AbsScpiClientHandle  handle,
unsigned int  index,
float *  value_out 
)

Query a single model output.

Parameters
[in]handleSCPI client
[in]indexoutput index, 0-35
[out]value_outpointer to the returned model output
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetModelStatus()

int AbsScpiClient_GetModelStatus ( AbsScpiClientHandle  handle,
uint8_t *  status_out 
)

Query the model status.

The ABS_MODEL_STATUS_* macros can be used to interpret the status.

Parameters
[in]handleSCPI client
[out]status_outpointer to the returned status bits
Returns
0 on success or a negative error code.

◆ AbsScpiClient_LoadModel()

int AbsScpiClient_LoadModel ( AbsScpiClientHandle  handle)

Load the model configuration on the device.

Parameters
[in]handleSCPI client
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllGlobalModelInputs()

int AbsScpiClient_SetAllGlobalModelInputs ( AbsScpiClientHandle  handle,
const float  values[],
unsigned int  count 
)

Set multiple global model inputs.

Particularly useful with multicast to address multiple units at once.

Parameters
[in]handleSCPI client
[in]valuesarray of values, one per input
[in]countnumber of values to send (must not be greater than the total input count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllLocalModelInputs()

int AbsScpiClient_SetAllLocalModelInputs ( AbsScpiClientHandle  handle,
const float  values[],
unsigned int  count 
)

Set multiple local model inputs.

Parameters
[in]handleSCPI client
[in]valuesarray of values, one per input
[in]countnumber of values to send (must not be greater than the total input count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetGlobalModelInput()

int AbsScpiClient_SetGlobalModelInput ( AbsScpiClientHandle  handle,
unsigned int  index,
float  value 
)

Set a single global model input.

Particularly useful with multicast to address multiple units at once.

Parameters
[in]handleSCPI client
[in]indexinput index, 0-7
[in]valuedesired input value
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetLocalModelInput()

int AbsScpiClient_SetLocalModelInput ( AbsScpiClientHandle  handle,
unsigned int  index,
float  value 
)

Set a single local model input.

Parameters
[in]handleSCPI client
[in]indexinput index, 0-7
[in]valuedesired input value
Returns
0 on success or a negative error code.

◆ AbsScpiClient_StartModel()

int AbsScpiClient_StartModel ( AbsScpiClientHandle  handle)

Start modeling.

Parameters
[in]handleSCPI client
Returns
0 on success or a negative error code.

◆ AbsScpiClient_StopModel()

int AbsScpiClient_StopModel ( AbsScpiClientHandle  handle)

Stop modeling.

Parameters
[in]handleSCPI client
Returns
0 on success or a negative error code.

◆ AbsScpiClient_UnloadModel()

int AbsScpiClient_UnloadModel ( AbsScpiClientHandle  handle)

Unload the model configuration.

Parameters
[in]handleSCPI client
Returns
0 on success or a negative error code.