Functions for controlling the system, such as querying device info and updating the IP address.
More...
|
struct | AbsDeviceInfo |
| ABS device information structure. All strings are guaranteed to be null-terminated. More...
|
|
struct | AbsEthernetConfig |
| ABS Ethernet address configuration. All strings are guaranteed to be null-terminated. More...
|
|
|
int | AbsScpiClient_GetDeviceInfo (AbsScpiClientHandle handle, AbsDeviceInfo *info_out) |
| Query basic information about the unit.
|
|
int | AbsScpiClient_GetDeviceId (AbsScpiClientHandle handle, uint8_t *id_out) |
| Query the ABS's device ID.
|
|
int | AbsScpiClient_GetIPAddress (AbsScpiClientHandle handle, AbsEthernetConfig *addr_out) |
| Query the device's IP address and subnet mask.
|
|
int | AbsScpiClient_SetIPAddress (AbsScpiClientHandle handle, const AbsEthernetConfig *addr) |
| Set the device's IP address and subnet mask.
|
|
int | AbsScpiClient_GetCalibrationDate (AbsScpiClientHandle handle, char buf[], unsigned int len) |
| Get the device's calibration date.
|
|
int | AbsScpiClient_GetErrorCount (AbsScpiClientHandle handle, int *count_out) |
| Query the number of error's in the device's error queue.
|
|
int | AbsScpiClient_GetNextError (AbsScpiClientHandle handle, int16_t *err_code_out, char msg_buf[], unsigned int msg_buf_len) |
| Query the next error from the device's error queue.
|
|
int | AbsScpiClient_ClearErrors (AbsScpiClientHandle handle) |
| Clear the device's error queue.
|
|
int | AbsScpiClient_GetAlarms (AbsScpiClientHandle handle, uint32_t *alarms_out) |
| Query the alarms raised on the device.
|
|
int | AbsScpiClient_GetInterlockState (AbsScpiClientHandle handle, bool *interlock_out) |
| Query the system interlock state.
|
|
int | AbsScpiClient_AssertSoftwareInterlock (AbsScpiClientHandle handle) |
| Assert the software interlock (a recoverable alarm).
|
|
int | AbsScpiClient_ClearRecoverableAlarms (AbsScpiClientHandle handle) |
| Clear recoverable alarms.
|
|
int | AbsScpiClient_Reboot (AbsScpiClientHandle handle) |
| Reboot the device, resetting it to its POR state.
|
|
Functions for controlling the system, such as querying device info and updating the IP address.
◆ AbsScpiClient_AssertSoftwareInterlock()
Assert the software interlock (a recoverable alarm).
The interlock may be cleared using the ClearRecoverableAlarms() function.
- Parameters
-
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_ClearErrors()
Clear the device's error queue.
- Parameters
-
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_ClearRecoverableAlarms()
Clear recoverable alarms.
This also clears a software interlock.
- Parameters
-
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetAlarms()
Query the alarms raised on the device.
- Parameters
-
[in] | handle | SCPI client |
[out] | alarms_out | pointer to an integer to store the bitmask of alarms |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetCalibrationDate()
int AbsScpiClient_GetCalibrationDate |
( |
AbsScpiClientHandle |
handle, |
|
|
char |
buf[], |
|
|
unsigned int |
len |
|
) |
| |
Get the device's calibration date.
- Note
- The returned string will always be null-terminated. If this function fails, the buffer will not be modified.
- Parameters
-
[in] | handle | SCPI client |
[out] | buf | pointer to the buffer into which a null-terminated string will be written |
[in] | len | the length of the buffer |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetDeviceId()
Query the ABS's device ID.
- Parameters
-
[in] | handle | SCPI client |
[out] | id_out | pointer to the resulting ID |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetDeviceInfo()
Query basic information about the unit.
- Parameters
-
[in] | handle | SCPI client |
[out] | info_out | pointer to a device information structure to populate |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetErrorCount()
Query the number of error's in the device's error queue.
- Parameters
-
[in] | handle | SCPI client |
[out] | count_out | pointer to an integer to store the error count |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetInterlockState()
Query the system interlock state.
When in interlock, the unit will be put into its PoR state and cannot be controlled until the interlock is lifted.
- Parameters
-
[in] | handle | SCPI client |
[out] | interlock_out | pointer to the interlock state |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetIPAddress()
Query the device's IP address and subnet mask.
- Parameters
-
[in] | handle | SCPI client |
[out] | addr_out | pointer to an Ethernet configuration structure to populate |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_GetNextError()
int AbsScpiClient_GetNextError |
( |
AbsScpiClientHandle |
handle, |
|
|
int16_t * |
err_code_out, |
|
|
char |
msg_buf[], |
|
|
unsigned int |
msg_buf_len |
|
) |
| |
Query the next error from the device's error queue.
- Note
- The returned message will always be null-terminated. If this function fails, the values of the outputs are undefined.
- Parameters
-
[in] | handle | SCPI client |
[out] | err_code_out | pointer to an integer to store the error code |
[out] | msg_buf | pointer to a buffer to store the null-terminated error message |
[in] | msg_buf_len | length of the buffer |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_Reboot()
Reboot the device, resetting it to its POR state.
Rebooting takes about 8-10 seconds. If using TCP, you'll need to re-open the connection after the device has rebooted.
- Parameters
-
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_SetIPAddress()
Set the device's IP address and subnet mask.
- Note
- For UDP and TCP connections, after changing the IP, you should call the corresponding Open*() function again to reconnect. Note that it may take a moment for the unit to complete the change.
- Parameters
-
[in] | handle | SCPI client |
[in] | addr | desired Ethernet configuration |
- Returns
- 0 on success or a negative error code.