DNA/DNR-429-512/566 ARINC 429 Layer
Chapter 2
22
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.
2.7
Program the
Label Filter
Each input channel is equipped with a label filter that lets you filter out words
with a given label before they are received by the software.
You first need to get a pointer on the ARINC input channel you wish to program:
You can then add up to 255 filter entries. Each entry is represented by the fol-
lowing structure:
Add each entry one by one using the
AddFilterEntry()
method on the port
object:
As soon as the session starts, the input port starts filtering words that match the
specified label(s).
To reprogram the filter, you must stop the session first. You can then add addi-
tional filters or clear the existing filters with the following call:
2.8
Cleaning-up
the Session
session.CleanUp();
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:
// Get pointer to the input channel
CUeiARINCInputPort* pPort =
dynamic_cast<CUeiARINCInputPort*>(session.GetChanel(index));
typedef struct _tUeiARINCFilterEntry
{
// Label to accept
uInt32 Label;
// Accept word only if it carries different data from a
// previously received word with the same label.
Int32 NewData;
// Trigger the scheduler entry with the same index as this
// filter entry in the scheduler table of the output port
// that has the same index as this input port.
Int32 TriggerSchedulerEntry;
} tUeiARINCFilterEntry;
// Add an entry to filter
tUeiARINCFilterEntry entry = {12, 1, 1};
pPort->AddFilterEntry(entry);
// Clear the filter
pPort->ClearFilterEntries();
// clean up the sessions