LibTiePie  0.4.0
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Groups Pages
Device

Modules

 Events
 

Functions

void DevClose (TpDeviceHandle_t hDevice)
 Close a device handle.
 
bool8_t DevIsRemoved (TpDeviceHandle_t hDevice)
 Check whether an instrument is removed.
 
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 instruments serial number.
 
uint32_t DevGetProductId (TpDeviceHandle_t hDevice)
 Get the instruments product id.
 
uint32_t DevGetVendorId (TpDeviceHandle_t hDevice)
 Get the instruments 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 instruments short name.
 

Detailed Description

Function Documentation

void DevClose ( TpDeviceHandle_t  hDevice)

Close a device handle.

Parameters
hDeviceThe device handle to close.
See Also
LstOpenDevice
LstOpenOscilloscope
LstOpenGenerator
LstOpenI2CHost
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.
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 supported.
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 supported.
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[ dwLength ];
dwLength = DevGetName( hDevice , sName , dwLength );
printf( "DevGetName = %s\n" , Name );
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 instruments short name.

Example:

uint32_t dwLength = DevGetNameShort( hDevice , NULL , 0 ) + 1; // Add one for the terminating zero
char sNameShort[ dwLength ];
dwLength = DevGetNameShort( hDevice , sNameShort , dwLength );
printf( "DevGetNameShort = %s\n" , Name );
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
uint32_t DevGetProductId ( TpDeviceHandle_t  hDevice)

Get the instruments product id.

Parameters
hDeviceA device handle.
Returns
Instruments product id.
uint32_t DevGetSerialNumber ( TpDeviceHandle_t  hDevice)

Get the instruments serial number.

Parameters
hDeviceA device handle.
Returns
Instruments serial number.
uint32_t DevGetType ( TpDeviceHandle_t  hDevice)

Get device type.

Parameters
hDeviceA device handle.
Returns
Device type.
uint32_t DevGetVendorId ( TpDeviceHandle_t  hDevice)

Get the instruments vendor id.

Parameters
hDeviceA device handle.
Returns
Instruments vendor id.
bool8_t DevIsRemoved ( TpDeviceHandle_t  hDevice)

Check whether an instrument is removed.

Parameters
hDeviceA device handle.
Returns
BOOL8_TRUE if removed BOOL8_FALSE otherwise.