ABS SCPI Driver 1.0.0
ABS SCPI driver library
Loading...
Searching...
No Matches
Device Discovery

Functions for discovering ABSes on the network. More...

+ Collaboration diagram for Device Discovery:

Classes

struct  AbsEthernetDiscoveryResult
 ABS Ethernet discovery result. All strings are guaranteed to be null-terminated. More...
 
struct  AbsSerialDiscoveryResult
 ABS serial discovery result. All strings are guaranteed to be null-terminated. More...
 

Functions

int AbsScpiClient_MulticastDiscovery (const char *interface_ip, AbsEthernetDiscoveryResult results_out[], unsigned int *count)
 Use UDP multicast to discover ABSes on the network.
 
int AbsScpiClient_SerialDiscovery (const char *port, uint8_t first_id, uint8_t last_id, AbsSerialDiscoveryResult results_out[], unsigned int *count)
 Use RS-485 to discover ABSes on the bus.
 

Detailed Description

Functions for discovering ABSes on the network.

Function Documentation

◆ AbsScpiClient_MulticastDiscovery()

int AbsScpiClient_MulticastDiscovery ( const char *  interface_ip,
AbsEthernetDiscoveryResult  results_out[],
unsigned int *  count 
)

Use UDP multicast to discover ABSes on the network.

This function does not require that a ScpiClient be open or connected.

Note
If the array is not big enough, this function will fill in as many results as possible and return a buffer too small error. The output is still valid in this case.
Parameters
[in]interface_ipaddress of the local interface to bind to
[out]results_outarray of Ethernet discovery results
[in,out]countpointer to the length of the array; will be set to the actual number of units discovered
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SerialDiscovery()

int AbsScpiClient_SerialDiscovery ( const char *  port,
uint8_t  first_id,
uint8_t  last_id,
AbsSerialDiscoveryResult  results_out[],
unsigned int *  count 
)

Use RS-485 to discover ABSes on the bus.

This function does not require that a ScpiClient be open or connected. In fact, a ScpiClient may NOT be connected to the same serial port as is used during the call to this function.

To discover serial devices, this function simply iterates through serial IDs and waits for a response from each device.

Note
If the array is not big enough, this function will fill in as many results as possible and return a buffer too small error. The output is still valid in this case.
Parameters
[in]portserial port to use, such as COM1 or /dev/ttyS0
[in]first_idfirst serial ID to check, 0-31
[in]last_idlast serial ID to check (inclusive), 0-31 (must not be less than first_id)
[out]results_outarray of serial discovery results
[in,out]countpointer to the length of the array; will be set to the actual number of units discovered
Returns
0 on success or a negative error code.