
42
Appendix C – SDK Function Descriptions
The following functions are available in the SDK:
fdGlove *fdOpen(char *pPort)
Initializes the glove device on the specified port.
Return value
Returns a pointer to the glove device (
fdGlove *
). NULL is returned if an error
occurred.
Parameter
pPort
Pointer to a zero terminated ASCII string containing the name of the
communication port. Valid values on Windows range from "COM1" to "COM8".
Unix/Linux port names will differ.
Remarks
Do not attempt to alter the contents of the returned pointer directly, use the
functions provided instead.
int fdClose(fdGlove *pFG)
Frees the glove device and communications port.
Return value
Returns nonzero if successful, zero if an error occurred.
Parameters
pFG
Pointer to a glove device. This is the value returned by
fdOpen()
.
Remarks
It is important to call this function when you are finished using the glove.
int fdScanUSB(unsigend short *aPID, int &nNumMax)
Scans the USB for available gloves.
Return value
Returns the number of gloves found during the scan.
Parameters
aPID
Pointer an unsigned short array of length
nNumMax
. The USB Product IDs
(PIDs) of the gloves found are returned in this array. The following PIDs are
defined:
DG14U_R
– Data Glove 14 Ultra Right-hand
DG14U_L
– Data Glove 14 Ultra Left-hand
DG5U_R
– Data Glove 5 Ultra Right-hand
DG5U_L
– Data Glove 5 Ultra Left-hand