XMC-A825-16 ARINC-825 16 Channel XMC / CANFlight-16 User's Manual REV C
Document: TP2216-901_Users_Manual.pdf
Page 34 of 39
© Innovative Control Systems
Project:
TP2216-901
Author: K. Jacobson Date: 11.05.2019
Rev.: C
10.1 Pmc825StartInterface()
Synopsis:
#include "pmc825.h"
int Pmc825StartInterface(PMC825_IF *intf, unsigned int pm825_ip, unsigned int host_ip, int rx_port, int tx_port, int
channel)
Description:
The Pmc825StartInterface() function establishes the connection between the specified channel of a XMC-
A825-16 unit and the host by the means of UDP/IP sockets. It initializes a PMC825_IF interface structure that
refers to the CAN channel. The interface structure is used by other I/O functions to refer to that CAN channel.
Return Values:
Upon successful completion,
Pmc825StartInterface()
returns PMC825_OK. Otherwise, one of the following
codes is returned:
PMC825_MEM_ALLOC_ERR: The memory required to establish communication could not be obtained.
PMC825_SOCKET_ERR: At least one of the communication sockets could not be successfully initialized.
10.2 Pmc825StopInterface()
Synopsis:
#include "pmc825.h"
void Pmc825StopInterface(PMC825_IF *intf)
Description:
The
Pmc825StopInterface()
function releases the connection between a XMC-A825-16 unit and the host by
closing the corresponding UDP/IP sockets and releasing the allocated memory.
10.3 Pmc825RawCanRead()
Synopsis:
#include "pmc825.h"
int Pmc825RawCanRead(PMC825_IF *intf, CAN_MSG *msg)
Description:
The
Pmc825RawCanRead()
function tries to return one unformatted CAN message from the buffer associated
with the CAN channel of the XMC-A825-16 unit specified through the PMC825_IF interface structure.
Return Values:
Upon successful completion,
Pmc825RawCanRead()
returns PMC825_OK. Otherwise, one of the following
codes is returned:
PMC825_NO_MSG: No message could be read from the module.