IgH EtherCAT Master  1.5.3
mailbox.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
6  *
7  * This file is part of the IgH EtherCAT Master.
8  *
9  * The IgH EtherCAT Master is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License version 2, as
11  * published by the Free Software Foundation.
12  *
13  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with the IgH EtherCAT Master; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  * ---
23  *
24  * The license mentioned above concerns the source code only. Using the
25  * EtherCAT technology and brand is only permitted in compliance with the
26  * industrial property and similar rights of Beckhoff Automation GmbH.
27  *
28  *****************************************************************************/
29 
35 /*****************************************************************************/
36 
37 #ifndef __EC_MAILBOX_H__
38 #define __EC_MAILBOX_H__
39 
40 #include "slave.h"
41 
42 /*****************************************************************************/
43 
46 #define EC_MBOX_HEADER_SIZE 6
47 
51  EC_MBOX_TYPE_EOE = 0x02,
52  EC_MBOX_TYPE_COE = 0x03,
53  EC_MBOX_TYPE_FOE = 0x04,
54  EC_MBOX_TYPE_SOE = 0x05,
55  EC_MBOX_TYPE_VOE = 0x0f,
56 };
57 
58 /*****************************************************************************/
59 
61  uint8_t, size_t);
65 uint8_t *ec_slave_mbox_fetch(const ec_slave_t *, const ec_datagram_t *,
66  uint8_t *, size_t *);
67 
68 /*****************************************************************************/
69 
70 #endif
EtherCAT slave structure.
EtherCAT datagram.
Definition: datagram.h:87
EtherCAT slave.
Definition: slave.h:176
int ec_slave_mbox_prepare_fetch(const ec_slave_t *, ec_datagram_t *)
Prepares a datagram to fetch mailbox data.
Definition: mailbox.c:127
int ec_slave_mbox_prepare_check(const ec_slave_t *, ec_datagram_t *)
Prepares a datagram for checking the mailbox state.
Definition: mailbox.c:96
ec_mbox_types
Mailbox types.
Definition: mailbox.h:50
uint8_t * ec_slave_mbox_prepare_send(const ec_slave_t *, ec_datagram_t *, uint8_t, size_t)
Prepares a mailbox-send datagram.
Definition: mailbox.c:51
int ec_slave_mbox_check(const ec_datagram_t *)
Processes a mailbox state checking datagram.
Definition: mailbox.c:115
uint8_t * ec_slave_mbox_fetch(const ec_slave_t *, const ec_datagram_t *, uint8_t *, size_t *)
Processes received mailbox data.
Definition: mailbox.c:165