IgH EtherCAT Master  1.6.1
mailbox.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4  *
5  * This file is part of the IgH EtherCAT Master.
6  *
7  * The IgH EtherCAT Master is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License version 2, as
9  * published by the Free Software Foundation.
10  *
11  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with the IgH EtherCAT Master; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  ****************************************************************************/
21 
27 /****************************************************************************/
28 
29 #ifndef __EC_MAILBOX_H__
30 #define __EC_MAILBOX_H__
31 
32 #include "slave.h"
33 
34 /****************************************************************************/
35 
38 #define EC_MBOX_HEADER_SIZE 6
39 
44 enum {
45  EC_MBOX_TYPE_EOE = 0x02,
46  EC_MBOX_TYPE_COE = 0x03,
47  EC_MBOX_TYPE_FOE = 0x04,
48  EC_MBOX_TYPE_SOE = 0x05,
49  EC_MBOX_TYPE_VOE = 0x0f,
50 };
51 
52 /****************************************************************************/
53 
55  uint8_t, size_t);
59 uint8_t *ec_slave_mbox_fetch(const ec_slave_t *, const ec_datagram_t *,
60  uint8_t *, size_t *);
61 
62 /****************************************************************************/
63 
64 #endif
EtherCAT slave structure.
EtherCAT datagram.
Definition: datagram.h:79
EtherCAT slave.
Definition: slave.h:168
int ec_slave_mbox_prepare_fetch(const ec_slave_t *, ec_datagram_t *)
Prepares a datagram to fetch mailbox data.
Definition: mailbox.c:119
int ec_slave_mbox_prepare_check(const ec_slave_t *, ec_datagram_t *)
Prepares a datagram for checking the mailbox state.
Definition: mailbox.c:88
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:43
int ec_slave_mbox_check(const ec_datagram_t *)
Processes a mailbox state checking datagram.
Definition: mailbox.c:107
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:157