![background image](http://html1.mh-extra.com/html/ics/xmc-a825-16/xmc-a825-16_user-manual_3532771033.webp)
XMC-A825-16 ARINC-825 16 Channel XMC / CANFlight-16 User's Manual REV C
Document: TP2216-901_Users_Manual.pdf
Page 33 of 39
© Innovative Control Systems
Project:
TP2216-901
Author: K. Jacobson Date: 11.05.2019
Rev.: C
10 XMC-A825-16 Application Programmer's Interface
The XMC-A825-16 Application Programmer's Interface is a Socket Interface Library consisting of a set of
functions which provide the interface between applications written in "C" and the XMC-A825-16 resources
using 4.3 BSD datagram sockets. It is provided in source code and allows to be compiled and linked for
various operating systems. The Interface Library has successfully been tested with SUN/Solaris,
SuSE/RedHat Linux, MacOS, VxWorks and MS Windows. Compilation for other Unix derivatives including
realtime operating systems like LynxOS, QNX or Integrity 178 should require only minor code changes, if any
at all.
Example programs coming with the library show how applications make use of the library calls to attach to
XMC-A825-16 channels, read and write CAN messages, perform control functions and detach from a XMC-
A825-16 channel. All relevant interface structures and definitions are contained in just three include files
(pmc825.h, canas.h, arinc825.h) to minimize integration effort. The current version of the library may be
downloaded anytime from www.arinc825.com. Compatibility of new versions to previous versions is ensured
so that upgrading to a new library version does not require changes in already existing applications.
The functions provided by the XMC-A825-16 Socket Interface Library are listed below. The calls are not
multithread safe. Any application accessing the XMC-A825-16 has to call Pmc825StartInterface() once before
using any other Socket Interface Library call. Good practice is to call Pmc825StopInterface() once the XMC-
A825-16 resource is not needed by the application anymore. Failing to do so will prevent the XMC-A825-16
from freeing resources by shutting down the open UDP/IP socket.
The PMC825 Socket Interface Library provides the following user-callable routines:
•
Pmc825StartInterface()
- Establish a communication path to a PMC825 CAN channel
•
Pmc825StopInterface()
- Release a communication path to a PMC825 CAN channel
•
Pmc825RawCanRead()
- Read unformatted CAN messages
•
Pmc825RawCanWrite()
- Write unformatted CAN messages
•
Pmc825CanAerospaceRead()
- Read CANaerospace formatted CAN messages
•
Pmc825CanAerospaceWrite()
- Write CANaerospace formatted CAN messages
•
Pmc825Arinc825Read()
- Read ARINC 825 formatted CAN messages
•
Pmc825Arinc825Write()
- Write ARINC 825 formatted CAN messages
•
Pmc825CtrlRead()
- Read a PMC825 control response packet
•
Pmc825CtrlWrite()
- Write a PMC825 control command packet