LibTiePie  0.4.3
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Groups Pages
Info

Functions

TpVersion_t DevGetDriverVersion (TpDeviceHandle_t hDevice)
 Get version number of the driver.
 
TpVersion_t DevGetFirmwareVersion (TpDeviceHandle_t hDevice)
 Get version number of the firmware.
 
TpDate_t DevGetCalibrationDate (TpDeviceHandle_t hDevice)
 Get the calibration date of the instrument.
 
uint32_t DevGetSerialNumber (TpDeviceHandle_t hDevice)
 Get the instrument's serial number.
 
uint32_t DevGetProductId (TpDeviceHandle_t hDevice)
 Get the instrument's product id.
 
uint32_t DevGetVendorId (TpDeviceHandle_t hDevice)
 Get the instrument's vendor id.
 
uint32_t DevGetType (TpDeviceHandle_t hDevice)
 Get device type.
 
uint32_t DevGetName (TpDeviceHandle_t hDevice, char *pBuffer, uint32_t dwBufferLength)
 Get the instruments name.
 
uint32_t DevGetNameShort (TpDeviceHandle_t hDevice, char *pBuffer, uint32_t dwBufferLength)
 Get the instrument's short name.
 

Detailed Description

Function Documentation

TpVersion_t DevGetDriverVersion ( TpDeviceHandle_t  hDevice)

Get version number of the driver.

Example:

TpVersion_t Version = DevGetDriverVersion( hDevice );
uint16_t wMajor = TPVERSION_MAJOR( Version );
uint16_t wMinor = TPVERSION_MINOR( Version );
uint16_t wRelease = TPVERSION_RELEASE( Version );
uint16_t wBuild = TPVERSION_BUILD( Version );
printf( "DevGetDriverVersion = %u.%u.%u.%u\n" , wMajor , wMinor , wRelease , wBuild );
Parameters
hDeviceA device handle.
Returns
Driver version number, or zero if no version number is available.
TpVersion_t DevGetFirmwareVersion ( TpDeviceHandle_t  hDevice)

Get version number of the firmware.

Example:

TpVersion_t Version = DevGetFirmwareVersion( hDevice );
uint16_t wMajor = TPVERSION_MAJOR( Version );
uint16_t wMinor = TPVERSION_MINOR( Version );
uint16_t wRelease = TPVERSION_RELEASE( Version );
uint16_t wBuild = TPVERSION_BUILD( Version );
printf( "DevGetFirmwareVersion = %u.%u.%u.%u\n" , wMajor , wMinor , wRelease , wBuild );
Parameters
hDeviceA device handle.
Returns
Firmware version number, or zero if no version number is available.
TpDate_t DevGetCalibrationDate ( TpDeviceHandle_t  hDevice)

Get the calibration date of the instrument.

Example:

TpDate_t Date = DevGetCalibrationDate( hDevice );
uint16_t wYear = TPDATE_YEAR( Date );
uint8_t byMonth = TPDATE_MONTH( Date );
uint8_t byDay = TPDATE_DAY( Date );
printf( "DevGetCalibrationDate = %u-%u-%u\n" , wYear , byMonth , byDay );
Parameters
hDeviceA device handle.
Returns
Instruments calibration date, or zero if no calibration date is available.
uint32_t DevGetSerialNumber ( TpDeviceHandle_t  hDevice)

Get the instrument's serial number.

Parameters
hDeviceA device handle.
Returns
Instrument's serial number.
uint32_t DevGetProductId ( TpDeviceHandle_t  hDevice)

Get the instrument's product id.

Parameters
hDeviceA device handle.
Returns
Instrument's product id.
uint32_t DevGetVendorId ( TpDeviceHandle_t  hDevice)

Get the instrument's vendor id.

Parameters
hDeviceA device handle.
Returns
Instrument's vendor id.
uint32_t DevGetType ( TpDeviceHandle_t  hDevice)

Get device type.

Parameters
hDeviceA device handle.
Returns
Device type.
uint32_t DevGetName ( TpDeviceHandle_t  hDevice,
char *  pBuffer,
uint32_t  dwBufferLength 
)

Get the instruments name.

Example:

uint32_t dwLength = DevGetName( hDevice , NULL , 0 ) + 1; // Add one for the terminating zero
char* sName = malloc( sizeof( char ) * dwLength );
dwLength = DevGetName( hDevice , sName , dwLength );
printf( "DevGetName = %s\n" , sName );
free( sName );
Parameters
hDeviceA device handle.
pBufferPointer to buffer to write to.
dwBufferLengthLength of the buffer.
Returns
Name length excluding excluding terminating zero.
See Also
DevGetNameShort
uint32_t DevGetNameShort ( TpDeviceHandle_t  hDevice,
char *  pBuffer,
uint32_t  dwBufferLength 
)

Get the instrument's short name.

Example:

uint32_t dwLength = DevGetNameShort( hDevice , NULL , 0 ) + 1; // Add one for the terminating zero
char* sNameShort = malloc( sizeof( char ) * dwLength );
dwLength = DevGetNameShort( hDevice , sNameShort , dwLength );
printf( "DevGetNameShort = %s\n" , sNameShort );
free( sNameShort );
Parameters
hDeviceA device handle.
pBufferPointer to buffer to write to.
dwBufferLengthLength of the buffer.
Returns
Short name length excluding excluding terminating zero.
See Also
DevGetName