mailbox.c File Reference


Detailed Description

Mailbox functionality.

Definition in file mailbox.c.

Go to the source code of this file.

Functions

uint8_t * ec_slave_mbox_prepare_send (const ec_slave_t *slave, ec_datagram_t *datagram, uint8_t type, size_t size)
 Prepares a mailbox-send datagram.
int ec_slave_mbox_prepare_check (const ec_slave_t *slave, ec_datagram_t *datagram)
 Prepares a datagram for checking the mailbox state.
int ec_slave_mbox_check (const ec_datagram_t *datagram)
 Processes a mailbox state checking datagram.
int ec_slave_mbox_prepare_fetch (const ec_slave_t *slave, ec_datagram_t *datagram)
 Prepares a datagram to fetch mailbox data.
uint8_t * ec_slave_mbox_fetch (const ec_slave_t *slave, ec_datagram_t *datagram, uint8_t type, size_t *size)
 Processes received mailbox data.


Function Documentation

uint8_t* ec_slave_mbox_prepare_send const ec_slave_t slave,
ec_datagram_t datagram,
uint8_t  type,
size_t  size
 

Prepares a mailbox-send datagram.

Returns:
pointer to mailbox datagram data
Parameters:
slave  slave
datagram  datagram
type  mailbox protocol
size  size of the data

Definition at line 55 of file mailbox.c.

int ec_slave_mbox_prepare_check const ec_slave_t slave,
ec_datagram_t datagram
 

Prepares a datagram for checking the mailbox state.

Returns:
0 in case of success, else < 0
Parameters:
slave  slave
datagram  datagram

Definition at line 95 of file mailbox.c.

int ec_slave_mbox_check const ec_datagram_t datagram  ) 
 

Processes a mailbox state checking datagram.

Returns:
0 in case of success, else < 0
Parameters:
datagram  datagram

Definition at line 113 of file mailbox.c.

int ec_slave_mbox_prepare_fetch const ec_slave_t slave,
ec_datagram_t datagram
 

Prepares a datagram to fetch mailbox data.

Returns:
0 in case of success, else < 0
Parameters:
slave  slave
datagram  datagram

Definition at line 125 of file mailbox.c.

uint8_t* ec_slave_mbox_fetch const ec_slave_t slave,
ec_datagram_t datagram,
uint8_t  type,
size_t *  size
 

Processes received mailbox data.

Returns:
pointer to the received data
Parameters:
slave  slave
datagram  datagram
type  expected mailbox protocol
size  size of the received data

Definition at line 142 of file mailbox.c.


Generated on Fri Sep 1 14:56:57 2006 for IgH EtherCAT master by  doxygen 1.4.6