DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 2
16
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.
2.4
Reading data
Reading current time data from the IRIG-650 is done using a
reader
object.
The following sample code shows how to create an IRIG reader object and read
samples.
2.5
Cleaning-up
the Session
The session object will clean itself up when it goes out of scope or when it is
destroyed. To reuse the object with a different set of channels or parameters,
you can manually clean up the session as follows:
// create a reader and link it to the IRIG session’s stream
CUeiIrigReade reader(irigSession.GetDataStream());
// read current time in BCD format
tUeiBCDTime bcdtime;
reader.Read(&bcdtime);
// read current time in SBS (straight binary seconds) format
tUeiSBSTime sbstime;
reader.Read(&sbstime);
// read current time in ANSI C format;
tUeiANSITime ansitime;
reader.Read(&ansitime);
// clean up the session
irigSession.CleanUp();