This interface provides a wrapper around the C++ library for use in C and other languages.
More...
|
| Error Codes |
| Error codes returned by the SCPI driver functions.
|
|
| System Control |
| Functions for controlling the system, such as querying device info and updating the IP address.
|
|
| Cell Control |
| Functions for controlling and measuring the cells.
|
|
| Aux IO Control |
| Functions for controlling auxiliary analog and digital IO.
|
|
| Model Control |
| Model control functionality.
|
|
| Device Discovery |
| Functions for discovering ABSes on the network.
|
|
|
typedef void * | AbsScpiClientHandle |
| ABS SCPI client handle.
|
|
This interface provides a wrapper around the C++ library for use in C and other languages.
◆ AbsScpiClient_Close()
Close the client connection.
- Parameters
-
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_Destroy()
Destroy a SCPI client.
- Parameters
-
[in,out] | handle | pointer to a handle to destroy |
◆ AbsScpiClient_ErrorMessage()
const char * AbsScpiClient_ErrorMessage |
( |
int |
error | ) |
|
Get an error message to describe an error code returned by the driver.
- Returns
- Null-terminated error message string.
◆ AbsScpiClient_GetTargetDeviceId()
int AbsScpiClient_GetTargetDeviceId |
( |
AbsScpiClientHandle |
handle, |
|
|
unsigned int * |
device_id_out |
|
) |
| |
Get the target device ID for communication.
Only relevant for RS-485 connections.
- Parameters
-
[in] | handle | SCPI client |
[out] | device_id_out | target device ID |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_Init()
Initialize a SCPI client.
Must be destroyed by the caller!
- Parameters
-
[out] | handle_out | pointer to a handle to initialize (handle should be zeroed) |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_OpenSerial()
int AbsScpiClient_OpenSerial |
( |
AbsScpiClientHandle |
handle, |
|
|
const char * |
com_port, |
|
|
unsigned int |
device_id |
|
) |
| |
Open a serial connection to one or many ABSes.
- Parameters
-
[in] | handle | SCPI client |
[in] | com_port | the serial port to open, such as COM1 or /dev/ttyS0 |
[in] | device_id | target device ID, 0-31, or 32+ to broadcast to all units on the bus |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_OpenTcp()
Open a TCP connection to the ABS.
- Note
- As a consequence of TCP's design, it is inherently less deterministic than UDP. Commanding the ABS over TCP can be slower and less deterministic than UDP, so for time-sensitive applications, it's recommended to avoid TCP in favor of UDP.
- Parameters
-
[in] | handle | SCPI client |
[in] | target_ip | ABS's IP address |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_OpenUdp()
int AbsScpiClient_OpenUdp |
( |
AbsScpiClientHandle |
handle, |
|
|
const char * |
target_ip, |
|
|
const char * |
interface_ip |
|
) |
| |
Open a UDP connection to the ABS.
- Parameters
-
[in] | handle | SCPI client |
[in] | target_ip | ABS's IP address |
[in] | interface_ip | address of the local interface to bind the socket to (may be NULL or empty to use any local address) |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_OpenUdpMulticast()
Open a UDP multicast socket for broadcasting to many ABSes.
- Parameters
-
[in] | handle | SCPI client |
[in] | interface_ip | IP address of the local NIC to bind to |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_SetTargetDeviceId()
Set the target device ID for communication.
Only applies to RS-485 connections.
- Parameters
-
[in] | handle | SCPI client |
[in] | device_id | target device ID, 0-31, or 32+ to broadcast to all units on the bus |
- Returns
- 0 on success or a negative error code.
◆ AbsScpiClient_Version()
unsigned int AbsScpiClient_Version |
( |
| ) |
|
Get the version of the SCPI library as an unsigned base 10 integer.
For example, version 1.2.3 would return 10203.
This is intended to be used to check for the existence of certain functionality based on library version, particularly in wrappers (such as Python).
- Since
- v1.1.0
- Returns
- The library version.