IgH EtherCAT Master  1.5.2
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 
52 enum {
53  EC_MBOX_TYPE_AOE = 0x01,
54  EC_MBOX_TYPE_EOE = 0x02,
55  EC_MBOX_TYPE_COE = 0x03,
56  EC_MBOX_TYPE_FOE = 0x04,
57  EC_MBOX_TYPE_SOE = 0x05,
58  EC_MBOX_TYPE_VOE = 0x0f,
59 };
60 
61 /*****************************************************************************/
62 
67 extern const ec_code_msg_t mbox_error_messages[];
68 
69 /*****************************************************************************/
70 
72  uint8_t, size_t);
77  uint8_t *, size_t *);
78 
79 /*****************************************************************************/
80 
81 #endif
uint8_t * ec_slave_mbox_fetch(const ec_slave_t *, ec_mbox_data_t *, uint8_t *, size_t *)
Processes received mailbox data.
Definition: mailbox.c:172
EtherCAT slave structure.
EtherCAT mailbox response data.
Definition: datagram.h:122
EtherCAT datagram.
Definition: datagram.h:88
EtherCAT slave.
Definition: slave.h:214
int ec_slave_mbox_prepare_fetch(const ec_slave_t *, ec_datagram_t *)
Prepares a datagram to fetch mailbox data.
Definition: mailbox.c:134
int ec_slave_mbox_prepare_check(const ec_slave_t *, ec_datagram_t *)
Prepares a datagram for checking the mailbox state.
Definition: mailbox.c:103
Code/Message pair.
Definition: globals.h:313
const ec_code_msg_t mbox_error_messages[]
Mailbox error codes.
Definition: mailbox.c:154
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:122