AHP® GT Controllers API
AHP GT Controllers
Loading...
Searching...
No Matches

Functions

DLL_EXPORT unsigned int ahp_gt_get_version (void)
 Obtain the current libahp-gt version.
DLL_EXPORT int ahp_gt_connect (const char *port)
 Connect to the GT controller.
DLL_EXPORT int ahp_gt_connect_fd (int fd)
 Connect to the GT controller using an existing file descriptor.
DLL_EXPORT int ahp_gt_connect_udp (const char *address, int port)
 Connect to the GT controller throught an UDP connection.
DLL_EXPORT int ahp_gt_get_fd (void)
 Return the file descriptor of the port connected to the GT controllers.
DLL_EXPORT void ahp_gt_disconnect (void)
 Disconnect from the GT controller.
DLL_EXPORT void ahp_gt_set_fd (int fd)
 Set the file descriptor that links to the controller.
DLL_EXPORT unsigned int ahp_gt_is_connected (void)
 Report connection status.
DLL_EXPORT unsigned int ahp_gt_is_detected (int index)
 Report detection status.
DLL_EXPORT int ahp_gt_get_mc_version (int axis)
 Get the GT firmware version.

Detailed Description

Function Documentation

◆ ahp_gt_connect()

DLL_EXPORT int ahp_gt_connect ( const char * port)
Parameters
portThe serial port filename
Returns
non-zero on failure

◆ ahp_gt_connect_fd()

DLL_EXPORT int ahp_gt_connect_fd ( int fd)
Parameters
fdThe serial stream file descriptor
Returns
non-zero on failure

◆ ahp_gt_connect_udp()

DLL_EXPORT int ahp_gt_connect_udp ( const char * address,
int port )
Parameters
addressThe ip address of the server
portThe port on which the server should connect
Returns
non-zero on failure

◆ ahp_gt_get_fd()

DLL_EXPORT int ahp_gt_get_fd ( void )
Returns
The serial stream file descriptor

◆ ahp_gt_get_mc_version()

DLL_EXPORT int ahp_gt_get_mc_version ( int axis)
Parameters
axisThe axis number if checking for a single axis module
Returns
The GT controller firmware version

◆ ahp_gt_get_version()

DLL_EXPORT unsigned int ahp_gt_get_version ( void )
inline
Returns
The current API version

◆ ahp_gt_is_connected()

DLL_EXPORT unsigned int ahp_gt_is_connected ( void )
Returns
non-zero if already connected
See also
ahp_gt_connect
ahp_gt_connect_fd
ahp_gt_disconnect

◆ ahp_gt_is_detected()

DLL_EXPORT unsigned int ahp_gt_is_detected ( int index)
Parameters
indexthe address to check
Returns
non-zero if already detected
See also
ahp_gt_detect_device
ahp_gt_get_current_device
ahp_gt_connect
ahp_gt_connect_fd
ahp_gt_disconnect

◆ ahp_gt_set_fd()

DLL_EXPORT void ahp_gt_set_fd ( int fd)
Parameters
fdThe file descriptor
See also
ahp_gt_connect