DNA/DNR-429-512/566 ARINC 429 Layer
Chapter 2
21
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.
You first need to add a pointer on the output channel that you wish to program:
You can then add up to 256 Scheduler entries. Each entry is represented by the
following structure:
Add each entry one by one using the AddSchedulerEntry() method on the port
object:
As soon as the session starts, the output port starts sending the scheduled
words in sequence. You can update the scheduled words while the session is
running with CUeiARINCWriter::WriteScheduler() as follows:
To change the number of scheduled words and/or their frequencies, you must
first stop the session, and then add additional words in the existing sequence or
clear the Scheduler with the following call:
// Configure ARINC output ports 0, 2, 5 on device 0
CUeiARINCOutputPort* pPort =
dynamic_cast<CUeiARINCOutputPort*>(session.GetChanel(index));
typedef struct _tUeiARINCSchedulerEntry
{
// Specifies whether this is a master or slave entry
Int32 Master;
// Specifies whether this entry should be scheduled periodically
Int32 Periodic;
// Scheduling delay count in us
uInt32 Delay;
// Word to be sent when this entry is processed.
tUeiARINCWord Word;
} tUeiARINCSchedulerEntry;
// Add one Scheduler entry
tUeiARINCSchedulerEntry entry = {1, 1,1000000, {0x12, 0, 0, 0, 0x300} };
pPort->AddSchedulerEntry(entry);
// Update the second word in scheduler table
tUeiARINCWord word;
word.Label = 23; // Set the label
word.Data = 0x102; // Set the payload
word.Sdi = 0
word.Ssm = 0
writer->WriteScheduler(2, 1, &word, &numWordsWritten);
// Clear the scheduler
pPort->ClearSchedulerEntries();