EMS CPC-PP User Manual page 8

Can-pc interface
Table of Contents

Advertisement

User Manual
CPC_Send_Msg
Syntax:
#include "cpc.h"
int CPC_Send_Msg
(struct CPC_CAN_MSG *);
Description:
CPC_Send_Msg() sends a message across
the CAN-bus. The function call passes a poin-
ter to a structure of type CPC_CAN_MSG,
which contains the communication object to
be transmitted.
Return value: -
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-bus. The function call passes a pointer
to a structure of type CPC_CAN_MSG, which
contains the communication object to be trans-
mitted.
Return value: -
EMS Dr. Thomas Wünsche
CPC-PP
11
CPC-PP
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 indica-
ted by the pointer passed at function call to the
list of handlers which are executed on any in-
coming CPC-PP 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-PP message. If the handler
is contained more than once, the last occuren-
ce is removed.
Return value: 0
on error free execution,
-1
if handler was not within the list.
12
EMS Dr. Thomas Wünsche
User Manual

Advertisement

Table of Contents
loading

Table of Contents