DNA/DNR-429-512/566 ARINC 429 Layer
Chapter 2
18
Programming with the High Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.5
Date: December 2013
DNx-429-Chap2x.fm
© Copyright 2013
United Electronic Industries, Inc.
Chapter 2
Programming with the High Level API
This section describes how to control the DNx-429-512/566 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, LabVIEW, or DASYLAB.
UeiDaq Framework is bundled with examples for supported programming
languages. They are located under the UEI programs group in:
Start » Programs » UEI » Framework » Examples
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 PowerDNx device. Therefore,
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
.
ARINC layers have dedicated input and output ports. Use the ATX token for the
output subsystem and the ARX token for the input subsystem.
For example, the following resource string selects ARINC input ports 0,2,3 on
device 1 at IP address 192.168.100.2: “pdna://192.168.100.2/Dev1/ARX0,2,3”.
In addition to the resource, you will also configure:
•
Port Speed
of 12.5K or 100K for a selected Building Block. Note that for
the 429-512 it corresponds to configuration of port pairs.
•
Parity Mode
to use for controlling transmission integrity.
For input channels, you will configure these additional parameters:
•
SDI Filter
: used to filter incoming words based on their SDI bits.
•
SDI Mask
: if the result is other than zero, each incoming word is ANDed
with this mask and the word is passed on to the software.
session.CreateARINCInputPort( "pdna://192.168.100.2/Dev0/ARX0,2,3",
UeiARINCBitsPerSecond12500,
UeiARINCParityOdd,
false, 0);
// create a session object for input, and a session object for output
CUeiSession session;
// Configure ARINC input ports 0,2,3 on device 0