LibTiePie  0.4.3
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Groups Pages
Opening a device

Before any device action can be performed a device handle is required. LibTiePie has several methods for opening a device. Devices can be opened by device list index, serial number or device id.

Open functions

LibTiePie has four functions for opening devices. One function for each device type (LstOpenOscilloscope, LstOpenGenerator and LstOpenI2CHost), and one (LstOpenDevice) to open a device by specifying its device type.

Open methods

LibTiePie supports three different methods for opening devices.

Open by device list index

Examples:

TpDeviceHandle_t hScp = LstOpenOscilloscope( IDKIND_INDEX , 4 ); // Try to open oscilloscope at device list index 4.
TpDeviceHandle_t hGen = LstOpenGenerator( IDKIND_INDEX , 2 ); // Try to open generator at device list index 2.
TpDeviceHandle_t hI2C = LstOpenI2CHost( IDKIND_INDEX , 0 ); // Try to open I2C host at device list index 0.

Open by serial number

Examples:

TpDeviceHandle_t hScp = LstOpenOscilloscope( IDKIND_SERIALNUMBER , 27917 ); // Try to open oscilloscope with serial number 27917.
TpDeviceHandle_t hGen = LstOpenGenerator( IDKIND_SERIALNUMBER , 22110 ); // Try to open generator with serial number 22110.
TpDeviceHandle_t hI2C = LstOpenI2CHost( IDKIND_SERIALNUMBER , 26697 ); // Try to open I2C host with serial number 26697.

Open by device id

Examples:

TpDeviceHandle_t hScp = LstOpenOscilloscope( IDKIND_DEVICEID , ID_HS5 ); // Try to open a Handyscope HS5 oscilloscope.
TpDeviceHandle_t hGen = LstOpenGenerator( IDKIND_DEVICEID , ID_HS5 ); // Try to open a Handyscope HS5 generator.
TpDeviceHandle_t hI2C = LstOpenI2CHost( IDKIND_DEVICEID , ID_HS5 ); // Try to open a Handyscope HS5 I2C host.