DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 2
10
Programming with the High Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.6
Date: March 2019
DNx-IRIG-650 Chap2x.fm
© Copyright 2019
United Electronic Industries, Inc.
Chapter 2
Programming with the High Level API
This section describes how to control the DNx-IRIG-650 using the UeiDaq
Framework High Level API.
UeiDaq Framework is object oriented and its objects can be manipulated in the
same manner from different development environments such as Visual C++,
Visual Basic or LabVIEW.
The following section focuses on the C++ API, but the concept is the same no
matter what programming language you use.
Please refer to the “UeiDaq Framework User Manual” for more information on
use of other programming languages.
2.1
Creating a
Session
The Session object controls all operations on your PowerDNA device. There-
fore, the first task is to create a session object:
2.2
Configuring
the Resource
String
UeiDaq Framework uses resource strings to select which device, subsystem
and channels to use within a session. The resource string syntax is similar to a
web URL:
<device class>://<IP address>/<Device Id>/<Subsystem><Channel list>
For PowerDNA and RACKtangle, the device class is
pdna
.
The IRIG-650 is programmed using the subsystem
irig
(letter-case insensitive).
For example, the following resource string selects IRIG input line 0 on device 1
at IP address 192.168.100.2: “pdna://192.168.100.2/Dev1/Irig0”
2.2.1
Configuring
Time Keeper
Input
Use the Session object’s method “
CreateIRIGTimeKeeperChannel
” to
configure the time keeper channel and parameters associated with the channel.
The following sample code shows how to configure the time keeper channel of
a IRIG-650 set as device 1:
// create a session object
CUeiSession irigSession;
// Configure the time keeper
CUeiIRIGTimeKeeperChannel* pTKChannel =
irigSession.CreateIRIGTimeKeeperChannel(
"pdna://192.168.100.2/Dev1/Irig0",
UeiIRIG1PPSInternal,
autoFollow);