This interface provides a wrapper around the C++ library for use in C and other languages.
More...
|
| | Error Codes |
| | Error codes returned by the Ethernet client functions.
|
| |
| | Auxiliary IO |
| | Functions for controlling and reading auxiliary IO.
|
| |
| | Cells |
| | Functions for controlling and reading back cells.
|
| |
| | System |
| | Functions related to system status and control.
|
| |
| | Configuration |
| | Functions for setting and reading unit configuration information.
|
| |
|
|
typedef void * | Bs120xEnetHandle |
| | Ethernet client handle.
|
| |
This interface provides a wrapper around the C++ library for use in C and other languages.
◆ Bs120xEnet_Connect()
| int Bs120xEnet_Connect |
( |
Bs120xEnetHandle |
handle, |
|
|
const char * |
interface_ip, |
|
|
const char * |
device_ip, |
|
|
uint16_t |
udp_port, |
|
|
uint32_t |
udp_timeout, |
|
|
uint16_t |
tcp_port |
|
) |
| |
Connect to a unit.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [in] | interface_ip | IP address of the local NIC to connect from. |
| [in] | device_ip | IP address of the unit. |
| [in] | udp_port | UDP data port for the unit. |
| [in] | udp_timeout | Timeout in milliseconds to receive UDP data broadcast. A negative value will wait indefinitely. |
| [in] | tcp_port | TCP port to send commands on. BS120x default is 12345. |
- Returns
- 0 on success or a negative error code.
◆ Bs120xEnet_Destroy()
Destroy an Ethernet client.
- Parameters
-
| [in,out] | handle | Handle pointer to a handle to destroy. |
◆ Bs120xEnet_Disconnect()
Disconnect from the unit.
- Parameters
-
| [in] | handle | Ethernet client handle. |
- Returns
- 0 on success or a negative error code.
◆ Bs120xEnet_ErrorMessage()
| const char * Bs120xEnet_ErrorMessage |
( |
int |
error | ) |
|
Get an error message to describe an error code returned by the driver.
- Parameters
-
- Returns
- Null-terminated error message string.
◆ Bs120xEnet_Init()
Initialize an Ethernet 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.
◆ Bs120xEnet_Version()
| unsigned int Bs120xEnet_Version |
( |
| ) |
|
Get the library version 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).
- Returns
- The library version.