libtiepie-hw  1.1.6
Server

Functions to communicate with TPISS Instrument Sharing servers. More...

Collaboration diagram for Server:

Functions

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_server_connect (tiepie_hw_handle handle, tiepie_hw_bool asynchronous)
 Connect to a specified Instrument Sharing Server. This gives access to the instruments connected to and shared by that server. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_server_disconnect (tiepie_hw_handle handle, tiepie_hw_bool force)
 Disconnect from a specified Instrument Sharing Server. This will close all opened instruments shared by that server. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_server_remove (tiepie_hw_handle handle, tiepie_hw_bool force)
 Remove a specified Instrument Sharing Server from the list of servers. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_status (tiepie_hw_handle handle)
 Retrieve the status of a specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_last_error (tiepie_hw_handle handle)
 Get the last error from a specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_url (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the URL of the specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_id (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the id of the specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_ip_address (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the IP address of the specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint16_t tiepie_hw_server_get_ip_port (tiepie_hw_handle handle)
 Get the IP port number of the specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_name (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the name of the specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_description (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the description of the specified Instrument Sharing Server. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_server_get_version (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the software version number of the specified Instrument Sharing Server. More...
 

Detailed Description

Functions to communicate with TPISS Instrument Sharing servers.

Function Documentation

◆ tiepie_hw_server_connect()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_server_connect ( tiepie_hw_handle  handle,
tiepie_hw_bool  asynchronous 
)

Connect to a specified Instrument Sharing Server. This gives access to the instruments connected to and shared by that server.

Parameters
[in]handleA server handle identifying the server.
[in]asynchronousConnect asynchronously.
Returns
TIEPIE_HW_BOOL_TRUE if successful, TIEPIE_HW_BOOL_FALSE otherwise.
Since
1.0

◆ tiepie_hw_server_disconnect()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_server_disconnect ( tiepie_hw_handle  handle,
tiepie_hw_bool  force 
)

Disconnect from a specified Instrument Sharing Server. This will close all opened instruments shared by that server.

Parameters
[in]handleA server handle identifying the server.
[in]forceIf TIEPIE_HW_BOOL_TRUE all open devices are closed, if TIEPIE_HW_BOOL_FALSE remove only succeeds if no devices are open.
Returns
TIEPIE_HW_BOOL_TRUE if successful, TIEPIE_HW_BOOL_FALSE otherwise.
Since
1.0

◆ tiepie_hw_server_remove()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_server_remove ( tiepie_hw_handle  handle,
tiepie_hw_bool  force 
)

Remove a specified Instrument Sharing Server from the list of servers.

Parameters
[in]handleA server handle identifying the server.
[in]forceIf TIEPIE_HW_BOOL_TRUE all open devices are closed, if TIEPIE_HW_BOOL_FALSE remove only succeeds if no devices are open.
Returns
TIEPIE_HW_BOOL_TRUE if successful, TIEPIE_HW_BOOL_FALSE otherwise.
Since
1.0

◆ tiepie_hw_server_get_status()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_status ( tiepie_hw_handle  handle)

Retrieve the status of a specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
Returns
The status of the specified Instrument Sharing Server, see TIEPIE_HW_SERVER_STATUS
Since
1.0

◆ tiepie_hw_server_get_last_error()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_last_error ( tiepie_hw_handle  handle)

Get the last error from a specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
Returns
The last error given by the specified server, see TIEPIE_HW_SERVER_ERROR
Since
1.0

◆ tiepie_hw_server_get_url()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_url ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the URL of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
[out]bufferA pointer to a buffer for the URL.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the URL in bytes, excluding terminating zero.
Since
1.0

◆ tiepie_hw_server_get_id()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_id ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the id of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
[out]bufferA pointer to a buffer for the id.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the id in bytes, excluding terminating zero.
Since
1.0

◆ tiepie_hw_server_get_ip_address()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_ip_address ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the IP address of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
[out]bufferA pointer to a buffer for the IP address.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the URL in bytes, excluding terminating zero.
Since
1.0

◆ tiepie_hw_server_get_ip_port()

TIEPIE_HW_API uint16_t tiepie_hw_server_get_ip_port ( tiepie_hw_handle  handle)

Get the IP port number of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
Returns
The IP port number of the specified server.
Since
1.0

◆ tiepie_hw_server_get_name()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_name ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the name of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
[out]bufferA pointer to a buffer for the name.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the name in bytes, excluding terminating zero.
Since
1.0

◆ tiepie_hw_server_get_description()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_description ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the description of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
[out]bufferA pointer to a buffer for the description.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the description in bytes, excluding terminating zero.
Since
1.0

◆ tiepie_hw_server_get_version()

TIEPIE_HW_API uint32_t tiepie_hw_server_get_version ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the software version number of the specified Instrument Sharing Server.

Parameters
[in]handleA server handle identifying the server.
[out]bufferA pointer to a buffer for the description.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the server version in bytes, excluding terminating zero.
The software version number of the server, or zero if no software version is available.
Example
uint32_t length = tiepie_hw_server_get_version(handle, NULL, 0) + 1; // Add one for the terminating zero
char* version = malloc(sizeof(char) * length);
length = tiepie_hw_server_get_version(handle, version, length);
printf("tiepie_hw_server_get_version = %s\n", version);
free(version);
TIEPIE_HW_API uint32_t tiepie_hw_server_get_version(tiepie_hw_handle handle, char *buffer, uint32_t length)
Get the software version number of the specified Instrument Sharing Server.
Since
1.0