User manual

CPC_Send_RTR
Syntax: #include cpc.h
int CPC_Send_RTR
(struct CPC_CAN_MSG *);
Description: CPC_Send_RTR() transmits a
Remote-Transmission-Request message
across the CAN. The function call passes a
pointer to a structure of type CPC_CAN_MSG,
which contains the communication object to
be transmitted.
Return value:
User Manual CPC-XTI
EMS Dr. Thomas Wünsche 13
2.5.3 Functions for the Asynchronous Programming
Interface
CPC_Add_Handler
Syntax: #include cpc.h
int CPC_Add_Handler(void (*handler)
(const struct CPC_MSG *));
Description: CPC_Add_Handler() adds the handler
indicated by the pointer passed at function call
to the list of handlers which are executed on
any incoming CPC-XTI message.
Return value: 0 on error free execution,
–1 if the list of handlers is full.
CPC_Remove_Handler
Syntax: #include cpc.h
int CPC_Remove_Handler(void (*handler)
(const struct CPC_MSG *));
Description: CPC_Remove_Handler() removes the handler
indicated by the pointer passed at function call
from the list of handlers which are executed on
any incoming CPC-XTI message. If the
handler is contained more than once, the last
occurence is removed.
Return value: 0 on error free execution,
–1 if handler was not within the list.
CPC-XTI User Manual
14 EMS Dr. Thomas Wünsche