The Current measurement instrument API library functions.
More...
|
| typedef void(* | _callback_ammeter) (int status, double val) |
| | Current measurement API callback function type definition. More...
|
| |
The Current measurement instrument API library functions.
◆ _callback_ammeter
| typedef void(* _callback_ammeter) (int status, double val) |
Current measurement API callback function type definition.
- Parameters
-
| [in] | status | The measurement status taken from _AMMETER_API_STATUS_CODES. |
| [in] | val | Double current measurement value returned to the upper layer software. |
Definition at line 153 of file ammeter_api.h.
◆ ammeter_api_close()
| AMMETER_API int ammeter_api_close |
( |
void |
| ) |
|
◆ ammeter_api_dbg_close()
| AMMETER_API int ammeter_api_dbg_close |
( |
void |
| ) |
|
◆ ammeter_api_dbg_init()
| AMMETER_API int ammeter_api_dbg_init |
( |
_dbg_params * |
dbg_params_t | ) |
|
◆ ammeter_api_gen_cmd()
| AMMETER_API int ammeter_api_gen_cmd |
( |
const char * |
gen_cmd | ) |
|
Set a SCPI command that will be passed to the instrument. Multiple, column separated commands, are supported.
- Parameters
-
| [in] | gen_cmd | A pointer to a SCPI based string command. Up to 256 string size is supported. |
- Returns
- AMMETER_API_STATUS_CODES.
◆ ammeter_api_init()
| AMMETER_API int ammeter_api_init |
( |
const char * |
iface, |
|
|
_callback_ammeter |
callback_ammeter |
|
) |
| |
Current measurement instrument initialize function.
- Parameters
-
| [in] | iface | iface. A string to define the instrument interface, e.g. "COM15". |
| [in] | callback_ammeter | A callback function, with _callback_ammeter type, called whenever the current measurement is ready. |
- Returns
- AMMETER_API_STATUS_CODES.
◆ ammeter_api_measure()
| AMMETER_API int ammeter_api_measure |
( |
void |
| ) |
|
◆ ammeter_api_range()
| AMMETER_API int ammeter_api_range |
( |
double |
range | ) |
|
Set the ampere range that the instrument will operate.
- Parameters
-
| [in] | range | The range that the instrument will operate in Ampere units. |
- Returns
- AMMETER_API_STATUS_CODES.
◆ ammeter_api_resolution()
| AMMETER_API int ammeter_api_resolution |
( |
double |
resolution | ) |
|
Set the resolution that the instrument will operate.
- Parameters
-
| [in] | resolution | The resolution that the instrument will operate in Ampere units. |
- Returns
- AMMETER_API_STATUS_CODES.
◆ ammeter_api_samples()
| AMMETER_API int ammeter_api_samples |
( |
uint32_t |
samples | ) |
|
Set the number of samples/measurements that the instrument will take and average.
- Parameters
-
| [in] | samples | The number of samples/measurements that the instrument will take and average. |
- Returns
- AMMETER_API_STATUS_CODES.
◆ ammeter_api_shunt_res()
| AMMETER_API int ammeter_api_shunt_res |
( |
float |
shunt_res | ) |
|
Set the shunt resistor value. Only used if voltmeters or NI-DAQs are used to measure current.
- Parameters
-
| [in] | shunt_res | The value of the shunt resistor. |
- Returns
- AMMETER_API_STATUS_CODES.