+ All Categories
Home > Documents > ARINC 825 Library - esd-electronics-usa.comARINC 825 Library (object code) for... Order no....

ARINC 825 Library - esd-electronics-usa.comARINC 825 Library (object code) for... Order no....

Date post: 13-Mar-2020
Category:
Upload: others
View: 46 times
Download: 8 times
Share this document with a friend
106
ARINC 825 Library Software Manual ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 1 of 106 esd electronic system design gmbh Vahrenwalder Str. 207 • 30165 Hannover • Germany http://www.esd.eu Phone: +49 (0) 511 3 72 98-0 • Fax: +49 (0) 511 3 72 98-68
Transcript

ARINC 825 LibrarySoftware Manual

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 1 of 106

esd electronic system design gmbh Vahrenwalder Str. 207 • 30165 Hannover • Germany http://www.esd.eu Phone: +49 (0) 511 3 72 98-0 • Fax: +49 (0) 511 3 72 98-68

N O T E

The information in this document has been carefully checked and is believed to be entirely reliable. esd makes no warranty of any kind with regard to the material in this document, and assumes no responsibility for any errors that may appear in this document. esd reserves the right to make changes without notice to this, or any of its products, to improve reliability, performance or design.

esd assumes no responsibility for the use of any circuitry other than circuitry which is part of a product of esd gmbh.

esd does not convey to the purchaser of the product described herein any license under the patent rights of esd gmbh nor the rights of others.

esd electronic system design gmbhVahrenwalder Str. 20730165 HannoverGermanyPhone: +49-511-372 98-0Fax: +49-511-372 98-68E-Mail: [email protected]: www.esd.eu

USA / Canada:esd electronics Inc.525 Bernardston RoadSuite 1Greenfield, MA 01301 USAPhone: +1-800-732-8006Fax: +1-800-732-8093E-mail: [email protected]: www.esd-electronics.us

Page 2 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Document file: I:\Texte\Doku\MANUALS\PROGRAM\CAN\C.1140.21_ARINC825\ARINC825_Library_Manual_en_11.odt

Date of print: 2012-03-15

Documentation valid for software versions:

ARINC 825 Library (object code) for... Order no. Documented

Software Rev.Windows XP, Windows 2000

C.1140.06 (Windows/Linux CD)

ARINC Library: 1.1.09

Linux

RTX C.1140.16

QNX C.1140.17

VxWorks C.1140.18

Document History

Document history see page 7.

Technical details are subject to change without further notice.

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 3 of 106

Table of contents1. Overview Overview ...............................................................................................................................6

2. ARINC-Time ....................................................................................................................................... 12

3. CAN-errors ......................................................................................................................................... 13

4. Defines ............................................................................................................................................... 164.1 CAN-IDs .......................................................................................................................................174.2 CAN-Length .................................................................................................................................184.3 CAN-Baudrate ..............................................................................................................................194.4 Handle-Modeflags ........................................................................................................................214.5 Handle-Queuesize .......................................................................................................................224.6 IOCTLs ........................................................................................................................................ 234.7 IOCTL-TxSchedule ......................................................................................................................254.8 Status-Features ...........................................................................................................................264.9 Status-IRIG-B ...............................................................................................................................274.10 Status-Busstates ........................................................................................................................294.11 Bitrate-Controller ........................................................................................................................304.12 Bitrate-Flags ...............................................................................................................................314.13 IRIG-B-Modeflags ......................................................................................................................324.14 Errorcodes .................................................................................................................................334.15 Errorformats ...............................................................................................................................354.16 Thread-Priority ...........................................................................................................................364.17 Error-Injection ............................................................................................................................37

5. Datatypes ........................................................................................................................................... 385.1 ARINC_RESULT ..........................................................................................................................395.2 ARINC_HANDLE .........................................................................................................................405.3 ARINC_ERROR_HANDLER ........................................................................................................415.4 ARINC_GROUP ...........................................................................................................................425.5 NTCAN_CMSG_T ........................................................................................................................435.6 NTCAN_EVMSG_CAN_ERROR .................................................................................................445.7 NTCAN_EVMSG_CAN_BAUD_CHANGE ...................................................................................455.8 NTCAN_EVMSG_CAN_ERROR_EXT .........................................................................................465.9 ARINC_CMSG_T .........................................................................................................................475.10 ARINC_STATUS ........................................................................................................................495.11 ARINC_ERROR .........................................................................................................................515.12 NTCAN_CSCHED ......................................................................................................................535.13 NTCAN_FRAMECOUNT ............................................................................................................545.14 NTCAN_BUSSTATISTIC ...........................................................................................................555.15 NTCAN_CTRLSTATE ................................................................................................................565.16 NTCAN_BITRATE_INFO ...........................................................................................................575.17 NTCAN_FORMAT_EVENT_PARAMS .......................................................................................585.18 CAN_BIT_STREAM ...................................................................................................................595.19 CAN_EEI_UNIT .........................................................................................................................605.20 CAN_EEI_STATUS ....................................................................................................................62

6. Macros ................................................................................................................................................ 636.1 Boardstatus ..................................................................................................................................646.2 Timeconstants ..............................................................................................................................656.3 Timemasks ...................................................................................................................................666.4 Timemacros .................................................................................................................................67

7. Functions ............................................................................................................................................ 687.1 General-Functions ........................................................................................................................69

Page 4 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

7.1.1 arincOpen ............................................................................................................................70 7.1.2 arincClose ...........................................................................................................................72 7.1.3 arincBaudrateSet .................................................................................................................73 7.1.4 arincBaudrateGet ................................................................................................................74 7.1.5 arincIoctl ..............................................................................................................................75 7.1.6 arincStatus ..........................................................................................................................76 7.1.7 arincStatusReset .................................................................................................................77 7.1.8 arincCanErrorCounterReset ................................................................................................78 7.1.9 arincFormatError .................................................................................................................79 7.1.10 arincFormatEvent ..............................................................................................................80 7.1.11 arincFileDescriptorGet .......................................................................................................81

7.2 ARINC-Functions .........................................................................................................................82 7.2.1 arincErrorHandler ................................................................................................................83 7.2.2 arincIrigBConfigSet ..............................................................................................................84 7.2.3 arincIrigBConfigGet .............................................................................................................85 7.2.4 arincTimeSet .......................................................................................................................86 7.2.5 arincTimeGet .......................................................................................................................87 7.2.6 arincIntervalSet ....................................................................................................................88 7.2.7 arincIntervalGet ...................................................................................................................89 7.2.8 arincScheduleStart ..............................................................................................................90 7.2.9 arincScheduleStop ..............................................................................................................92 7.2.10 arincPoll .............................................................................................................................93 7.2.11 arincTxObjUpdate ..............................................................................................................94 7.2.12 arincTxObjDisable .............................................................................................................95 7.2.13 arincWaitForTimeslot .........................................................................................................96 7.2.14 arincObjAdd .......................................................................................................................97 7.2.15 arincObjDelete ...................................................................................................................99

7.3 CAN-Functions ...........................................................................................................................100 7.3.1 arincRxIdAdd .....................................................................................................................101 7.3.2 arincRxIdDelete .................................................................................................................102 7.3.3 arincRead ..........................................................................................................................103 7.3.4 arincTake ...........................................................................................................................104 7.3.5 arincWrite ..........................................................................................................................105 7.3.6 arincSend ..........................................................................................................................106

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 5 of 106

Overview Overview

1. Overview Overview

[ Top ] [ Generics ]

NAME ARINC825 Library

FILE NAME arinc.h

BRIEF MODULE DESCRIPTION Header for ARINC825 support library

AUTHOR Andreas Block (BL)

CREATION DATE 25-May-2009

PORTABILITY ANSI-C vxWorks, Linux, Win32 Depends on ntcan- and psys-library

COPYRIGHT Copyright (c) 2009-2012 by electronic system design gmbh

This software is copyrighted by and is the sole property of esd gmbh. All rights, title, ownership, or other interests in the software remain the property of esd gmbh. This software may only be used in accordance with the corresponding license agreement. Any unauthorized use, duplication, transmission, distribution, or disclosure of this software is expressly forbidden.

This Copyright notice may not be removed or modified without prior written consent of esd gmbh.

esd gmbh, reserves the right to modify this software without notice.

electronic system design gmbh Tel. +49-511-37298-0 Vahrenwalder Str 207 Fax. +49-511-37298-68 30165 Hannover http://www.esd.eu Germany [email protected]

MODIFICATION HISTORY Edit Date/Ver Edit Description ================= ======================================================= 24.02.2012 1.1.09 Fixed: Race condition, if multiple arincOpen() are called simultaneously (collision of multiple starting error deamons) 29.12.2011 1.1.08 Syncronization release for Windows, VxWorks and Linux Change: Windows NTCAN Library version was increased to represent addition of error injection. 15.12.2011 1.1.07 Added: Defines, structures and IOCTLs for error injection (CAN_BIT_STREAM, CAN_EEI_UNIT, CAN_EEI_STATUS, Error-Injection, arincIoctl(ARINC_IOCTL_EEI_CREATE,Page 6 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Overview Overview ARINC_IOCTL_EEI_DESTROY, ARINC_IOCTL_EEI_STATUS, ARINC_IOCTL_EEI_CONFIGURE, ARINC_IOCTL_EEI_START, ARINC_IOCTL_EEI_STOP, ARINC_IOCTL_EEI_TRIGGER_NOW)) Fixed: If IRIG-B status got queried directly after reconfiguration, false status bits (from prior reconfiguration) were delivered. Change: arincObjAdd() and arincObjDelete() don't check for 29-Bit IDs anymore. It's possible to use 11-Bit IDs (even in combination with 29-Bit IDs), now. Nevertheless you should know, what you are doing, as ARINC825 is defined for 29-Bit IDs, only. Change: Documentation: - New error injection stuff added - Corrected description of member "m" in ARINC_CMSG_T 01.09.2011 1.1.06 Fixed: Disabled TX objects get reenabled, if received from bus 15.08.2011 1.1.05 Syncronization release for Windows, VxWorks and Linux 13.07.2011 1.1.04 Fixed: IRIG-B not synchronizing with certain IRIG-B sources (IRIG-B firmware update to 1.AD5 needed) 30.06.2011 1.1.03 Special VxWorks release 09.06.2011 1.1.02 Added: VxWorks: Driver configuration options, see VxWorks README. 23.05.2011 1.1.01 Fixed: Severe bug in ioctl mechanism completely broke autobaud (bug introduced with 1.1.00 (synchronisation of arincIoctl())) 17.05.2011 1.1.00 Fixed: Synchronisation of arincIoctl() when arincClose() is called in parallel on same handle Fixed: Error frames were not counted correctly for NTCAN_BUSSTATISTIC (arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC)) Added: In NTCAN_BUSSTATISTIC aborted_frames was introduced Change: arincClose() optimized Change: Overall minor optimizations 07.04.2011 1.0.26 Fixed: Windows only: Crash in conjunction with timers Fixed: Windows: Updated device manager dialog Fixed: Missing feature flag ARINC_FEATURE_DIAGNOSTIC (AMC825 had this feature all the time, but flag was not set) Fixed: In NTCAN_BITRATE_INFO members ctrl_type and clock weren't set correctly, if no baudrate was set. 24.03.2011 1.0.25 Fixed: VxWorks only: Recompiled with -msoft-float Fixed: VxWorks: Symbols for driver configuration got stripped. Change: VxWorks: Symbols for driver configuration have amc825_ prefix, now. 01.03.2011 1.0.24 Fixed: Possible memory leak, if user did not delete all objects before calling arincClose() 07.02.2011 1.0.23 Fixed: Wrongly accounted RX Timeout errors after stopping and restarting a schedule Fixed: Another problem with RTR objects. Reception of normal ID on a node with same ID as RTR deleted the RTR bit in object. 13.12.2010 1.0.22 Fixed: RTR objects and arincObjAdd() 10.12.2010 1.0.21 Added: Function arincCanErrorCounterReset() to reset CAN error counter (before using, pay attention to notes!) Fixed: It's now possible, to add RTR objects with arincObjAdd() 06.12.2010 1.0.20 Fixed Windows Driver+Library, only. Fixed: arincWrite(), arincScheduleStop() blocking under certain conditions, if CAN controller got error passive

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 7 of 106

Overview Overview 30.11.2010 1.0.19 Fixed Windows Library, only. Added: New feature flag ARINC_FEATURE_SMART_ID_FILTER Bugfix: Flag ARINC_FEATURE_ID_RANGES is deprecated, now Bugfix: Windows: Fixed calltype of arincFormatEvent() 26.11.2010 1.0.18 Added: Documentation: CAN-errors Change: CAN traffic is bus mastered in RX direction Lot's of performance optimizations Change: CAN traffic LED blink code slightly changed Fixed: TX Job could hang, if baudrate was reset by another handle Fixed: TX channel unusable after CAN bus off 30.08.2010 1.0.17 Fixed: Problem with 29-Bit filter (introduced in last 1.0.16 release) 29.07.2010 1.0.16 Added: Asynchronous error handler get's triggered on errors Added: Function arincFormatEvent() to decode CAN event messages to strings Added: Structure NTCAN_FORMAT_EVENT_PARAMS Added: Structures NTCAN_EVMSG_CAN_ERROR, NTCAN_EVMSG_CAN_BAUD_CHANGE and

NTCAN_EVMSG_CAN_ERROR_EXT for easier CAN event message evaluation Added: Two new error codes ARINC_CAN_STATE_CHANGE and ARINC_CAN_ERROR, see Errorcodes Added: errorLostFrames member in ARINC_STATUS structure Added: ARINC_ERROR_INTERVAL_LOW error code to arincIntervalSet() in order to prevent user from setting insanely low timeslice durations (1ms and below), see Errorcodes Change: Structure ARINC_ERROR extended to provide more information to error handler Change: API change arincErrorHandler(): Added a parameter to select a single error code. Change: If there're no ARINC TX objects added to a handle, there's only one thread started on arincScheduleStart() Change: Documentation: - New structures and arincFormatEvent() were added to documentation - ARINC_ERROR description reworked - Removed note on restriction of context of error handler. Error handlers have dedicated context, now. - Added information for concurrent applications in arincScheduleStart() Bugfix: Renamed and corrected definition of ARINC_FEATURE_CAN_20B (former ARINC_FEATURE_BASIC_20B) Bugfix: CAN state transition to "Bus Ok" was erroneously counted as an error in "ARINC_STATUS" information Bugfix: Display of serial number on big endian hardware Removed: In version 1.0.14 the functionality of arincFormatEvent() was implemented in arincFormatError(). Therefore a define and structure (ARINC_ERROR_FORMAT_ERROR_EVENT and NTCAN_ERROR_FORMAT_ERROR_EVENT_BUFFER) were introduced. These have now been removed again. 03.05.2010 1.0.15 Fixed: FPGA contains change for latest change in hardware revision (Fixes crash on boards with GB0000xx serial number) 19.04.2010 1.0.14 Added: Possibility to use "select()" and "poll()" (currently VxWorks and Linux, only. Use WaitForMultipleObjects() on Windows for similar feature), see arincFileDescriptorGet() Added: New function arincFileDescriptorGet() to retrieve a filedescriptor needed for "select()"

Page 8 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Overview Overview Added: Variable "numCanNodes" (type: int) contains number of successfully initialized CAN nodes under VxWorks (after driver was started by canStart()) Added: arincFormatError() can be used to decode extended error events Define ARINC_ERROR_FORMAT_ERROR_EVENT Datatype NTCAN_ERROR_FORMAT_ERROREVENT_BUFFER Added: Boardstatus macros Change: All uses of timers have been changed to make Use of hardware timers on AMC825. Solving the problem of inaccurate error detection with timeslice durations around or below system tick. Change: Reenabled error detection again Change: Documentation: - description of new functionality added Bugfix: Fixed typo in AIM_AIM2TDIFF Bugfix: Exception on interrupt level Bugfix: Problem with arincTake() on VxWorks Bugfix: Problem with heavily disturbed CAN busses Bugfix: CAN Controller type was not correct in ARINC_STATUS.boardstatus Bugfix: Define ARINC_CANCTL_ESDACC not usable under VxWorks 03.02.2010 1.0.13 Change: Temporarily disabled parts of error detection (e.g. timeslot overload) as workaround for "exception on interrupt" issue 15.01.2010 1.0.12 Added: arincTxObjDisable() to disable ARINC objects (prevent them from being scheduled/transmitted) Change: Timeslice duration is 64-Bit wide, now (arincIntervalSet() and arincIntervalGet()) Change: Added three parameters to arincScheduleStart() to set the priority of the ARINC deamon threads Change: Documentation: - Thread-Priority defines - arincIntervalSet() description of interval parameter - arincScheduleStart() new parameters - arincTxObjDisable() Bugfix: Uninitialized return value of arincIrigBConfigSet(), if no changes were made to configuration Bugfix: Fixed scheduling behaviour for interval times near system tick duration 14.12.2009 1.0.11 Bugfix: arincIrigBConfigSet() threw an error message, if new config is equal to previous config 27.11.2009 1.0.10 Change: arincIrigBConfigSet() reinitializes IRIG-B module only if new configuration differs from previous Change: When using ARINC_MODE_TIMEFORMAT_FORCE flag with arincOpen(), IRIG-B module will be reinitialized only, when timeformat differs from the one previously configured Change: ARINC_GROUP changed to INT32. Using arincObjAdd() objects can be scheduled on arbitrary multiples of timeslice interval. Change: Documentation: - arincIrigBConfigSet() notes on resynchronization of IRIG-B module - More description on Status-IRIG-B flags 05.11.2009 1.0.9 Special Debug Version 02.11.2009 1.0.8 Bugfix: arincWrite() and arincSend() for VxWorks and Win32 29.10.2009 1.0.7 Change: More information to ARINC_STATUS structure: - CAN bus status - CAN error counters Change: ARINC_ERROR structure (parameter of asynchronous error handler) reworked

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 9 of 106

Overview Overview Change: Documentation: - Additions to ARINC_STATUS - Rendered some ARINC_STATUS descriptions more precisely Bugfix: Removed a "lost" debug output (suggested an error about unexpectedly received CAN frames, if ARINC and FIFO modes were combined) Bugfix: If arincIntervalSet() was used with a startTime = 0, after it was used with startTime != 0 on the same handle, an old value was used Bugfix: Under certain circumstances arincIntervalGet() did not return the interval correctly (bug introduced with 1.0.6) Bugfix: Definition of ARINC_FEATURE_LOCAL_ECHO Bugfix: Definition of ARINC_FEATURE_CAN_20B 22.10.2009 1.0.6 Added: ARINC_MODE_TIMEFORMAT_FORCE in Handle-Modeflags Added: arincFormatError() Change: Documentation: - Possible deviance of RX and TX counter within ARINC objects explained (ARINC_CMSG_T) - ARINC_MODE_TIMEFORMAT_FORCE in Handle-Modeflags added - Uncleardescription of timeout parameter of arincOpen() - Some more info to fifoSize parameters of arincOpen() - New function: arincFormatError() - New defines: Errorformats Bugfix: Memory allocation failure in arincObjAdd(), if a TX object was created with n outside of range of group. ARINC_INVALID_PARAMETER is returned, now. Bugfix: With certain CAN error conditions there was a possibility for Win32 systems to lock up Bugfix: On certain errors the time of occurrence was not stored correctly in status structure (arincStatus()) Bugfix: Starttime was incorrectly configured, if AIM timeformat was used (fraction of a second was set too small by a factor of ten) Bugfix: If an application, which had called arincScheduleStart() was unexpectedly aborted/ shutdown/crashed, a newly started scheduling from a following application did not correctly use the new starttime. Bugfix: arincTimeGet() and arincStatus() work without configured baudrate Bugfix: A possible system crash (BSOD) under Win32. Bugfix: Documentation: - Status-IRIG-B defines - arincStatus() and arincStatusReset() was not up to date 08.10.2009 1.0.5 Added: If AIM time format is chosen, it's used for basic CAN functions as well. Added: Finally arincStatus() function delivers usable data. arinctest.c example code changed accordingly. Added: arincTimeGet() and arincStatus() deliver IRIG-B status Added: Status-IRIG-B defines to evaluate IRIG-B status Added: Documentation: - Note on system Errorcodes - More links, better navigation - Missing baudrate indeces added (CAN-Baudrate) - Status-IRIG-B defines Change: It is no longer needed to have a baudrate configured, when calling arincIrigBConfigSet() or arincTimeSet() Change: ARINC_STATUS structure extended: - dllarinc (version info of ARINC library)

Page 10 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Overview Overview - irigBStatus (status of IRIG-B module) - time (current time, when status is retrieved) Change: Timeformat can be chosen _once_ per system, only!!! The first handle opened, determines the timeformat in use. All other handles/applications will have to use the same timeformat (ARINC-Time, arincOpen()). It is no longer possible to chose any IRIG-B mode in combination with any timeformat

arincIrigBConfigSet()). Bugfix: arincIntervalSet(): Starttime = 0 got fixed Bugfix: arincTimeSet(): works again (got deactivated with last release) Bugfix: A race condition got fixed, this could lead to corrupted RX-/TX-objects Bugfix: arincBaudrateSet(), CAN-Baudrate: ARINC_USER_BAUDRATE_NUM works with AMC825, now Bugfix: arincIoctl(): Handle related ioctls (e.g. ARINC_IOCTL_SET_RX_TIMEOUT) did not work correctly Bugfix: Issue: "arincTake() loses messages" Basic CAN functions worked on wrong handle and thus with wrong queuesizes Bugfix: arincObjDelete() Bugfix: arincPoll(): number of polled objects wasn't correctly returned in case of an error Bugfix: Library version code was wrong in last release (still 1.0.3 instead of 1.0.4), now up to date and correct again 10.09.2009 1.0.4 Added: Flag ARINC_IRIGB_TIMEFORMAT_YEAR_MAN (IRIG-B-Modeflags) Added: Functions arincIrigBConfigSet() and arincIrigBConfigGet() Added: Some more Macros to work with AIM timeformat

(Timemacros) Added: Timeout unit for arincWaitForTimeslot() defined as ms Change: ARINC_MODE_TIMEFORMAT_YEAR was renamed to ARINC_IRIGB_TIMEFORMAT_YEAR and is used with arincIrigBConfigSet() and arincIrigBConfigGet() instead of arincOpen() (IRIG-B-Modeflags) 31.07.2009 1.0.3 Added: Support for AIM timeformat (ARINC-Time) Added: Time conversion macros (Macros/Timemacros) Added: Mode flags for time conversion (Handle-Modeflags) Added: Lots of documentation Added: Support for ARINC_OLD_DATA and ARINC_NO_DATA Added: Support for scheduling start time Change: arincIntervalGet() parameters Bugfix: TX counters count non sent frames, now 16.06.2009 1.0.2 Added: Lots of defines for use with basic CAN functions and their documentation Bugfix: Changed error codes once more, in order to achieve independence of operating system 15.06.2009 1.0.1 Second test release Added: Robodoc documentation Bugfix: Handle for FIFO functions wasn't returned correctly Change: There's no FIFO mode for handles anymore. Every handle can use all library functions. Added: Parameter error handling improved Bugfix: Relocated base of ARINC-specific error codes from 0x80 to 0xA0 03.06.2009 1.0.0 First test release 28.05.2009 0.0.1 Initial version

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 11 of 106

ARINC-Time

2. ARINC-Time [ Top ] [ Generics ]

DESCRIPTION Within this library time is handled/presented in one of two formats. The format to be used, is set via the mode parameter of arincOpen(). !!! BEWARE: This decision is done once per system, the first handle determines the timeformat, all other applications/handles will have to choose.!!!

Time format #1 (default): Time is represented as a 64-Bit unsigned integer value, as follows: Upper (most significant) 32 Bit: Seconds since timebase (see below) Lower (least significant) 32 Bit: Splitseconds (see below)

Splitseconds: Most significant bit: 2^-1 seconds Least significant bit: 2^-32 seconds

Example, given the following 64-Bit value: 0x0000 0005 8001 0001 Upper 32-Bit: 0x00000005 => five seconds since timebase Lower 32-Bit: 0x80010001 => 2^-1 + 2^-16 + 2^-32 = 0,50001525902189314365... parts of a second Resulting in 5.5000152... seconds

Time format #2 (AIM format): This archive is closely related to time representation on IRIG-B, it contains no year information: Upper 32-Bit: Bits 5 - 0(LSB): Seconds within current minute Bits 11 - 6 : Minutes within current hour Bits 16 - 12 : Hour of current day Bits 25 - 17 : Day of current year Lower 32-bit: Bits 19 - 0(LSB): Microseconds of current second Bits 25 - 20 : Seconds within current minute Bits 31 - 26 : Minutes within current hour

There're two timebases to choose from: A) 1st of January of the current year, 00:00 (default) B) 1970/01/01, 00:00 (begin of UNIX time)

If there's no valid IRIG-B signal, current time can be set by use of arincTimeSet(). As soon as a valid IRIG-B is detected, the time will be set to IRIG-B time, regardless of any formerly set time. Use of timebase B makes sense only, if at first the IRIG-B signal contains information about year and secondly time format #1 is chosen.

NOTES Since time format #2 is generated from format #1 in software, it has a slight impact on CPU usage. There're some macros, to make work with time format #2 a little easier.

SEE ALSO Handle-Modeflags Macros Timemacros arincOpen() arincTimeSet() arincTimeGet()Page 12 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

CAN-errors

3. CAN-errors [ Top ] [ Generics ]

DESCRIPTION Basics: ------- On CAN bus there are pretty sophisticated error handling techniques, which not only allow to detect errors, but also help to remove defective hardware from a CAN bus in order to keep the remaining parts working. This is called CAN error confinement. This is accomplished via two error counters (RX + TX, called RX Error Counter (REC) and TX Error Counter (TEC)) and a ruleset related to these, defining when these counters need to be in- or decremented. This won't be discussed in all details here, as there's lots of literature written and web ressources published on this topic. Depending on these error counters every CAN node is in one of four states:

BUS OK (REC < 96 and TEC < 96) Normal state of a CAN node, when everything is ok. This does NOT necessarily mean the absence of errors on CAN bus though. The node is also said to be "error active", as it will actively propagate (or globalize) any detected error.

BUS WARN (96 >= REC < 128 or 96 >= TEC < 128) At least on error counter has reached error warning limit, there's a significant amount of errors on CAN bus, yet overall function doesn't seem to be affected. The node remains "error active" in this state.

ERROR PASSIVE (128 >= REC <= 255 or 128 >= TEC <= 255) Contary to the first two states a CAN node goes "error passive" (opposed to "error active") by exceeding the next threshold with any of its error counters. The node is still able to transmit and receive CAN frames, but it will not any longer propagate detected errors over the CAN bus.

BUS OFF (TEC > 255) Lastly a node enters bus off state, where it will no longer take part in CAN communication.

In general the error counters will be incremented, whenever a error is detected on CAN bus. Most CAN controllers provide special means to further investigate the circumstances of such error amongst other information the type of error and position of the error condition with a CAN frame are stored in a error code capture register (ECC).

Means of error detection: ------------------------- ARINC 825 library provides several different means to detect CAN errors or be notified about them.

(A) Polling: At any given time the CAN status can be polled using arincStatus() or arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS). The ARINC_STATUS structure returned from arincStatus() also contains ECC information of the last CAN bus error.

(B) Asynchronous notification with error handler: By means of arincErrorHandler() an asynchronous error handler function can be registered. On occurrence of certain errors (such as CAN bus errors amongst others) the registered handler will be called and is also passed an ARINC_STATUS structure with ECC information.

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 13 of 106

CAN-errors

(C) Asynchronous notification by virtual CAN events: There're two CAN events related to errors on CAN bus. These events are received as virtual CAN frames via arincRead()/arincTake(), if the respective CAN IDs have been enabled with arincRxIdAdd(). The first one is the CAN error event, which is generated on every state change in a node's CAN state machine. The second one, called extended error event, is generated on every CAN error frame on CAN bus. There's no guarantee to receive one event per error frame, as the driver analyzes the ECC information and tries to prevent IRQ floods by disabling the interrupt for certain time periods if heavy load is detected.

There are data structures defined to ease evaluation of these events (NTCAN_EVMSG_CAN_ERROR and NTCAN_EVMSG_CAN_ERROR_EXT), these can be simply mapped to the data section of the respective CAN event frames.

Additionaly arincFormatEvent() can be used to convert the contained information into human readable strings.

ECC Byte -------- In order to further analyze a CAN bus error the ECC (error code capture) is of special importance. So far this feature is limited to two CAN controller types (SJA1000 and esdacc). Both controllers use the same bit encoding, so decoding of the ECC byte works exactly the same: Bit | Symbol | Name | Value | Function ------------------------------------------------------------------------------------------- ECC Bit 7 (MSB) | ERRC1 | Error Code 1 | - | - ECC Bit 6 | ERRC0 | Error Code 2 | - | - ECC Bit 5 | DIR | Direction | 1 | RX; error occurred during reception | | | 0 | TX; error occurred during transmission ECC Bit 4 | SEG4 | Segment 4 | - | - ECC Bit 3 | SEG3 | Segment 3 | - | - ECC Bit 2 | SEG2 | Segment 2 | - | - ECC Bit 1 | SEG1 | Segment 1 | - | - ECC Bit 0 (LSB) | SEG0 | Segment 0 | - | -

Error type ----------

ERRC1 | ERRC0 | Function ------------------------------------ 0 | 0 | bit error 0 | 1 | form error 1 | 0 | stuff error 1 | 1 | other type of error

Page 14 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

CAN-errors

Error position --------------

SEG4 | SEG3 | SEG2 | SEG1 | SEG0 | Function ----------------------------------------------------------- 0 | 0 | 0 | 1 | 1 | start of frame 0 | 0 | 0 | 1 | 0 | ID.28 to ID.21 0 | 0 | 1 | 1 | 0 | ID.20 to ID.18 0 | 0 | 1 | 0 | 0 | bit SRTR 0 | 0 | 1 | 0 | 1 | bit IDE 0 | 0 | 1 | 1 | 1 | ID.17 to ID.13 0 | 1 | 1 | 1 | 1 | ID.12 to ID.5 0 | 1 | 1 | 1 | 0 | ID.4 to ID.0 0 | 1 | 1 | 0 | 0 | bit RTR 0 | 1 | 1 | 0 | 1 | reserved bit 1 0 | 1 | 0 | 0 | 1 | reserved bit 0 0 | 1 | 0 | 1 | 1 | data length code 0 | 1 | 0 | 1 | 0 | data field 0 | 1 | 0 | 0 | 0 | CRC sequence 1 | 1 | 0 | 0 | 0 | CRC delimiter 1 | 1 | 0 | 0 | 1 | acknowledge slot 1 | 1 | 0 | 1 | 1 | acknowledge delimiter 1 | 1 | 0 | 1 | 0 | end of frame 1 | 0 | 0 | 1 | 0 | intermission 1 | 0 | 0 | 0 | 1 | active error flag 1 | 0 | 1 | 1 | 0 | passive error flag 1 | 0 | 0 | 1 | 1 | tolerate dominant bits 1 | 0 | 1 | 1 | 1 | error delimiter 1 | 1 | 1 | 0 | 0 | overload flag

SEE ALSO Status-Busstates ARINC_EV_CAN_ERROR (CAN-IDs) ARINC_EV_CAN_ERROR_EXT (CAN-IDs) NTCAN_EVMSG_CAN_ERROR NTCAN_EVMSG_CAN_ERROR_EXT ARINC_STATUS IOCTLs arincStatus() arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS) arincFormatEvent() arincErrorHandler()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 15 of 106

Defines

4. Defines [ Top ] [ Generics ]

DESCRIPTION Documentation of symbol definitions:

o CAN-IDs o CAN-Length o CAN-Baudrate o Handle-Modeflags o Handle-Queuesize o IOCTLs o IOCTL-TxSchedule o Status-Features o Status-IRIG-B o Status-Busstates o Bitrate-Controller o Bitrate-Flags o IRIG-B-Modeflags o Errorcodes o Errorformats o Thread-Priority

Page 16 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.1 CAN-IDs [ Top ] [ Defines ] [ Definitions ]

NAME Following defines can be used in combination with CAN ID parameters, e.g. in ARINC_CMSG_T structure or with arincRxIdAdd(), arincRxIdDelete()

DESCRIPTION ARINC_20B_BASE -- Marks 29-Bit CAN IDs (CAN-20b) ARINC_EV_BASE -- Marks CAN events ("virtual special purpose CAN frames", see event IDs below)

ARINC_EV_CAN_ERROR -- CAN bus state has changed. Event contains: Byte 1: Bus state Byte 3: Lost messages Event can be received, only. ARINC_EV_BAUD_CHANGE -- Baudrate of CAN node was reconfigured: Bytes 0-3: New baudrate as configured by user If length of event is eight: Bytes 4-7: New baudrate in numerical form Event can be received, only. ARINC_EV_CAN_ERROR_EXT -- An error occurred on CAN bus: Byte 0: Status information from CAN controller Byte 1: Detailed error information (Error Code Capture register) Byte 2: CAN RX error counter Byte 3: CAN TX error counter Event can be received, only. ARINC_EV_BUSLOAD -- Cyclic event with statistical data, a 64-Bit counter of bits transferred on CAN bus Event can be received, only.

NOTES CAN event IDs (ARINC_EV_xxx): The events will be mainly used by the basic CAN functions. Higher level ARINC functions provide this information in different ways (see arincStatus() and arincErrorHandler()).

SEE ALSO CAN-errors ARINC_CMSG_T NTCAN_CMSG_T arincRxIdAdd() arincRxIdDelete()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 17 of 106

Defines

4.2 CAN-Length [ Top ] [ Defines ] [ Definitions ]

NAME Flags used in length field of CAN message structures (NTCAN_CMSG_T, ARINC_CMSG_T) in order to mark certain types of CAN frames.

DESCRIPTION ARINC_RTR -- Marks RTR frames ARINC_NO_DATA -- The requested object does not contain data, yet. This flag has meaning only, if the handle was opened in object mode or is used on ARINC_CMSG_T objects returned from arincPoll(). ARINC_INTERACTION -- Marks interaction frames (Frames that are transmitted by another handle on the same physical CAN node). This has no meaning if the handle was opened in object mode. ARINC_OLD_DATA -- Marks old data When using arincPoll() this flag can be used to quickly identify data objects, which haven't changed since last call of arincPoll().

NOTES ARINC_INTERACTION is of use for basic CAN-Functions, only.

SEE ALSO ARINC_CMSG_T NTCAN_CMSG_T

Page 18 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.3 CAN-Baudrate [ Top ] [ Defines ] [ Definitions ]

NAME Flags to be used with arincBaudrateSet() and arincBaudrateGet()

DESCRIPTION ARINC_NO_BAUDRATE -- The CAN node is taken off bus. It won't be able receive or send frames anymore, nor will it perform any kind of error detection. ARINC_AUTOBAUD -- Activates automatic baudrate detection

Following defines set CiA recommended baudrates: ARINC_BAUD_1000 -- 1 MBit/s ARINC_BAUD_800 -- 800 kBit/s ARINC_BAUD_500 -- 500 kBit/s ARINC_BAUD_250 -- 250 kBit/s ARINC_BAUD_125 -- 125 kBit/s ARINC_BAUD_100 -- 100 kBit/s ARINC_BAUD_50 -- 50 kBit/s ARINC_BAUD_20 -- 20 kBit/s ARINC_BAUD_10 -- 10 kBit/s

Flags to be used in combination with the above defines: ARINC_LISTEN_ONLY_MODE -- CAN node is set in listening only mode. Within this mode, the CAN node can receive CAN frames and even detect errors, but it won't interfere with the CAN bus. No transmission is possible, nor will the node communicate any detected errors on CAN bus. This can also be combined with ARINC_AUTOBAUD (useful e.g. to have an analyzer application adapt to any given CAN bus. If a baudrate was detected, the baudrate will be locked. If the baudrate changes on CAN bus, autobaud needs to be reenabled, in order to adapt to the new baudrate.

Additional flags, which allow to configure baudrates in different ways: ARINC_USER_BAUDRATE -- By means of this mask, user can program the BTRs of the CAN controller directly. ARINC_USER_BAUDRATE_NUM -- User can specify a numerical value in Bits/s as baudrate parameter. E.g.: ARINC_USER_BAUDRATE_NUM + 500000 will lead to a baudrate of 500 kBit/s.

NOTES The described defines cover CiA defined baudrates, only. In addition to these a number of other predefined baudrates exist. Following table shows all predefined baudrates, use index as parameter for arincBaudrateSet():

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 19 of 106

Defines

Baudrate | Index ------------------------------ 1 MBit/s | ARINC_BAUD_1000 800 kBit/s | ARINC_BAUD_800 666.6 kBit/s | 0x01 500 kBit/s | ARINC_BAUD_500 333.3 kBit/s | 0x03 250 kBit/s | ARINC_BAUD_250 166 kBit/s | 0x05 125 kBit/s | ARINC_BAUD_125 100 kBit/s | ARINC_BAUD_100 83.3 kBit/s | 0x10 66.6 kBit/s | 0x08 50 kBit/s | ARINC_BAUD_50 33.3 kBit/s | 0x0A 20 kBit/s | ARINC_BAUD_20 12.5 kBit/s | 0x0C 10 kBit/s | ARINC_BAUD_10

Furthermore it is possible to set the BTR registers of the CAN controller directly using ARINC_USER_BAUDRATE define. The BTR of the CAN controller used on AMC825 is structured as follows: 32-Bit word with bits MSB (31) downto LSB(0) Bits 7 - 0: Bitrate Prescaler (BRP) Bits 15 - 12: TSEG1 Bits 22 - 20: TSEG2 Bits 26 - 25: Synchronization Jump Width (SJW)

So looking at a 32-Bit word like this 0x0UV0W0XY: SJW = second and third bit of U TSEG2 = lower three bits of V TSEG1 = W BRP = XY

SEE ALSO arincBaudrateSet() arincBaudrateGet()

Page 20 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.4 Handle-Modeflags [ Top ] [ Defines ] [ Definitions ]

NAME Mode flags for the mode parameter of arincOpen()

DESCRIPTION ARINC_MODE_NO_RTR -- The handle will receive no RTR frames ARINC_MODE_NO_DATA -- The handle will receive RTR frames, only ARINC_MODE_NO_INTERACTION -- No interaction frames will be received on this handle ARINC_MODE_MARK_INTERACTION -- Interaction frames will be marked in length field ARINC_MODE_OBJECT -- The handle will be opened in object mode, instead of FIFO mode ARINC_MODE_TIMEFORMAT_AIM -- Set the timeformat for ARINC-Functions on this handle to AIM format, otherwise time is represented in seconds (upper 32 bit) and splitseconds (lower 32 bit) since 0:00, January 1st 1970 (UTC). ARINC_MODE_TIMEFORMAT_FORCE -- Use with care! By means of this flag, you can force the timeformat chosen by the current call of arincOpen(), regardless of the timeformat formerly chosen by any other application. If such an application is still running, the effects on its ability to display and calculate times correctly are undefined. In any case, this flag will cause loss of synchronisation and following resynchronisation of the IRIG-B module (supposing the forced time format differs from the one formerly in use).

NOTES By default no flag is set.

SEE ALSO ARINC-Time arincOpen()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 21 of 106

Defines

4.5 Handle-Queuesize [ Top ] [ Defines ] [ Definitions ]

NAME Special values to be used with the queuesize parameters of arincOpen()

DESCRIPTION ARINC_MAX_TX_QUEUESIZE -- Maximum TX queuesize per handle ARINC_MAX_RX_QUEUESIZE -- Maximum RX queuesize per handle

SEE ALSO arincOpen()

Page 22 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.6 IOCTLs [ Top ] [ Defines ] [ Definitions ]

NAME IOCTL commands

DESCRIPTION ARINC_IOCTL_FLUSH_RX_FIFO - Flush RX FIFO (no arg) ARINC_IOCTL_GET_RX_MSG_COUNT - Return number of messages in RX FIFO (arg->INT32) ARINC_IOCTL_GET_RX_TIMEOUT - Return configured RX timeout (arg->INT32) ARINC_IOCTL_GET_TX_TIMEOUT - Return configured TX timeout (arg->INT32) ARINC_IOCTL_SET_20B_HND_FILTER - Configure 20b ID filter (arg=INT32) ARINC_IOCTL_GET_SERIAL - Get hardware serial number (arg->INT32) ARINC_IOCTL_GET_TIMESTAMP_FREQ - Return frequency of timestamp counter (arg->UINT64) ARINC_IOCTL_GET_TIMESTAMP - Return current timestamp (arg->UINT64) ARINC_IOCTL_ABORT_RX - Abort a pending arincRead() (no arg) ARINC_IOCTL_ABORT_TX - Abort a pending arincWrite() (no arg) ARINC_IOCTL_SET_RX_TIMEOUT - Change RX timeout (arg=INT32) ARINC_IOCTL_SET_TX_TIMEOUT - Change TX timeout (arg=INT32) ARINC_IOCTL_TX_OBJ_CREATE - Create a TX object (arg->NTCAN_CMSG_T) These objects can be used for TX scheduling or Auto Answer (also in parallel). Per physical CAN node (NOT per handle) there may be exactly one object created per CAN ID. Maximum number of objects depends on system ressources. ARINC_IOCTL_TX_OBJ_AUTOANSWER_ON - Activates Auto Answer for a given TX object (arg->NTCAN_CMSG_T). The object will be immediately send after a RTR frame with same CAN ID has been received. ARINC_IOCTL_TX_OBJ_AUTOANSWER_OFF - Deactivates Auto Answer (arg->NTCAN_CMSG_T) ARINC_IOCTL_TX_OBJ_UPDATE - Changes the data contained in a formerly created TX object (arg->NTCAN_CMSG_T) ARINC_IOCTL_TX_OBJ_DESTROY - Destroys a formerly created TX object (arg->NTCAN_CMSG_T) ARINC_IOCTL_TX_OBJ_SCHEDULE_START - Start the actual TX scheduling (no arg) ARINC_IOCTL_TX_OBJ_SCHEDULE_STOP - Stop TX scheduling (no arg) ARINC_IOCTL_TX_OBJ_SCHEDULE - Schedule a TX object for transmission (arg->NTCAN_CSCHED) ARINC_IOCTL_SET_BUSLOAD_INTERVAL - Configures the time between two ARINC_EV_BUSLOAD events (arg=INT32) ARINC_IOCTL_GET_BUSLOAD_INTERVAL - Return the time between two ARINC_EV_BUSLOAD events (arg->INT32) ARINC_IOCTL_GET_BUS_STATISTIC - Returns statistical data from CAN bus (arg->NTCAN_BUSSTATISTIC) ARINC_IOCTL_GET_CTRL_STATUS - Returns information about the error status of the CAN controller (arg->NTCAN_CTRLSTATE) ARINC_IOCTL_GET_BITRATE_DETAILS - Returns information about the currently configured baudrate (arg->NTCAN_BITRATE_INFO) ARINC_IOCTL_EEI_CREATE - Allocate error injection (EEI) unit (arg-> ) ARINC_IOCTL_EEI_DESTROY - Release EEI unit ARINC_IOCTL_EEI_STATUS - Get status of EEI unit ARINC_IOCTL_EEI_CONFIGURE - Configure EEI unit ARINC_IOCTL_EEI_START - Activate EEI unit

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 23 of 106

Defines ARINC_IOCTL_EEI_STOP - Deactivate EEI unit ARINC_IOCTL_EEI_TRIGGER_NOW - Manually trigger an activated EEI unit

SEE ALSO arincIoctl()

Page 24 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.7 IOCTL-TxSchedule [ Top ] [ Defines ] [ Definitions ]

NAME Defines to be used flags field of NTCAN_CSCHED structure in combination with arincIoctl(ARINC_IOCTL_TX_OBJ_SCHEDULE).

DESCRIPTION ARINC_TXSCHED_FLAG_EN - ID is enabled ARINC_TXSCHED_FLAG_DIS - ID is disabled ARINC_TXSCHED_FLAG_REL - Start time is relative ARINC_TXSCHED_FLAG_ABS - Start time is absolute ARINC_TXSCHED_FLAG_INC8 - 8 Bit incrementer ARINC_TXSCHED_FLAG_INC16 - 16 Bit incrementer ARINC_TXSCHED_FLAG_INC32 - 32 Bit incrementer ARINC_TXSCHED_FLAG_DEC8 - 8 Bit decrementer ARINC_TXSCHED_FLAG_DEC16 - 16 Bit decrementer ARINC_TXSCHED_FLAG_DEC32 - 32 Bit decrementer ARINC_TXSCHED_FLAG_OFS0 - Counter at offset 0 ARINC_TXSCHED_FLAG_OFS1 - Counter at offset 1 ARINC_TXSCHED_FLAG_OFS2 - Counter at offset 2 ARINC_TXSCHED_FLAG_OFS3 - Counter at offset 3 ARINC_TXSCHED_FLAG_OFS4 - Counter at offset 4 ARINC_TXSCHED_FLAG_OFS5 - Counter at offset 5 ARINC_TXSCHED_FLAG_OFS6 - Counter at offset 6 ARINC_TXSCHED_FLAG_OFS7 - Counter at offset 7

SEE ALSO arincIoctl(ARINC_IOCTL_TX_OBJ_SCHEDULE)

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 25 of 106

Defines

4.8 Status-Features [ Top ] [ Defines ] [ Definitions ]

NAME Use these defines to evaluate features field in ARINC_STATUS

DESCRIPTION ARINC_FEATURE_FULL_CAN - CAN controller is a so called "Full CAN controller" Compared to "basic CAN controllers" this name does _not_ implicate an improvement, but rather a different purpose. Full CAN controllers are used for embedded applications, whereas basic CAN controllers are better suited for multi-purpose applications ARINC_FEATURE_CAN_20B - 29-Bit CAN IDs can be received and transmitted ARINC_FEATURE_CYCLIC_TX - Customer specific feature flag ARINC_FEATURE_DEVICE_NET - Hardware supports DeviceNet ARINC_FEATURE_RX_OBJECT_MODE - Driver supports RX object mode (sometimes also called flat mode) ARINC_FEATURE_TIMESTAMP - Hardware supports timestamping ARINC_FEATURE_LISTEN_ONLY_MODE - Hardware supports "Listen only mode" ARINC_FEATURE_SMART_DISCONNECT - Driver supports "Leave bus after last close" ARINC_FEATURE_LOCAL_ECHO - Hardware/Driver supports self reception ARINC_FEATURE_ID_RANGES - Featureflag is deprecated, Don't use ARINC_FEATURE_SMART_ID_FILTER - Driver supports granular filtering of 29-Bit CAN IDs ARINC_FEATURE_SCHEDULING - Driver supports TX scheduling mode ARINC_FEATURE_DIAGNOSTIC - Driver/Hardware supports extended bus diagnostic features ARINC_FEATURE_ERROR_INJECTION - Hardware supports error injection ARINC_FEATURE_ID_RANGES - Featureflag is deprecated, Don't use

SEE ALSO arincStatus()

Page 26 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.9 Status-IRIG-B [ Top ] [ Defines ] [ Definitions ]

NAME Use these defines to evaluate irigBStatus field in ARINC_STATUS or with status parameter of arincTimeGet()

DESCRIPTION ARINC_IRIGB_STATUS_PHASE_LOCK - Locked phase of IRIG-B signal Bit is set, when phase error of 1kHz signal is below 100us Bit is reset, when phase error of 1kHz signal is above 1ms ARINC_IRIGB_STATUS_BIT_LOCK - Locked bit state of IRIG-B signal Bit is set, when valid modulation is detected Bit is reset, when no valid modulation is detected ARINC_IRIGB_STATUS_POSITION_LOCK - Locked position of IRIG-B signal Bit is set, when two consecutive P-Bits (Position identifier in IRIG-B stream) were detected Bit is reset, when there was an error in P-Bits or Index-Bits detected Note: When this bit is set for the first time, the "time counter" will be set within the following second ARINC_IRIGB_STATUS_TIME_VALID - The delivered time is valid. Bit is set, when the difference between IRIG-B signal and "time counter" is ten times below 1ms, while ARINC_IRIGB_STATUS_POSITION_LOCK is set Bit is reset, if ARINC_IRIGB_STATUS_TIME_ERROR is set for longer than 60s Note: This bit will stay asserted for a "while", even if IRIG-B signal is lost. In this case ARINC_IRIGB_STATUS_NO_DATA and ARINC_IRIGB_STATUS_NO_INPUT bits will show the loss of IRIG-B signal and ARINC_IRIGB_STATUS_FREE_WHEELING marks the "valid time" as internally generated on basis of the last known IRIG-B signal. Note 2: If IRIG-B signal get's disconnected, ARINC_IRIGB_STATUS_TIME_ERROR won't change and thus ARINC_IRIGB_STATUS_TIME_VALID stays set. ARINC_IRIGB_STATUS_NO_DATA - If set, there's no signal or valid modulation detected ARINC_IRIGB_STATUS_NO_INPUT - If set, there's no valid input signal detected (amplitude of IRIG-B signal is too low) ARINC_IRIGB_STATUS_FREE_WHEELING - If set, the IRIG-B controller is not active, there's no IRIG-B signal detected

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 27 of 106

Defines If not set, the IRIG-B controller is active, there's a valif IRIG-B signal ARINC_IRIGB_STATUS_TIME_ERROR - If set, current time deviates from "time counter" (expected time) by more than 256ms. Note: This bit will change only, if there's a valid IRIG-B signal. Loss of IRIG-B signal won't change this bit.

NOTES In order to judge the quality of current time you need to take at least ARINC_IRIGB_STATUS_TIME_VALID and ARINC_IRIGB_STATUS_FREE_WHEELING into account (in certain cases ARINC_IRIGB_STATUS_TIME_ERROR as well):

A) ARINC_IRIGB_STATUS_TIME_VALID == 1 ARINC_IRIGB_STATUS_FREE_WHEELING == 0 ARINC_IRIGB_STATUS_TIME_ERROR == 0 or 1 The current time is based on connected IRIG-B signal. As described for ARINC_IRIGB_STATUS_TIME_ERROR, the current time correlates good (ARINC_IRIGB_STATUS_TIME_ERROR == 0) or rather badly (ARINC_IRIGB_STATUS_TIME_ERROR == 1) with IRIG-B signal.

B) ARINC_IRIGB_STATUS_TIME_VALID == 1 ARINC_IRIGB_STATUS_FREE_WHEELING == 1 The current time is based on a previously connected IRIG-B signal.

C) ARINC_IRIGB_STATUS_TIME_VALID == 0 The current time is free wheeling, based on a manually set time. The time does _not_ correlate to an IRIG-B signal. There has never been a valid IRIG-B signal connected to the system.

SEE ALSO arincStatus() arincTimeGet()

Page 28 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.10 Status-Busstates [ Top ] [ Defines ] [ Definitions ]

NAME CAN bus status as delivered by ARINC_EV_CAN_ERROR, arincErrorHandler(), arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS) or arincStatus()

DESCRIPTION ARINC_BUSSTATE_OK - CAN bus is ok ARINC_BUSSTATE_WARN - One of the CAN error counters (RX or TX) has reached its warning limit ARINC_BUSSTATE_ERRPASSIVE - One of the CAN error counters (RX or TX) has went over 127. The CAN node is "error passive". It is still possible to send and receive CAN frames, but the CAN node won't generate error frames anymore. ARINC_BUSSTATE_BUSOFF - TX error counter has passed 255. The CAN node can't receive or transmit anymore, it won't interfere with the CAN bus.

SEE ALSO CAN-errors ARINC_EV_CAN_ERROR arincErrorHandler() arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS) arincStatus()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 29 of 106

Defines

4.11 Bitrate-Controller [ Top ] [ Defines ] [ Definitions ]

NAME Type of CAN controller as returned from arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS) or arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS)

DESCRIPTION ARINC_CANCTL_SJA1000 - NXP SJA1000 / 82C200 ARINC_CANCTL_I82527 - Intel I82527 ARINC_CANCTL_FUJI - Fujitsu MBxxxxx MCU ARINC_CANCTL_LPC - NXP LPC2xxx MCU ARINC_CANCTL_MSCAN - Freescale MCU ARINC_CANCTL_ATSAM - Atmel ARM CPU ARINC_CANCTL_ESDACC - esd ESDACC ARINC_CANCTL_CC770 - Bosch CC770

SEE ALSO IOCTLs NTCAN_CTRLSTATE NTCAN_BITRATE_INFO arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS) arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS)

Page 30 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.12 Bitrate-Flags [ Top ] [ Defines ] [ Definitions ]

NAME Special (probably controller specific) attributes of a CAN baudrate, as delivered by arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS)

DESCRIPTION ARINC_BITRATE_FLAG_SAM - Triple sampling activated

SEE ALSO IOCTLs NTCAN_BITRATE_INFO arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS)

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 31 of 106

Defines

4.13 IRIG-B-Modeflags [ Top ] [ Defines ] [ Definitions ]

NAME Mode flags for the mode parameter of arincIrigBConfigSet() and arincIrigBConfigGet()

DESCRIPTION ARINC_IRIGB_SOURCE_ANALOG_1 -- Select IRIG-B Analog input as source for IRIG-B time. This is the default input, if no or multiple inputs are selected ARINC_IRIGB_SOURCE_DIGITAL_1 -- Select IRIG-B Digital input as source for IRIG-B time ARINC_IRIGB_TIMEFORMAT_YEAR -- If this flag is set, the year information (which is an optional IRIG-B extension) will be used. If both ARINC_IRIGB_TIMEFORMAT_YEAR and ARINC_IRIGB_TIMEFORMAT_YEAR_MAN are set, this flag has priority. ARINC_IRIGB_TIMEFORMAT_YEAR_MAN -- If this flag is set, the year may/has to be set manually by using arincTimeSet(). This flag is ignored, if both ARINC_IRIGB_TIMEFORMAT_YEAR or ARINC_IRIGB_TIMEFORMAT_YEAR_MAN are set.

NOTES ARINC_IRIGB_TIMEFORMAT_YEAR and ARINC_IRIGB_TIMEFORMAT_YEAR_MAN might influence other handles and/or applications as well, if not used with care, since they change the configuration of the IRIG-B hardware. On the other hand, there's no need to call arincIrigBConfigSet() for every handle, once per device is sufficient (if it's needed at all and the default values do not fit your needs).

It is recommended to use arincIrigBConfigGet() prior to calling arincIrigBConfigSet(). This way it is possible to write applications, which won't interfere with each other.

SEE ALSO ARINC-Time arincIrigBConfigSet() arincIrigBConfigGet()

Page 32 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.14 Errorcodes [ Top ] [ Defines ] [ Definitions ]

NAME Error codes generated by ARINC library functions

ERRORS ARINC_ERRNO_BASE -- Whenever possible, ARINC library uses system error codes (e.g. under Linux the errno values will be used). For errors which can't be mapped to these system codes, ARINC_ERRNO_BASE is used as offset to avoid ambiguities.

ARINC_SUCCESS -- No error

ARINC_RX_TIMEOUT -- A blocking receive function reached its timeout without any reception ARINC_TX_TIMEOUT -- A blocking transmit function reached its timeout without any transmission ARINC_TX_ERROR -- An error occurred, while trying to send ARINC_CONTR_OFF_BUS -- The CAN controller went in CAN state: Bus Off ARINC_CONTR_BUSY -- The CAN controller is busy and can't process the given command ARINC_CONTR_WARN -- The CAN controller went in CAN state: Bus Warn ARINC_NO_ID_ENABLED -- Deprecated error code ARINC_ID_ALREADY_ENABLED -- Deprecated error code ARINC_ID_NOT_ENABLED -- Deprecated error code ARINC_INVALID_FIRMWARE -- Wrong firmware version ARINC_MESSAGE_LOST -- Messages have been lost by CAN driver ARINC_INVALID_HARDWARE -- Wrong hardware version ARINC_PENDING_WRITE -- Another arincWrite() is pending on the same handle ARINC_PENDING_READ -- Another arincRead() is pending on the same handle ARINC_INVALID_DRIVER -- Driver doesn't fit library version ARINC_INVALID_PARAMETER -- One of the parameters was invalid ARINC_INVALID_HANDLE -- No valid ARINC_HANDLE ARINC_NET_NOT_FOUND -- Attempt to open a handle on a nonexistent CAN bus ARINC_INSUFFICIENT_RESOURCES -- Not enough system ressources for requested operation ARINC_OPERATION_ABORTED -- A blocking operation was aborted ARINC_WRONG_DEVICE_STATE -- CAN hardware is in wrong power state ARINC_HANDLE_FORCED_CLOSE -- Error currently not supported ARINC_NOT_IMPLEMENTED -- The requested function is not implemented, yet ARINC_NOT_SUPPORTED -- The requested function is not supported by the CAN hardware ARINC_CONTR_ERR_PASSIVE -- The CAN controller went in CAN state: Error Passive ARINC_ERROR_NO_BAUDRATE -- Attempt to transmit on a CAN node, which has no configured baudrate, yet ARINC_ERROR_LOM -- Attempt to transmit on a CAN node in listen only mode ARINC_SOCK_CONN_TIMEOUT -- Special EtherCAN error code ARINC_SOCK_CMD_TIMEOUT -- Special EtherCAN error code ARINC_SOCK_HOST_NOT_FOUND -- Special EtherCAN error code

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 33 of 106

Defines ARINC_ERROR_TXSLICE_TIMEOUT -- (ARINC) The next TX slice was not triggered ARINC_ERROR_TXSLICE_INCOMPLETE -- (ARINC) A TX slice wasn't transmitted completely ARINC_ERROR_SCHED_DISABLED -- (ARINC) The scheduling hasn't been enabled, yet. Use arincScheduleStart() first. ARINC_ERROR_SCHED_ENABLED -- (ARINC) The scheduling is currently enabled. Use arincScheduleStop() first. ARINC_ERROR_ID_BUSY -- (ARINC) There's already an object added with the same CAN ID ARINC_ERROR_COL_BUSY -- (ARINC) There's already an object with the group-m-n combination ARINC_ERROR_ID_NOT_FOUND -- (ARINC) A referenced ARINC object was not found (e.g. with arincTxObjUpdate()) ARINC_ERROR_TIME_NOT_SET -- (ARINC) Failure while configuring start time and/or time slice duration for scheduling. ARINC_ERROR_NO_INTERVAL -- (ARINC) Attempt to start scheduling without a valid timeslice duration. ARINC_ERROR_NOT_TX -- (ARINC) Attempt to update data of a RX object. ARINC_ERROR_WRONG_TIMEFORMAT -- (ARINC) Attempt to choose another timeformat than other applications before (arincOpen()). Attempt to chose an IRIG-B mode, which is not compatible with chosen timeformat. ARINC_CAN_STATE_CHANGE -- (ARINC) CAN bus state transition has occurred (which is not necessarily an error condition) ARINC_CAN_ERROR -- (ARINC) A CAN error frame has occurred on bus ARINC_ERROR_INTERVAL_LOW -- (ARINC) Attempt to configure an timeslice duration equal or below 1ms

NOTES (ARINC) - These error codes are unique to ARINC825 support functions provided by this library and won't occurr with basic CAN functions

Whenever ARINC library makes use of functions provided by the underlying operating system, the respective system error codes are passed to the user. Since it is not always well documented, which error codes might be thrown in these cases, these codes might not always be documented below.

You can use arincFormatError() to get a string representation for the described errors.

Page 34 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.15 Errorformats [ Top ] [ Defines ] [ Definitions ]

NAME Special values to be used with the type parameter of arincFormatError()

DESCRIPTION ARINC_ERROR_FORMAT_LONG -- Choose verbose error string format ARINC_ERROR_FORMAT_SHORT -- Choose short error string format

SEE ALSO arincFormatError()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 35 of 106

Defines

4.16 Thread-Priority [ Top ] [ Defines ] [ Definitions ]

NAME Special values to be used with the priority parameters of arincScheduleStart()

DESCRIPTION ARINC_PRIO_HIGH -- Use a high priority for maximum accuracy of scheduling (this was the behaviour up to version 1.0.11 of ARINC library) ARINC_PRIO_INHERIT -- Inherit the priority of the calling application ARINC_PRIO_SET -- Set system dependent thread priorities as specified

SEE ALSO arincScheduleStart()

Page 36 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Defines

4.17 Error-Injection [ Top ] [ Defines ] [ Definitions ]

NAME Defines to be used in combination with error injection IOCTLs

DESCRIPTION Field "status" in CAN_EEI_STATUS structure: EEI_STATUS_OFF -- EEI unit is not activated EEI_STATUS_WAIT_TRIGGER -- EEI unit is waiting for trigger condition EEI_STATUS_SENDING -- EEI unit is currently transmitting a bit pattern EEI_STATUS_FINISHED -- EEI unit got triggered and has finished transmission

Field "mode_trigger" in CAN_EEI_UNIT structure: EEI_TRIGGER_MATCH -- EEI mode: Bit pattern matching EEI_TRIGGER_ARBITRATION -- EEI mode: CAN arbitration EEI_TRIGGER_TIMESTAMP -- EEI mode: Time triggered EEI_TRIGGER_FIELD_POSITION -- EEI mode: CAN frame field EEI_TRIGGER_EXTERNAL_INPUT -- EEI mode: Externally triggered

Field "mode_trigger_option" in CAN_EEI_UNIT structure: EEI_TRIGGER_ARBITRATION_OPTION_ABORT_ON_ERROR

-- Use in EEI_TRIGGER_ARBITRATION EEI_TRIGGER_MATCH_OPTION_DESTUFFED -- Use in EEI_TRIGGER_MATCH EEI_TRIGGER_TIMESTAMP_OPTION_BUSFREE -- Use in EEI_TRIGGER_TIMESTAMP

Fields "mode_triggerarm_delay" and "mode_triggeraction_delay" in CAN_EEI_UNIT structure: EEI_TRIGGERDELAY_NONE -- No delay EEI_TRIGGERDELAY_BITTIMES -- Delay specified in bittimes of selected baudrate

SEE ALSO CAN_EEI_UNIT CAN_EEI_STATUS arincIoctl()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 37 of 106

Datatypes

5. Datatypes [ Top ] [ Generics ]

DESCRIPTION Definitions of data types:

o ARINC_RESULT o ARINC_HANDLE o ARINC_ERROR_HANDLER o ARINC_GROUP o NTCAN_CMSG_T o NTCAN_EVMSG_CAN_ERROR o NTCAN_EVMSG_CAN_BAUD_CHANGE o NTCAN_EVMSG_CAN_ERROR_EXT o ARINC_CMSG_T o ARINC_STATUS o ARINC_ERROR o NTCAN_CSCHED o NTCAN_FRAMECOUNT o NTCAN_BUSSTATISTIC o NTCAN_CTRLSTATE o NTCAN_BITRATE_INFO o NTCAN_FORMAT_EVENT_PARAMS o CAN_BIT_STREAM o CAN_EEI_UNIT o CAN_EEI_STATUS

Page 38 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.1 ARINC_RESULT [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_RESULT -- Return type of all functions within this library

DESCRIPTION On success functions within this library return ARINC_SUCCESS, otherwise one of the error codes above ( Errorcodes ).

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 39 of 106

Datatypes

5.2 ARINC_HANDLE [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_HANDLE -- Handle to address a certain CAN bus

DESCRIPTION A handle needs to be created using arincOpen(). Every function within this library needs to be passed a valid handle. By this means the functions are connected to a certain physical CAN bus.

NOTES ARINC_HANDLES can be imagined as virtual CAN nodes. It is possible to open multiple handles and each handle might have its own parameter set. A handle can be shared by multiple threads, some restrictions need to be observed, see notes for arincRead() and arincWrite() (arincRead() and arincWrite()).

When a handle is no longer needed, it should be disposed using arincClose(), in order to free system ressources allocated by the handle.

Handles are parametrized with arincOpen().

SEE ALSO arincOpen() arincClose()

Page 40 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.3 ARINC_ERROR_HANDLER [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_ERROR_HANDLER -- Function pointer type for asynchronous error handler

DESCRIPTION A function of this type can be registered using arincErrorHandler(), in order to be asynchronously notified of any error.

SEE ALSO ARINC_ERROR arincErrorHandler()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 41 of 106

Datatypes

5.4 ARINC_GROUP [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_GROUP -- Type of ARINC groups

DESCRIPTION Use for group member of ARINC_CMSG_T struct Generally speaking, an ARINC group specifies the rate by which ARINC objects get repeated in (group+1) multiples of timeslice intervals. For example: Setting group to zero leads to objects within this group being transmitted every timeslice. Setting group to four leads to objects within this group being transmitted every fifth timeslice. There's one special group value: ARINC_GROUP_RX Using this as group value, defines the object as "receive only".

SEE ALSO ARINC_CMSG_T arincTxObjUpdate() arincPoll() arincObjAdd() arincObjDelete()

Page 42 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.5 NTCAN_CMSG_T [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_CMSG_T -- CAN message structure for use with basic CAN functions

DESCRIPTION Stores CAN frame data

SYNOPSIS struct _NTCAN_CMSG_T { INT32 id; UINT8 len; UINT8 msg_lost; UINT8 reserved[2]; UINT8 data[8]; UINT64 timestamp; }

ATTRIBUTES id -- CAN ID, defines priority on CAN bus, can be combined with CAN ID flags ( CAN-IDs ) len -- Number of data bytes contained within CAN frame (0..8) (actually it is possible to set values up to 15, this length will also be transmitted on CAN bus, but still there're no more than eight data bytes transmitted) (see CAN-Length for additional flags to be used with this field) msg_lost -- On reception the number of lost RX frames (if any) is returned here data -- Up to eight data bytes timestamp -- 64-Bit timestamp (frequency can be determined using arincIoctl()

SEE ALSO arincRead() arincTake() arincWrite() arincSend()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 43 of 106

Datatypes

5.6 NTCAN_EVMSG_CAN_ERROR [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_EVMSG_CAN_ERROR -- CAN event structure for CAN error events

DESCRIPTION This structure can be used to decode the data bytes of a CAN error event message.

SYNOPSIS struct _NTCAN_EVMSG_CAN_ERROR { UINT8 reserved1; UINT8 can_status; UINT8 reserved2; UINT8 ctrl_overrun; UINT8 reserved3; UINT8 fifo_overrun; }

ATTRIBUTES reserved1 -- Reserved for future use can_status -- Current status of CAN controller reserved2 -- Reserved for future use ctrl_overrun -- Number of CAN controller overrun errors reserved3 -- Reserved for future use fifo_overrun -- Number of times the driver/firmware FIFO was overrun

SEE ALSO CAN-errors NTCAN_EVMSG_CAN_BAUD_CHANGE NTCAN_EVMSG_CAN_ERROR_EXT arincRead() arincTake()

Page 44 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.7 NTCAN_EVMSG_CAN_BAUD_CHANGE [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_EVMSG_CAN_BAUD_CHANGE -- CAN event structure for CAN baudrate change events

DESCRIPTION This structure can be used to decode the data bytes of a CAN baudrate change event message.

SYNOPSIS struct _NTCAN_EVMSG_CAN_BAUD_CHANGE { UINT32 baud; UINT32 num_baud; }

ATTRIBUTES baud -- New NTCAN baudrate value num_baud -- New numerical baudrate value (Optional information, not delivered by every CAN hardware. Use length of event message to check, if information is present)

SEE ALSO NTCAN_EVMSG_CAN_ERROR NTCAN_EVMSG_CAN_ERROR_EXT arincRead() arincTake()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 45 of 106

Datatypes

5.8 NTCAN_EVMSG_CAN_ERROR_EXT [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_EVMSG_CAN_ERROR_EXT -- CAN event structure for CAN extended error events

DESCRIPTION This structure can be used to decode the data bytes of a CAN extended error event message.

NOTES This structure is heavily CAN controller type dependent. Use controller type to choose correct part of this union and check event message length to verify presence of all data.

SYNOPSIS union _NTCAN_EVMSG_CAN_ERROR_EXT { struct { UINT8 status; UINT8 ecc; UINT8 rec; UINT8 tec; } sja1000; struct { UINT8 status; UINT8 ecc; UINT8 rec; UINT8 tec; UINT8 txstatus; } esdacc; }

ATTRIBUTES status -- CAN controller status register (content depends on CAN controller type) ecc -- Error code capture register (stores detailed information about last error) rec -- CAN RX error counter tec -- CAN TX error counter txstatus -- CAN controller TX status register (content depends on CAN controller type, currently available with ESDACC controller, only)

SEE ALSO CAN-errors NTCAN_EVMSG_CAN_ERROR NTCAN_EVMSG_CAN_BAUD_CHANGE arincRead() arincTake()

Page 46 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.9 ARINC_CMSG_T [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_CMSG_T -- CAN object structure for use with ARINC functions

DESCRIPTION Stores ARINC and CAN frame data

SYNOPSIS struct _ARINC_CMSG_T { INT32 id; UINT8 len; UINT8 msg_lost; UINT8 reserved[2]; UINT8 data[8]; UINT64 timestamp; ARINC_GROUP group; INT32 m; INT32 n; INT32 countTx; INT32 countRx; }

ATTRIBUTES id -- CAN ID, defines priority on CAN bus, can be combined with CAN ID flags (see CAN-IDs ) len -- Number of data bytes contained within CAN frame (0..8) (see CAN-Length for additional flags to be used with this field) msg_lost -- On reception the number of lost RX frames (if any) is returned here data -- Up to eight data bytes timestamp -- 64-Bit timestamp (frequency can be determined using arincIoctl())

Additional ARINC information: group -- ARINC group, see ARINC_GROUP m -- ARINC column, it's the m'th object within it's group (this needs to be unigue for a given "group-n" combination) n -- ARINC slice index, for groups > 0 the object is located in the n'th timeslice countTx -- Number of times this object was transmitted Positive values: The last n times the object was transmitted successfully Negative values: n failures to send this object countRx -- Number of times this object was received

NOTES It is advised to evaluate countTx on ARINC TX objects and countRx on RX objects. Although both counters are kept up to date for both types of objects and a comparison might be used to reveal certain error conditions, one needs to take a possible deviance of one into account. This effect is caused by the fact, that transmission and reception of the transmitted frame do not happen simultaneously, reception always follows transmission. Although it would be technically possible to synchronize both events and atomically increment both counters at the same time, the performance impact

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 47 of 106

Datatypes of a rather long locked path would be drastic. Another workaround would be incrementing the RX counter on the event of successful transmission. Since this would forego the chance of an extra step of verification, the deviation of both counters is deliberately accepted. Nevertheless if everything works correctly both counters shouldn't differ by any more than one frame.

SEE ALSO arincPoll() arincTxObjUpdate() arincObjAdd() arincObjDelete()

Page 48 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.10 ARINC_STATUS [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_STATUS -- Status structure for use with arincStatus()

DESCRIPTION Stores version-, status- and error information.

SYNOPSIS struct _ARINC_STATUS { UINT16 hardware; UINT16 firmware; UINT16 driver; UINT16 dll; UINT32 boardstatus; UINT8 boardid[14]; UINT16 features; UINT16 dllarinc; UINT16 reserved; UINT64 time; UINT32 rxCount; UINT64 rxLastTime; UINT32 txCount; UINT64 txLastTime; UINT32 errorCount; INT32 errorLast; UINT64 errorLastTime; UINT32 errorCode; UINT64 errorCodeTime; UINT32 irigBStatus; UINT8 canStatus; UINT8 canErrorCountRx; UINT8 canErrorCountTx; UINT8 reserved2; UINT32 errorLostFrames; }

ATTRIBUTES hardware -- Hardware version of CAN hardware firmware -- Firmware version of CAN hardware (if applicable) driver -- CAN driver version dll -- CAN API library version boardstatus -- Overall status of CAN hardware Most significant byte contains type of CAN controller (s. Bitrate-Controller) boardid -- 14 byte long string containing the name of the CAN hardware features -- 16-Bit wide flag field, specifying features supported by CAN hardware dllarinc -- Version of this library reserved -- Reserved for future use, aligns structure time -- Current time rxCount -- (*) Number of ARINC objects received on a certain handle/CAN bus (including the ones send by this node itself) rxLastTime -- (*) Time of last reception txCount -- (*) Number of ARINC objects transmitted on a certain handle/CAN bus

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 49 of 106

Datatypes txLastTime -- (*) Time of last transmission errorCount -- (*) Overall number of errors on a certain handle/CAN bus errorLast -- (*) The last error, which occurred (see Errorcodes ) (Note: These are not necessarily CAN bus errors) errorLastTime -- (*) Approximated time of last error errorCode -- (*) Detailed info on the last CAN bus error errorCodeTime -- (*) Time of last CAN bus error irigBStatus -- Status of IRIG-B module (same as status parameter in arincTimeGet()) canStatus -- Status of CAN bus (s. Status-Busstates) canErrorCountRx -- CAN RX error counter (s. "Rules of error confinement" in chapter 13.1.4 of ISO 11898-1) canErrorCountTx -- CAN TX error counter (s. "Rules of error confinement" in chapter 13.1.4 of ISO 11898-1) reserved2 -- Reserved for future use, aligns structure errorLostFrames -- (*) Frames lost by either CAN controller or CAN driver

NOTES (*) - Special ARINC status-/error information. These fields can be reset to zero using arincStatusReset()

Version information (hardware, firmware, driver, dll, dllarinc) is returned in the following format: 0xXYZZ with 0xX = major version, 0xY = minor version and 0xZZ = change level A format string to print version info for example could look like this: ("%d.%d.%d", (v >> 12), ((v & 0x0F00) >> 8), (v & 0x00FF))

SEE ALSO CAN-errors arincStatus() arincStatusReset()

Page 50 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.11 ARINC_ERROR [ Top ] [ Datatypes ] [ Types ]

NAME ARINC_ERROR -- Error structure passed as an argument to an error handler

DESCRIPTION If the user connects an error handler function, this will be called asynchronously on occurrance of an error. The argument of this handler points to a ARINC_ERROR structure, which contains more details on the type and the circumstances of the error.

SYNOPSIS struct _ARINC_ERROR { void *userParam; UINT32 rxCount; UINT64 rxLastTime; UINT32 txCount; UINT64 txLastTime; UINT32 errorCount; INT32 errorLast; UINT64 errorLastTime; UINT32 errorCode; UINT64 errorCodeTime; UINT32 irigBStatus; UINT8 canStatus; UINT8 canErrorCountRx; UINT8 canErrorCountTx; UINT8 reserved; UINT32 errorLostFrames; }

ATTRIBUTES userParam -- When registering an error handler, the user might specify a pointer, which is passed to the error handler without modification. This is meant to provide the user with the possibility to pass any kind of data to the error handler (e.g. some means to synchronize the eror handler with the rest of his application). rxCount -- Number of ARINC objects received on a certain handle/CAN bus (including the ones send by this node itself) rxLastTime -- Time of last reception txCount -- Number of ARINC objects transmitted on a certain handle/CAN bus txLastTime -- Time of last transmission errorCount -- Overall number of errors on a certain handle/CAN bus errorLast -- The last error, which occurred (see Errorcodes ) (Note: These are not necessarily CAN bus errors) errorLastTime -- Approximated time of last error errorCode -- Detailed info on the last CAN bus error errorCodeTime -- Time of last CAN bus error irigBStatus -- Status of IRIG-B module (same as status parameter in arincTimeGet()) canStatus -- Status of CAN bus (s. Status-Busstates) canErrorCountRx -- CAN RX error counter (s. "Rules of error confinement" in chapter 13.1.4 of ISO 11898-1)

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 51 of 106

Datatypes canErrorCountTx -- CAN TX error counter (s. "Rules of error confinement" in chapter 13.1.4 of ISO 11898-1) reserved -- Reserved for future use, aligns structure errorLostFrames -- Frames lost by either CAN controller or CAN driver

SEE ALSO ARINC_ERROR_HANDLER arincErrorHandler()

Page 52 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.12 NTCAN_CSCHED [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_CSCHED -- Structure passed as an argument to arincIoctl(ARINC_IOCTL_TX_OBJ_SCHEDULE)

DESCRIPTION This structure is used to schedule TX objects. The objects need to be created first (arincIoctl(ARINC_IOCTL_TX_OBJ_CREATE)) and are referenced by their CAN ID.

SYNOPSIS struct _NTCAN_CSCHED { INT32 id; INT32 flags; UINT64 time_start; UINT64 time_interval; UINT32 count_start; UINT32 count_stop; }

ATTRIBUTES id - CAN ID of the TX object flags - Configure special object properties (e.g. automatic counters in CAN data), s. ARINC_TXSCHED_FLAG time_start - Timestamp, when the TX object will be transmitted for the first time time_interval - If equal zero, the TX object willl be sent once, only (at time_start). Otherwise the TX object will be transmitted cyclically with this interval. count_start - If there's a counter configured for the object (via flags), this is the initial value. count_stop - If there's a counter configured for the object (via flags), this is the maximum value. After this value has been reached, the counter will be reset to count_start.

SEE ALSO IOCTLs arincIoctl(ARINC_IOCTL_TX_OBJ_SCHEDULE)

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 53 of 106

Datatypes

5.13 NTCAN_FRAMECOUNT [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_FRAMECOUNT -- Structure returned within result from arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC)

DESCRIPTION When arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC) is used, this structure is contained within the returned NTCAN_BUSSTATISTIC structure and delivers information about the number and type of CAN messages received or transmitted.

SYNOPSIS struct _NTCAN_FRAMECOUNT { UINT32 std_data; UINT32 std_rtr; UINT32 ext_data; UINT32 ext_rtr; }

ATTRIBUTES std_data - Number of standard CAN messages (20a, 11-Bit CAN ID) std_rtr - Number of standard RTR requests (20a, 11-Bit CAN ID) ext_data - Number of extended CAN messages (20b, 29-Bit CAN ID) ext_rtr - Number of extended RTR requests (20b, 29-Bit CAN ID)

SEE ALSO IOCTLs NTCAN_BUSSTATISTIC arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC)

Page 54 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.14 NTCAN_BUSSTATISTIC [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_BUSSTATISTIC -- Structure returned from arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC)

DESCRIPTION By means of this structure and arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC) it is possible to obtain statistical data about a CAN bus. For example this can be used to calculate bus load.

SYNOPSIS struct _NTCAN_BUSSTATISTIC { UINT64 timestamp; NTCAN_FRAMECOUNT rcv_count; NTCAN_FRAMECOUNT xmit_count; UINT32 ctrl_ovr; UINT32 fifo_ovr; UINT32 err_frames; UINT32 rcv_byte_count; UINT32 xmit_byte_count; UINT32 aborted_frames; UINT32 reserved[2]; UINT64 bit_count; }

ATTRIBUTES timestamp - Timestamp rcv_count - Number of received CAN frames xmit_count - Number of transmitted CAN frames ctrl_ovr - Number of controller overrun errors fifo_ovr - Number of FIFO overflow errors err_frames - Number of error frames on CAN bus rcv_byte_count - Number of received data bytes xmit_byte_count - Number of transmitted data bytes aborted_frames - Number of TX frames aborted before actual TX bit_count - Number of bits received from CAN bus

SEE ALSO IOCTLs arincIoctl(ARINC_IOCTL_GET_BUS_STATISTIC)

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 55 of 106

Datatypes

5.15 NTCAN_CTRLSTATE [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_CTRLSTATE -- Structure returned from arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS)

DESCRIPTION When returned from arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS), the structure contains information about the current CAN controller state

SYNOPSIS struct _NTCAN_CTRLSTATE { UINT8 rcv_err_counter; UINT8 xmit_err_counter; UINT8 status; UINT8 type; }

ATTRIBUTES rcv_err_counter - Receive error counter xmit_err_counter - Transmit error counter status - CAN controller status type - CAN controller type (s. Bitrate-Controller)

SEE ALSO Bitrate-Controller IOCTLs arincIoctl(ARINC_IOCTL_GET_CTRL_STATUS)

Page 56 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.16 NTCAN_BITRATE_INFO [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_BITRATE_INFO -- Structure returned from arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS)

DESCRIPTION When returned from arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS), the structure contains detailed information on the currently configured baudrate

SYNOPSIS struct _NTCAN_BITRATE_INFO { UINT32 baud; UINT32 valid; UINT32 rate; UINT32 clock; UINT8 ctrl_type; UINT8 tq_pre_sp; UINT8 tq_post_sp; UINT8 sjw; UINT32 error; UINT32 flags; UINT32 reserved[3]; }

ATTRIBUTES baud - Value configured by user via arincBaudrateSet() valid - Validity of the _following_ information ARINC_SUCCESS = information is valid -1 = information is currently invalid NTCAN_NOT_IMPLEMENTED = information is invalid, because driver doesn't support it rate - CAN bitrate in Bit/s clock - Frequency of CAN controller (needed to program BTRs directly) ctrl_type - CAN controller in use (see Bitrate-Controller) tq_pre_sp - Number of time quantas before samplepoint (TSEG1) tq_post_sp - Number of time quantas past samplepoint (TSEG2) sjw - Syncronization jump width in time quantas (SJW) error - Actual deviation of configured baudrate in (% * 100) flags - Baudrate flags (possibly controller specific, e.g. triple sampling bit, see Bitrate-Flags)

SEE ALSO Bitrate-Controller Bitrate-Flags IOCTLs arincIoctl(ARINC_IOCTL_GET_BITRATE_DETAILS)

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 57 of 106

Datatypes

5.17 NTCAN_FORMAT_EVENT_PARAMS [ Top ] [ Datatypes ] [ Types ]

NAME NTCAN_FORMAT_EVENT_PARAMS -- Structure to be used with arincFormatEvent()

DESCRIPTION The function arincFormatEvent() can be used to decode CAN event messages into a string representation. This structure is used to parametrize the decoding function. NOTE Not all parts of this structure have to be filled. This depends on the event message and information you want to have decoded. See notes below.

SYNOPSIS struct _NTCAN_FORMAT_EVENT_PARAMS { UINT64 timestamp; UINT64 timestamp_freq; UINT32 num_baudrate; UINT32 flags; UINT64 busload_oldts; UINT64 busload_oldbits; UINT8 ctrl_type; UINT8 reserved[7]; UINT32 reserved2[4]; }

ATTRIBUTES timestamp - Timestamp of event (needed for busload calculation) timestamp_freq - Frequency of timestamps (needed for busload calculation) num_baudrate - Numerical value of baudrate in kBit/s flags - For future extensions busload_oldts - Internally used, set to zero on first call and keep value on later calls (needed for busload calculation) busload_oldbits - Internally used, set to zero on first call and keep value on later calls (needed for busload calculation) ctrl_type - Type of CAN controller (needed for decoding extended error information) reserved - reserved for future use, set to zero reserved2 - reserved for future use, set to zero

SEE ALSO arincFormatEvent()

Page 58 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes

5.18 CAN_BIT_STREAM [ Top ] [ Datatypes ] [ Types ]

NAME CAN_BIT_STREAM -- Union to work with CAN bitstreams

DESCRIPTION A simple union to ease the work with CAN bitsteams, as it's needed, if you want to make use of error injection feature.

SYNOPSIS union _CAN_BIT_STREAM { UINT8 c[20]; UINT16 s[10]; UINT32 l[5]; };

ATTRIBUTES c - Access bitstream 8-Bit-wise (_b_yte) s - Access bitstream 16-Bit-wise (_s_hort) l - Access bitstream 32-Bit-wise (_l_ong)

SEE ALSO arincIoctl() Defines/Error-Injection

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 59 of 106

Datatypes

5.19 CAN_EEI_UNIT [ Top ] [ Datatypes ] [ Types ]

NAME CAN_EEI_UNIT -- Structure to configure an error injection unit

DESCRIPTION Use this structure in combination with arincIoctl(ARINC_IOCTL_EEI_CONFIGURE) to set up an error injection unit.

SYNOPSIS struct _CAN_EEI_UNIT { UINT32 handle; UINT8 mode_trigger; UINT8 mode_trigger_option; UINT8 mode_triggerarm_delay; UINT8 mode_triggeraction_delay; UINT8 mode_repeat; UINT8 mode_trigger_now; UINT8 mode_ext_trigger_option; UINT8 mode_send_async; UINT8 reserved1[4]; UINT64 timestamp_send; CAN_BIT_STREAM trigger_pattern; CAN_BIT_STREAM trigger_mask; UINT8 trigger_ecc; UINT8 reserved2[3]; UINT32 external_trigger_mask; UINT32 reserved3[16]; CAN_BIT_STREAM tx_pattern; UINT32 tx_pattern_len; UINT32 triggerarm_delay; UINT32 triggeraction_delay; UINT32 reserved4[16]; }

ATTRIBUTES handle - Handle for ErrorInjection Unit mode_trigger - Trigger mode mode_trigger_option - Options to trigger mode_triggerarm_delay - Enable delayed arming of trigger unit mode_triggeraction_delay - Enable delayed TX out mode_repeat - Enable repeat mode_trigger_now - Trigger with next TX point mode_ext_trigger_option - Switch between trigger and sending mode_send_async - Send without timing synchronization reserved1[4] - reserved for future use, set to zero timestamp_send - Timestamp for Trigger Timestamp trigger_pattern - Trigger for mode Pattern Match trigger_mask - Mask to trigger Pattern trigger_ecc - ECC for Trigger Field Position reserved2[3] - reserved for future use, set to zero external_trigger_mask; - Enable Mask for external Trigger reserved3[16] - reserved for future use, set to zero tx_pattern; - TX pattern tx_pattern_len; - Length of TX pattern triggerarm_delay; - Delay for mode triggerarm delay triggeraction_delay; - Delay for mode trigger delay

Page 60 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Datatypes reserved4[16] - reserved for future use, set to zero

SEE ALSO arincIoctl(ARINC_IOCTL_EEI_CONFIGURE) Defines/Error-Injection

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 61 of 106

Datatypes

5.20 CAN_EEI_STATUS [ Top ] [ Datatypes ] [ Types ]

NAME CAN_EEI_STATUS -- Structure to retrieve the status of an error injection unit

DESCRIPTION Use this structure in combination with arincIoctl(ARINC_IOCTL_EEI_STATUS) to retrieve the status of an error injection unit.

SYNOPSIS struct _CAN_EEI_STATUS { UINT32 handle; UINT8 status; UINT8 unit_index; UINT8 units_total; UINT8 units_free; UINT32 reserved[30]; };

ATTRIBUTES handle - Handle for ErrorInjection Unit status - Status form Unit unit_index - Error Injection Unit ID units_total - Max Error Units in esdacc core units_free - Free Error Units in esdacc core reserved[30] - reserved for future use, set to zero

SEE ALSO arincIoctl(ARINC_IOCTL_EEI_STATUS) Defines/Error-Injection

Page 62 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Macros

6. Macros [ Top ] [ Generics ]

DESCRIPTION Some helpful macros and constants

Boardstatus o ARINC_GET_CTRL_TYPE o ARINC_GET_BOARD_STATUS Timeconstants o SEC_PER_MIN o SEC_PER_HOUR o SEC_PER_DAY Timemasks o AIM_MASKHIGH_SEC1 o AIM_MASKHIGH_MIN1 o AIM_MASKHIGH_HOUR o AIM_MASKHIGH_DAY o AIM_MASKLOW_USEC o AIM_MASKLOW_SEC2 o AIM_MASKLOW_MIN2 Timemacros o AIM_SEC1() o AIM_MIN1() o AIM_HOUR() o AIM_DAY() o AIM_USEC() o AIM_SEC2() o AIM_MIN2() o AIM_SMHD2AIM_HIGH() o AIM_USM2AIM_LOW() o AIM_USMHD2AIM() o AIM_AIM2USMHD() o AIM_TDIFF2AIM() o AIM_AIM2TDIFF() o AIM_ADD() - Add two times in AIM format

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 63 of 106

Macros

6.1 Boardstatus [ Top ] [ Macros ] [ Generics ]

DESCRIPTION Macros to evaluate boardstatus as its returned from arincStatus()

Boardstatus o ARINC_GET_CTRL_TYPE - Extract controller type from boardstatus o ARINC_GET_BOARD_STATUS - Extract board status from boardstatus

SEE ALSO ARINC_STATUS arincStatus()

Page 64 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Macros

6.2 Timeconstants [ Top ] [ Macros ] [ Generics ]

DESCRIPTION Constants that might be helpfull, when calculating with time

Timeconstants o SEC_PER_MIN - Number of seconds within one minute o SEC_PER_HOUR - Number of seconds within one hour o SEC_PER_DAY - Number of seconds within one day

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 65 of 106

Macros

6.3 Timemasks [ Top ] [ Macros ] [ Generics ]

DESCRIPTION Masks to separate certain parts, when using AIM time format.

Timemasks o AIM_MASKHIGH_SEC1 - Mask seconds from the upper 32-Bit o AIM_MASKHIGH_MIN1 - Mask minutes from the upper 32-Bit o AIM_MASKHIGH_HOUR - Mask hours from the upper 32-Bit o AIM_MASKHIGH_DAY - Mask days from the upper 32-Bit o AIM_MASKLOW_USEC - Mask microseconds from the lower 32-Bit o AIM_MASKLOW_SEC2 - Mask seconds from the lower 32-Bit o AIM_MASKLOW_MIN2 - Mask minutes from the lower 32-Bit

NOTES These masks work on 32-Bit, only. Lower and upper 32-Bit of the 64-Bit timevalue need to be separated first.

Page 66 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Macros

6.4 Timemacros [ Top ] [ Macros ] [ Generics ]

DESCRIPTION Macros to easily access certain parts, when working with AIM time format.

Timemacros o AIM_SEC1() - Retrieve seconds from the upper 32-Bit o AIM_MIN1() - Retrieve minutes from the upper 32-Bit o AIM_HOUR() - Retrieve hours from the upper 32-Bit o AIM_DAY() - Retrieve days from the upper 32-Bit o AIM_USEC() - Retrieve microseconds from the lower 32-Bit o AIM_SEC2() - Retrieve seconds from the lower 32-Bit o AIM_MIN2() - Retrieve minutes from the lower 32-Bit o AIM_SMHD2AIM_HIGH() - Merge upper word of AIM format from seconds, minutes, hours and days o AIM_USM2AIM_LOW() - Merge lower word of AIM format from microseconds, seconds and minutes o AIM_USMHD2AIM() - Merge all parts into time in AIM format (64-bit) o AIM_AIM2USMHD() - Retrieve all parts of time in AIM format (64-bit) o AIM_TDIFF2AIM() - Converts a time difference from default time format AIM time format (64-bit) NOTE: works only, if "tdiff < one year"! o AIM_AIM2TDIFF() - Converts time difference in AIM format into a time difference in standard format (64-bit) o AIM_ADD() - Add two times in AIM format o AIM_SUB() - Subtract one time from another in AIM format

NOTES These macros work on 32-Bit, only. Lower and upper 32-Bit of the 64-Bit timevalue need to be separated first.

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 67 of 106

Functions

7. Functions [ Top ] [ Generics ]

DESCRIPTION Library function descriptions

General-Functions o arincOpen() o arincClose() o arincBaudrateSet() o arincBaudrateGet() o arincIoctl() o arincStatus() o arincStatusReset() o arincCanErrorCounterReset() o arincFormatError() o arincFormatEvent() o arincFileDescriptorGet() ARINC-Functions o arincErrorHandler() o arincIrigBConfigSet() o arincIrigBConfigGet() o arincTimeSet() o arincTimeGet() o arincIntervalSet() o arincIntervalGet() o arincScheduleStart() o arincScheduleStop() o arincPoll() o arincTxObjUpdate() o arincTxObjDisable() o arincWaitForTimeslot() o arincObjAdd() o arincObjDelete() CAN-Functions o arincRxIdAdd() o arincRxIdDelete() o arincRead() o arincTake() o arincWrite() o arincSend()

Page 68 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.1 General-Functions [ Top ] [ Functions ] [ Generics ]

DESCRIPTION General functions, which are used in conjunction with the special ARINC825 support functions and in conjunction with the basic CAN function.

General-Functions o arincOpen() o arincClose() o arincBaudrateSet() o arincBaudrateGet() o arincIoctl() o arincStatus() o arincStatusReset() o arincCanErrorCounterReset() o arincFormatError() o arincFormatEvent() o arincFileDescriptorGet()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 69 of 106

Functions

7.1.1 arincOpen [ Top ] [ General-Functions ] [ Functions ]

NAME arincOpen

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincOpen(INT32 net, UINT32 mode, INT32 fifoSizeRx, INT32 fifoSizeTx, INT32 timeoutRx, INT32 timeoutTx, UINT32 numObjectsRx, INT32 numObjectsTx, ARINC_HANDLE *pHnd)

FUNCTION Opens a handle to access a certain CAN bus. Several parameters can be specified in order to tailor the functionality of the handle to special needs.

NOTES By means of the mode parameter, the time format for ARINC-Functions can be changed. This is a host wide decision!!! The first handle determines the timeformat all following applications/handles will have to choose (ARINC_ERROR_WRONG_TIMEFORMAT).

PARAMETERS net -- IN: The net number assigned to the desired CAN bus. mode -- IN: Flags to open the handle in certain modes. See ARINC_MODE_-flags above. fifoSizeRx -- IN: Specifies the desired size of the handles reception FIFO. This parameter influences CAN-Functions (arincRead() and arincTake()), only. In order to use queues of maximum size, please use Handle-Queuesize defines. fifoSizeTx -- IN: Specifies the desired size of the handles transmission FIFO. This parameter influences CAN-Functions (arincWrite() and arincSend()), only. In order to use queues of maximum size, please use Handle-Queuesize defines. timeoutRx -- IN: Sets the timeout for arincRead()-calls in milliseconds (regardless of chosen timeformat) Note for ARINC functions: Any timeouts internally needed for ARINC protocol will be automatically set in accordance to configured timeslice duration. timeoutTx -- IN: Sets the timeout for arincWrite()-calls in milliseconds (regardless of chosen timeformat) Note for ARINC functions: Any timeouts internally needed for ARINC protocol will be automatically set in accordance to configured timeslice duration. numObjectsRx -- IN: ARINC only: Currently not in use, set zero. Might get removed... numObjectsTx -- IN: ARINC only: Currently not in use, set zero. Might get removed... pHnd -- OUT:Page 70 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions Points to a ARINC_HANDLE variable, which will be used to store the newly created handle.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_PARAMETER - pHnd is null or one of the other parameters out of range. ARINC_INSUFFICIENT_RESOURCES - Not enough memory to allocate all ressources needed for the new handle. ARINC_NET_NOT_FOUND - The specified net wasn't found. ARINC_ERROR_WRONG_TIMEFORMAT - Another handle was opened with another timeformat before.

SEE ALSO arincClose() For some more notes on handles, have a look at ARINC_HANDLE.

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 71 of 106

Functions

7.1.2 arincClose [ Top ] [ General-Functions ] [ Functions ]

NAME arincClose

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincClose(ARINC_HANDLE hnd)

FUNCTION Closes a handle, which was previously opened by arincOpen(). All resources allocated by this handle will be freed, ARINC objects will be deleted.

NOTES A baudrate configured with this handle by using arincBaudrateSet(), won't be reset on arincClose(). This has to be done explicitly using arincBaudrateSet().

PARAMETERS hnd -- IN: The handle, that needs to be closed.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used.

SEE ALSO arincOpen()

Page 72 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.1.3 arincBaudrateSet [ Top ] [ General-Functions ] [ Functions ]

NAME arincBaudrateSet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincBaudrateSet(ARINC_HANDLE hnd, UINT32 baud)

FUNCTION Configures the baudrate for the CAN bus belonging to the given handle. Several defines can be used (s. ARINC_BAUD_-defines above) in order to ease configuration of a certain baudrate.

NOTES Baudrate obviously is an attribute of the underlying CAN node and not of the handle itself. In order to have other handles asynchronously notified about the change in baudrate, one can make use of the "baudrate change event". This is enabled using arincRxIdAdd() and can afterwards be received using arincRead() or arincTake().

PARAMETERS hnd -- IN: A valid handle which is associated with the CAN bus, which needs to be reconfigured. baud -- IN: The desired baudrate. It can be set in many ways (e.g. using indeces for predefined baudrates, specifying baudrates numerically or programming the BTRs of the CAN controller directly), please see ARINC_BAUD_-defines above.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle or baudrate was used.

SEE ALSO CAN-Baudrate arincBaudrateGet()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 73 of 106

Functions

7.1.4 arincBaudrateGet [ Top ] [ General-Functions ] [ Functions ]

NAME arincBaudrateGet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincBaudrateGet(ARINC_HANDLE hnd, UINT32 *pBaud)

FUNCTION Returns the baudrate configured for the CAN bus associated with the given handle.

NOTES The baudrate is returned in the same format as it was formerly set by arincBaudrateSet(). Since baudrate is an attribute of the underlying CAN node and not of the handle itself, this function can be used to synchronously detect changes of the baudrate of the CAN bus.

PARAMETERS hnd -- IN: A valid handle, which is associated with the CAN bus in question. pBaud -- OUT: The baudrate is returned within the variable pointed to by pBaud.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle. ARINC_INVALID_PARAMETER - An invalid baudrate was used.

SEE ALSO CAN-Baudrate arincBaudrateSet()

Page 74 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.1.5 arincIoctl [ Top ] [ General-Functions ] [ Functions ]

NAME arincIoctl

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincIoctl(ARINC_HANDLE hnd, UINT32 cmd, void *pArg)

FUNCTION arincIoctl() can be used for a variety of less commonly used functions. The actual function is selected by cmd parameter, its parameters are passed via pArg pointer.

NOTES The data type addressed by pArg depends heavily on the selected command. Please see command documentation (IOCTLs).

PARAMETERS hnd -- IN: A valid handle. cmd -- IN: Selects the function to be executed. pArg -- IN/OUT: Depending on the selected function (cmd parameter) this argument needs to point to the appropriate data structure. Data direction also depends on cmd, either data has to be provided or is returned at the specified address.

COMMANDS

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle. ARINC_INVALID_PARAMETER - An invalid command was used or pArg was null, although the selected command needs or provides data. ARINC_NOT_IMPLEMENTED - The specified command is not implemented for the underlying CAN hardware. This can be the case if new functions are used with an old driver version. ARINC_NOT_SUPPORTED - The specified command is not supported by the underlying CAN hardware. Not every functionality can be realized with every hardware. The function is impossible to use with the given hardware.

SEE ALSO IOCTLs

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 75 of 106

Functions

7.1.6 arincStatus [ Top ] [ General-Functions ] [ Functions ]

NAME arincStatus

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincStatus(ARINC_HANDLE hnd, ARINC_STATUS *pStatus)

FUNCTION Returns information about the current state of the CAN bus, software versions and special ARINC information (e.g. last error and time of occurrence).

PARAMETERS hnd -- IN: A valid handle, which is associated with the CAN bus in question. pStatus -- OUT: A pointer to a ARINC_STATUS structure, which will be filled with status information.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle. ARINC_INVALID_PARAMETER - pStatus is null.

SEE ALSO CAN-errors ARINC_STATUS arincStatusReset()

Page 76 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.1.7 arincStatusReset [ Top ] [ General-Functions ] [ Functions ]

NAME arincStatusReset

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincStatusReset(ARINC_HANDLE hnd)

FUNCTION All dynamic status information stored within ARINC_STATUS structure is reset (s. ARINC_STATUS description, fields are marked with (*)).

PARAMETERS hnd -- IN: A valid handle, which is associated with the CAN bus in question.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle.

SEE ALSO ARINC_STATUS arincStatus()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 77 of 106

Functions

7.1.8 arincCanErrorCounterReset [ Top ] [ General-Functions ] [ Functions ]

NAME arincCanErrorCounterReset

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincCanErrorCounterReset(ARINC_HANDLE hnd)

FUNCTION By means of this functions CAN TX and RX error counters can be reset.

NOTES For this function to work, the baudrate of the CAN node needs be reset, otherwise ARINC_WRONG_DEVICE_STATE is returned.

This function is not meant to be used to cure error conditions (and it won't work in that way anyway). It is rather meant to return the CAN controller into a defined default state (mainly meant for analyzer applications). If you don't know, how CAN error states and/or CAN error counters work, this function is NOT the one you're looking for!

Wrong usage of this function can lead to your device violationg the CAN specifiations!

PARAMETERS hnd -- IN: A valid handle, which is associated with the CAN bus in question.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle. ARINC_WRONG_DEVICE_STATE - There's a baurate configured for the given CAN node. Please use arincBaudrateSet(ARINC_NO_BAUDRATE) in advance.

SEE ALSO CAN-errors ARINC_STATUS arincStatus() arincBaudrateSet()

Page 78 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.1.9 arincFormatError [ Top ] [ General-Functions ] [ Functions ]

NAME arincFormatError

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincFormatError(ARINC_RESULT error, UINT32 type, char *pBuf, UINT32 bufsize)

FUNCTION Returns a string representation of the given error code.

PARAMETERS error -- IN: An error code returned by any of the functions contained in this library. type -- IN: Select between two string representations, a rather short one and a verbose one (Errorformats). pBuf -- IN/OUT: A pointer to a buffer, where the string is copied to. Note: If the buffer is too small, the string might get truncated. bufsize -- IN: Size of the target buffer.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_PARAMETER - pBuf is null, bufsize is zero or type is no known output type.

SEE ALSO Errorformats arincFormatEvent()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 79 of 106

Functions

7.1.10 arincFormatEvent [ Top ] [ General-Functions ] [ Functions ]

NAME arincFormatEvent

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincFormatEvent(NTCAN_CMSG_T *pEvent, NTCAN_FORMAT_EVENT_PARAMS *pPara, char *pBuf, UINT32 bufsize)

FUNCTION Returns a string representation of the given CAN event message.

PARAMETERS event -- IN: Pointer to the CMSG (actually event message), which needs to be decoded para -- IN: Parameter structure providing information needed depending on type of event message. pBuf -- IN/OUT: A pointer to a buffer, where the string is copied to. Note: If the buffer is too small, the string might get truncated. bufsize -- IN: Size of the target buffer.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_PARAMETER - pEvent, pPara, pBuf is null or bufsize is zero.

SEE ALSO CAN-errors NTCAN_FORMAT_EVENT_PARAMS arincFormatError()

Page 80 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.1.11 arincFileDescriptorGet [ Top ] [ General-Functions ] [ Functions ]

NAME arincFileDescriptorGet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincFileDescriptorGet(ARINC_HANDLE hnd, int *pFd)

FUNCTION Returns the operating systems filedescriptor belonging to the given ARINC handle.

PARAMETERS hnd -- IN: A valid ARINC handle to retrieve the filedesriptor for. pFd -- OUT: Points to an int variable, which will be used to store the filedescriptor.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle. ARINC_INVALID_PARAMETER - pFd is null

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 81 of 106

Functions

7.2 ARINC-Functions [ Top ] [ Functions ] [ Generics ]

DESCRIPTION Description of special ARINC825 support functions. By means of these functions one can define a ARINC825 schedule table, have the frames cyclically transmitted on CAN bus, keep data within this table up to date and poll ARINC825 objects for their content.

ARINC-Functions o arincErrorHandler() o arincIrigBConfigSet() o arincIrigBConfigGet() o arincTimeSet() o arincTimeGet() o arincIntervalSet() o arincIntervalGet() o arincScheduleStart() o arincScheduleStop() o arincPoll() o arincTxObjUpdate() o arincWaitForTimeslot() o arincObjAdd() o arincObjDelete()

Page 82 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.1 arincErrorHandler [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincErrorHandler

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincErrorHandler(ARINC_HANDLE hnd, ARINC_ERROR_HANDLER pCallback, void *pParam, ARINC_RESULT errorCode)

FUNCTION This function can be used to register a error handler function, which will be called asynchronously on occurrence of certain error conditions in combination with ARINC scheduling.

NOTES You can specify only one single error handler per ARINC_HANDLE. The handler will only be triggered for the error codes listed below: - ARINC_CAN_STATE_CHANGE - ARINC_CAN_ERROR

For the error handler to work, scheduling needs to be started on the same handle. If you're using the basic CAN-Functions only, this error handler won't work for you. In such case, it's better to receive the relevant NTCAN_EVMSGs directly.

PARAMETERS hnd -- IN: A valid handle. pCallback -- IN: Function pointer of type ARINC_ERROR_HANDLER. Set to NULL to disable error handler. pParam -- IN: A pointer size argument, which will be passed as user parameter together with other error information in ARINC_ERROR structure to the error handler. errorCode -- IN: Specify an error code, you want the handler to be called for (to be chosen from the list of supported codes above). Set to zero, in oder to have it called for all supported calls.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle.

SEE ALSO CAN-errors ARINC_ERROR_HANDLER ARINC_ERROR

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 83 of 106

Functions

7.2.2 arincIrigBConfigSet [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincIrigBConfigSet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincIrigBConfigSet(ARINC_HANDLE hnd, UINT32 mode)

FUNCTION Configure the IRIG-B module.

NOTES Modes, which implicate year infortaion can't be chosen, when AIM timeformat was chosen (ARINC_ERROR_WRONG_TIMEFORMAT). Wouldn't make sense anyway, since nobody would be able to retrieve year information.

This function can not be called, while scheduling is in progress, in such case call arincScheduleStop() first.

Since the IRIG-B hardware is reconfigured and reinitialized (supposing the new configuration differs from the one previously used), it will have to resynchronize on IRIG-B afterwards. Thus it's advised to call arincIrigBConfigSet() only once per physical device, instead of calling it for every CAN node or even every ARINC handle.

Reconfiguration of IRIG-B has influence on all other handles and/or applications, which might already make use of it. Thus use this function with care. It is recommended to call arincIrigBConfigGet() before, to check if the new settings might interfere with anything previously configured.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. mode -- IN: A mask with IRIG-B-Modeflags representing the desired configuration.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_ERROR_SCHED_ENABLED - Scheduling needs to be stopped ARINC_ERROR_WRONG_TIMEFORMAT - Selected mode is not compatible with timeformat selected on this system.

SEE ALSO ARINC-Time IRIG-B-Modeflags arincIrigBConfigGet()

Page 84 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.3 arincIrigBConfigGet [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincIrigBConfigGet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincIrigBConfigGet(ARINC_HANDLE hnd, UINT32 *pMode)

FUNCTION Returns the settings of IRIG-B hardware.

NOTES It is recommended to use this function prior to calling arincIrigBConfigSet().

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. pMode -- OUT: Pointer to a UINT32, wherein the currently set IRIG-B-Modeflags will be stored.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - pMode is null.

SEE ALSO ARINC-Time IRIG-B-Modeflags arincIrigBConfigSet()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 85 of 106

Functions

7.2.4 arincTimeSet [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincTimeSet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincTimeSet(ARINC_HANDLE hnd, UINT64 newTime)

FUNCTION Set the time, which is used for message timestamping and scheduling to specific value.

NOTES This function can not be called, while scheduling is in progress, in such case call arincScheduleStop() first.

Time may be passed in two different formats. The actual format in use is set, when the handle is opened.

Setting time makes sense, only, if there's no valid IRIG-B signal, otherwise IRIG-B time will have priority over any manually set time.

Attempting to set time with this function leads to the IRIG-B module loosing its synchronization. Use with care.

It is only possible to set full seconds. The lower 32-Bit of timeStart will be ignored.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. newTime -- IN: A 64-Bit wide time value in the format selected on arincOpen().

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_ERROR_SCHED_ENABLED - Scheduling needs to be stopped

SEE ALSO ARINC-Time Handle-Modeflags arincOpen() arincTimeGet()

Page 86 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.5 arincTimeGet [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincTimeGet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincTimeGet(ARINC_HANDLE hnd, UINT64 *pTime, UINT32 *pStatus)

FUNCTION Returns the current time and its status.

NOTES Time is returned in either of two formats. The actual format in use is set by using the mode parameter, when the handle is opened.

There're several states: After power-on the time will simply be "free wheeling". When the user has used arincTimeSet() the state will be "manually set and free wheeling". As soon as IRIG-B time is available and locked, state is "IRIG-B lock". When IRIG-B lock is lost, state is "IRIG-B lock lost and free wheeling".

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. pTime -- OUT: Pointer to a UINT64, wherein the current time will be stored. Time is returned in one of two formats (s. ARINC-Time). pStatus -- OUT: Pointer to a UINT32, wherein the status of time will be returned (s. Status-IRIG-B).

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - pTime or pStatus is null.

SEE ALSO ARINC-Time Status-IRIG-B Handle-Modeflags arincOpen() arincTimeSet()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 87 of 106

Functions

7.2.6 arincIntervalSet [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincIntervalSet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincIntervalSet(ARINC_HANDLE hnd, UINT64 time, UINT64 timeStart)

FUNCTION Configures the ARINC825 scheduling interval and an optional start time.

NOTES This function can not be called, when scheduling has been started, in such case call arincScheduleStop() first.

Scheduling won't be activated by this function, regardless if the optional start time is used. Scheduling always needs to be activated by arincScheduleStart().

Beware: Technically it is possible to call arincIntervalSet() with one ARINC_HANDLE, while scheduling has already been started by another. This will lead to undeterministic scheduling behaviour and is generally not advised.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. time -- IN: Duration of a ARINC825 timeslice (s. ARINC-Time). timeStart -- IN: Time, when the first timeslice begins. If set to zero, the scheduling will begin immediately after arincScheduleStart() has been called. timeStart has to be given in the time format selected on call of arincOpen().

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_ERROR_SCHED_ENABLED - Scheduling needs to be stopped ARINC_ERROR_TIME_NOT_SET - Failed to configure interval or start time ARINC_ERROR_INTERVAL_LOW - time too small (1ms or below)

SEE ALSO ARINC-Time arincIntervalGet()

Page 88 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.7 arincIntervalGet [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincIntervalGet

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincIntervalGet(ARINC_HANDLE hnd, UINT64 *pTime, UINT64 *pTimeStart)

FUNCTION Reads the currently configured ARINC825 scheduling interval.

NOTES In *pTimeStart the start of the next timeslice is returned. This is equal to timeStart configured with arincIntervalSet() as long as scheduling has not started, yet. When the start time has passed, the start of the next timeslice is returned.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. pTime -- OUT: Pointer to UINT64, wherein the currently configured interval is returned. The interval is represented by seconds and splitseconds (s. ARINC-Time). pTimeStart -- OUT: Pointer to UINT64, wherein the configured/current start time of the next timeslice is returned. TimeStart is returned in the time format selected on call of arincOpen().

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - pTime or pTimeStart is NULL

SEE ALSO ARINC-Time arincIntervalSet()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 89 of 106

Functions

7.2.8 arincScheduleStart [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincScheduleStart

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincScheduleStart(ARINC_HANDLE hnd, INT32 prioMode, INT32 prioRx, INT32 prioTx)

FUNCTION After a scheduling table has been defined (using arincObjAdd()) and time slice duration has been configured (using arincIntervalSet()), the actual scheduling is activated with this function.

NOTES Even if a start time has been configured with arincIntervalSet() it is still needed to call arincScheduleStart(). If you want to develop an application, which non intrusively works within a schedule configured by another application, you can use arincIntervalGet() to gather the needed timing information on this handle and avoid the otherwise needed arincIntervalSet() call.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. prioMode -- IN: Use one of the Thread-Priority defines to choose between high priority or priority inheritance (both modes system independent) or manual configuration of system dependent priorities. prioRx -- IN: Specify the priority of the RX deamon thread. This parameter is used only, if prioMode is set to ARINC_PRIO_SET. The priority value is system specific. Special care needs to be taken to write a system independent application. prioTx -- IN: Specify the priority of the TX deamon thread. This parameter is used only, if prioMode is set to ARINC_PRIO_SET. The priority value is system specific. Special care needs to be taken to write a system independent application.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - Invalid value for prioMode or prioRx, prioTx are out of range for current host system ARINC_ERROR_NO_INTERVAL - Scheduling can not be started, because there's no valid timeslice interval configured, call arincIntervalSet() before arincScheduleStart()

Page 90 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

SEE ALSO arincScheduleStop() arincIntervalSet() arincIntervalGet() Thread-Priority

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 91 of 106

Functions

7.2.9 arincScheduleStop [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincScheduleStop

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincScheduleStop(ARINC_HANDLE hnd)

FUNCTION Deactivates scheduling.

NOTES If reconfiguration of scheduling table is needed, this function needs to be called first.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used

SEE ALSO arincScheduleStart()

Page 92 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.10 arincPoll [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincPoll

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincPoll(ARINC_HANDLE hnd, ARINC_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION By means of arincPoll() the current state of any ARINC object (regardless, if TX or RX object) can be polled. The state consists of number of valid data bytes as well as currently contained data bytes, timestamp of last reception/transmission and transmission and reception counters. The length field also contains information, if the object has received any data yet (ARINC_NO_DATA) or if the data has been updated since last call of arincPoll() (ARINC_OLD_DATA).

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. pCmsg -- IN/OUT: Pointer to one or more ARINC_CMSG_T structures. These have to be initialized with the CAN IDs of the ARINC objects in question. pNum -- IN/OUT: Pointer to a INT32, which determines the number of objects pCmsg is pointing to (and thus the number of objects to poll). The value of polled objects (this might be lower, than the number requested, if an error occurred) is returned via pNum.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - Either pCmsg and/or pNum is NULL

SEE ALSO arincObjAdd() arincObjDelete() arincTxObjUpdate()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 93 of 106

Functions

7.2.11 arincTxObjUpdate [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincTxObjUpdate

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincTxObjUpdate(ARINC_HANDLE hnd, ARINC_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Updates the data of one or more objects formerly added by arincObjectAdd().

NOTES This function works only for ARINC "transmit" objects (group >= 0) and not on ARINC objects of ARINC_GROUP_RX.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. pCmsg -- IN/OUT: Pointer to one or more ARINC_CMSG_T structures. These have to contain the number of data bytes as well as the bytes themselves and the CAN ID as reference of the objects (other parts of ARINC_CMSG_T structure are ignored). pNum -- IN/OUT: Pointer to a INT32, which determines the number of objects pCmsg is pointing to (and thus the number of objects to update). The value of updated objects (this might be lower, than the number requested, if an error occurred) is returned via pNum.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - Either pCmsg and/or pNum is NULL ARINC_ERROR_ID_NOT_FOUND - The CAN ID of a given object was not found. Call arincObjAdd() first. ARINC_ERROR_NOT_TX - A given object was not configured as a TX object (group >= 0)

SEE ALSO arincObjAdd() arincObjDelete() arincPoll()

Page 94 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.12 arincTxObjDisable [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincTxObjDisable

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincTxObjDisable(ARINC_HANDLE hnd, ARINC_CMSG_T *pCmsg, INT32 *pNum, INT32 flag)

FUNCTION Disables or enables an ARINC "transmit" object. If disabled this object won't be transmitted any longer.

NOTES This function works only for ARINC "transmit" objects (group >= 0) and on ARINC objects of ARINC_GROUP_RX the call has no effect.

By default a newly created ARINC object is enabled.

(De-)activation of ARINC objects (even if done within one call for more than one object) is NOT atomic. Also there's no guarantee, the given objects are dis-/enabled within one timeslot. This is done to prevent any disturbance of the scheduling, even if large amounts of objects are dis-/enabled.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more ARINC_CMSG_T structures. These have to contain the CAN ID as reference of the objects (other parts of ARINC_CMSG_T structure are ignored). pNum -- IN/OUT: Pointer to a INT32, which determines the number of objects pCmsg is pointing to (and thus the number of objects to dis-/enable). The value of dis-/enabled objects (this might be lower, than the number requested, if an error occurred) is returned via pNum. flag -- IN: Setting flag true (unequal zero) disables the referenced ARINC objects. Setting this flag zero, reenables the objects.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - Either pCmsg and/or pNum is NULL ARINC_ERROR_ID_NOT_FOUND - The CAN ID of a given object was not found. Call arincObjAdd() first.

SEE ALSO arincObjAdd() arincObjDelete() arincTxObjUpdate()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 95 of 106

Functions

7.2.13 arincWaitForTimeslot [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincWaitForTimeslot

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincWaitForTimeslot(ARINC_HANDLE hnd, INT32 timeout)

FUNCTION Function returns, when a new timeslice begins, or when timeout expired.

NOTES Scheduling needs to be started, before this function is called.

PARAMETERS hnd -- IN: A valid handle of type ARINC_HANDLE. timeout -- IN: Timeout in milliseconds.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_ERROR_SCHED_DISABLED - Function called without scheduling enabled ARINC_RX_TIMEOUT - Timeout expired without receiving a new timeslice event from hardware. Either this happens on purpose (e.g. due to small timeouts) or there's a severe problem in scheduling.

Page 96 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.14 arincObjAdd [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincObjAdd

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincObjAdd(ARINC_HANDLE hnd, ARINC_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Add one or more objects to an ARINC mode schedule table. The number of objects pointed to by pCmsg has to be specified in pNum. Every object has ARINC825 attributes, such as group, column (m) and slice index (n). By setting group to ARINC_GROUP_RX a receive object is added (m and n are ignored).

NOTES Scheduling needs to be stopped, before this function is called.

Objects are referenced by their CAN ID. Each CAN ID can be added once, only. pNum returns the number of successfully added objects. Normally this value shouldn't change, but in case of an error it might be used to determine, which object was cause of the error and. Once an object was added, it won't be removed, if an error occurrs with one of the subsequent objects.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more ARINC_CMSG_T, which will be add to schedule table. pNum -- IN/OUT: Pointer to a INT32, which determines the number of objects pCmsg is pointing to. When returning, it contains the number of successfully added objects.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - Either pCmsg or pNum was zero, or one of the objects contained invalid attributes (e.g. CAN ID wasn't a 29-Bit ID, an invalid ARINC group was specified or "n" didn't fit group). Use pNum to find the object. ARINC_ERROR_SCHED_ENABLED - arincScheduleStart() has been called before. Scheduling needs to be stopped, before adding new objects. ARINC_INSUFFICIENT_RESOURCES - Not enough memory to add another object. ARINC_ERROR_ID_BUSY - The CAN ID has already been added. ARINC_ERROR_COL_BUSY - The column with the specified group and slice index is alredy occupied.

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 97 of 106

Functions

SEE ALSO ARINC_CMSG_T arincObjDelete()

Page 98 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.2.15 arincObjDelete [ Top ] [ ARINC-Functions ] [ Functions ]

NAME arincObjDelete

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincObjDelete(ARINC_HANDLE hnd, ARINC_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Delete one or more objects from an ARINC mode schedule table. The number of objects pointed to by pCmsg has to be specified in pNum. The ARINC825 attributes, such as group, column (m) and slice index (n) are ignored by this call, instead the information found for the previously added object will be used. By setting group to ARINC_GROUP_RX a receive object is added (m and n are ignored).

NOTES Scheduling needs to be stopped, before this function is called.

Objects are referenced by their CAN ID. pNum returns the number of successfully deleted objects. Normally this value shouldn't change, but in case of an error it might be used to determine, which object was cause of the error and. Once an object was deleted, it won't be readded, if an error occurrs with one of the subsequent objects.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more ARINC_CMSG_T, which will be add to schedule table. pNum -- IN/OUT: Pointer to a INT32, which determines the number of objects pCmsg is pointing to. When returning, it contains the number of successfully deleted objects.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - Either pCmsg or pNum was zero, or one of the objects contained invalid attributes (CAN ID wasn't a 29-Bit ID). Use pNum to find the object. ARINC_ERROR_SCHED_ENABLED - arincScheduleStart() has been called before. Scheduling needs to be stopped, before deleting objects. ARINC_ERROR_ID_NOT_FOUND - The CAN ID has not been previously added.

SEE ALSO ARINC_CMSG_T arincObjAdd()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 99 of 106

Functions

7.3 CAN-Functions [ Top ] [ Functions ] [ Generics ]

DESCRIPTION Description of basic CAN functions. The following functions provide means to send and receive CAN frames directly.

CAN-Functions o arincRxIdAdd() o arincRxIdDelete() o arincRead() o arincTake() o arincWrite() o arincSend()

Page 100 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.3.1 arincRxIdAdd [ Top ] [ CAN-Functions ] [ Functions ]

NAME arincRxIdAdd

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincRxIdAdd(ARINC_HANDLE hnd, INT32 canId)

FUNCTION Add a CAN ID to message filter. In order to be able to receive CAN frames, the respective CAN IDs need to be added to the message filter.

NOTES For 29-Bit CAN IDs (CAN-20b IDs) only one ID needs to be added, in order to receive all CAN frames with 29-Bit IDs. Although all IDs will be deleted from message filter, when a handle is disposed via arincClose(), it is advised to use arincIdDelete(). By default the message filter is empty and no frames can be received. It is possible to belatedly add CAN IDs to an already blocking read from another thread.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. canId -- IN: CAN ID to add to message filter See CAN-IDs for flags and masks to be used with this parameter.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - canId is invalid

SEE ALSO CAN-IDs arincRxIdDelete()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 101 of 106

Functions

7.3.2 arincRxIdDelete [ Top ] [ CAN-Functions ] [ Functions ]

NAME arincRxIdDelete

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincRxIdDelete(ARINC_HANDLE hnd, INT32 canId)

FUNCTION Delete a CAN ID from message filter. Frames with this CAN ID will be prevented from reception.

NOTES For 29-Bit CAN IDs (CAN-20b IDs) only one ID needs to be deleted, in order to prevent reception of all frames with 29-Bit IDs. Although all IDs will be deleted from message filter, the use of this function is encouraged.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. canId -- IN: CAN ID to delete from message filter See CAN-IDs for flags and masks to be used with this parameter.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - canId is invalid

SEE ALSO CAN-IDs arincRxIdAdd()

Page 102 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.3.3 arincRead [ Top ] [ CAN-Functions ] [ Functions ]

NAME arincRead

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincRead(ARINC_HANDLE hnd, NTCAN_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Wait for (synchronously receive) CAN frames. The call will either return on successful reception of a CAN frame, on timeout or immediately, if there are already frames waiting in RX FIFO.

NOTES Don't forget to initialize *pNum before EVERY call.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more NTCAN_CMSG_T structures, where received messages will be stored in. pNum -- IN/OUT: Pointer to a INT32, which determines the number of messages pCmsg is pointing to (and thus the maximum of messages to be received by this call). When returning, it contains the number of successfully received messages.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - pCmsg or pNum is invalid ARINC_PENDING_READ - There's another arincRead() on the same handle pending (e.g. due to multithreading). ARINC_RX_TIMEOUT - Timeout period (as set on arincOpen()) ended and there were no frames received.

SEE ALSO arincTake() arincWrite() arincSend()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 103 of 106

Functions

7.3.4 arincTake [ Top ] [ CAN-Functions ] [ Functions ]

NAME arincTake

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincTake(ARINC_HANDLE hnd, NTCAN_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Poll for (asynchronously receive) CAN frames.

NOTES Don't forget to initialize *pNum before EVERY call.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more NTCAN_CMSG_T structures, where received messages will be stored in. pNum -- IN/OUT: Pointer to a INT32, which determines the number of messages pCmsg is pointing to (and thus the maximum of messages to be received by one call). When returning, it contains the number of successfully received messages.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - PCmsg or pNum is invalid

SEE ALSO arincRead() arincWrite() arincSend()

Page 104 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library

Functions

7.3.5 arincWrite [ Top ] [ CAN-Functions ] [ Functions ]

NAME arincWrite

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincWrite(ARINC_HANDLE hnd, NTCAN_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Synchronous (blocking) transmission of one or more CAN frames. The call will either return on successful transmission of all requested, frames, on timeout or if an error occurred during transmission of a frame.

NOTES Don't forget to initialize *pNum before EVERY call. The maximum of frames to be send in one call is limited by a handles TX FIFO (which is parametrized on arincOpen()). On a single handle arincWrite() may not be called several times in parallel.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more NTCAN_CMSG_T structures, which will be transmitted on CAN bus. pNum -- IN/OUT: Pointer to a INT32, which determines the number of messages pCmsg is pointing to (and thus the number of messages to transmit). The value of transmitted (this might be lower, than the number requested, if an error or timeout occurred) frames is returned via pNum.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - pCmsg or pNum is invalid ARINC_CONTR_BUSY - The TX job cannot be processed. Either the user is "overrunning" the bus or there's some form of bus contention (e.g. somebody is transmitting high priority frames with full bandwidth) ARINC_PENDING_WRITE - There's another arincWrite() on the same handle pending (e.g. due to multithreading) ARINC_TX_TIMEOUT - Timeout period (as set on arincOpen()) ended and there were less frames transmitted than requested.

SEE ALSO arincRead() arincTake() arincSend()

ARINC 825 Library Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 Page 105 of 106

Functions

7.3.6 arincSend [ Top ] [ CAN-Functions ] [ Functions ]

NAME arincSend

SYNOPSIS EXPORT ARINC_RESULT PSYS_CALLTYPE arincSend(ARINC_HANDLE hnd, NTCAN_CMSG_T *pCmsg, INT32 *pNum)

FUNCTION Asynchronous (non-blocking) transmission of one or more CAN frames.

NOTES Don't forget to initialize *pNum before EVERY call. Due to its asynchronous nature, it is not possible to get any information about success or failure of the TX job.

PARAMETERS hnd -- IN: A handle of type ARINC_HANDLE. pCmsg -- IN: Pointer to one or more NTCAN_CMSG_T structures, which will be transmitted on CAN bus. pNum -- IN/OUT: Pointer to a INT32, which determines the number of messages pCmsg is pointing to (and thus the number of messages to transmit). The value of "accepted" (this might be lower, than the number requested, if for example the handle FIFO is flooded) frames is returned via pNum.

RESULT Success: ARINC_SUCCESS Error: ARINC_INVALID_HANDLE - An invalid handle was used ARINC_INVALID_PARAMETER - PCmsg or pNum is invalid ARINC_CONTR_BUSY - The TX job cannot be processed. Either the user is "overrunning" the bus or there's some form of bus contention (e.g. somebody is transmitting high priority frames with full bandwidth)

SEE ALSO arincRead() arincTake() arincWrite()

Page 106 of 106 Software Manual • Doc. No.: C.1140..21 / Rev. 1.1 ARINC 825 Library


Recommended