libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
Loading...
Searching...
No Matches
error_codes.h
Go to the documentation of this file.
1
13/*
14 * This file is part of libethercat.
15 *
16 * libethercat is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 3 of the License, or (at your option) any later version.
20 *
21 * libethercat is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with libethercat (LICENSE.LGPL-V3); if not, write
28 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
29 * Floor, Boston, MA 02110-1301, USA.
30 *
31 * Please note that the use of the EtherCAT technology, the EtherCAT
32 * brand name and the EtherCAT logo is only permitted if the property
33 * rights of Beckhoff Automation GmbH are observed. For further
34 * information please contact Beckhoff Automation GmbH & Co. KG,
35 * Hülshorstweg 20, D-33415 Verl, Germany (www.beckhoff.com) or the
36 * EtherCAT Technology Group, Ostendstraße 196, D-90482 Nuremberg,
37 * Germany (ETG, www.ethercat.org).
38 *
39 */
40
41#ifndef LIBETHERCAT_ERROR_CODES_H
42#define LIBETHERCAT_ERROR_CODES_H
43
44#include "libethercat/common.h"
45#include "libethercat/mbx.h"
46
54#define EC_OK (0)
55#define EC_ERROR_TIMER_EXPIRED (1)
56
57#define EC_ERROR_GENERAL_MASK (0x00010000)
58#define EC_ERROR_OUT_OF_MEMORY (EC_ERROR_GENERAL_MASK | 0x00000001)
59#define EC_ERROR_WKC_MISMATCH (EC_ERROR_GENERAL_MASK | 0x00000002)
60#define EC_ERROR_OUT_OF_INDICES (EC_ERROR_GENERAL_MASK | 0x00000010)
61#define EC_ERROR_OUT_OF_DATAGRAMS (EC_ERROR_GENERAL_MASK | 0x00000020)
62#define EC_ERROR_TIMEOUT (EC_ERROR_GENERAL_MASK | 0x00000040)
63#define EC_ERROR_UNAVAILABLE (EC_ERROR_GENERAL_MASK | 0x00000080)
64#define EC_ERROR_HW_SEND (EC_ERROR_GENERAL_MASK | 0x00000100)
65
66
67#define EC_ERROR_SLAVE_MASK (0x00020000)
68#define EC_ERROR_SLAVE_STATE_SWITCH (EC_ERROR_SLAVE_MASK | 0x00000001)
69#define EC_ERROR_SLAVE_NOT_RESPONDING (EC_ERROR_SLAVE_MASK | 0x00000002)
70#define EC_ERROR_SLAVE_TRANSITION_ACTIVE (EC_ERROR_SLAVE_MASK | 0x00000004)
71
72#define EC_ERROR_EEPROM_MASK (0x00040000)
73#define EC_ERROR_EEPROM_READ_ERROR (EC_ERROR_EEPROM_MASK | 0x00000001)
74#define EC_ERROR_EEPROM_WRITE_ERROR (EC_ERROR_EEPROM_MASK | 0x00000002)
75#define EC_ERROR_EEPROM_CHECKSUM (EC_ERROR_EEPROM_MASK | 0x00000008)
76#define EC_ERROR_EEPROM_WRITE_IN_PROGRESS (EC_ERROR_EEPROM_MASK | 0x00000010)
77#define EC_ERROR_EEPROM_WRITE_ENABLE (EC_ERROR_EEPROM_MASK | 0x00000020)
78#define EC_ERROR_EEPROM_CONTROL_TO_EC (EC_ERROR_EEPROM_MASK | 0x00000100)
79#define EC_ERROR_EEPROM_CONTROL_TO_PDI (EC_ERROR_EEPROM_MASK | 0x00000200)
80
81#define EC_ERROR_HW_MASK (0x00080000)
82#define EC_ERROR_HW_NOT_SUPPORTED (EC_ERROR_HW_MASK | 0x00000001)
83#define EC_ERROR_HW_NO_INTERFACE (EC_ERROR_HW_MASK | 0x00000002)
84#define EC_ERROR_HW_NO_LINK (EC_ERROR_HW_MASK | 0x00000004)
85
86#define EC_ERROR_MAILBOX_MASK (0x00100000)
87#define EC_ERROR_MAILBOX_NOT_SUPPORTED_AOE (EC_ERROR_MAILBOX_MASK | EC_MBX_AOE)
88#define EC_ERROR_MAILBOX_NOT_SUPPORTED_EOE (EC_ERROR_MAILBOX_MASK | EC_MBX_EOE)
89#define EC_ERROR_MAILBOX_NOT_SUPPORTED_COE (EC_ERROR_MAILBOX_MASK | EC_MBX_FOE)
90#define EC_ERROR_MAILBOX_NOT_SUPPORTED_FOE (EC_ERROR_MAILBOX_MASK | EC_MBX_COE)
91#define EC_ERROR_MAILBOX_NOT_SUPPORTED_SOE (EC_ERROR_MAILBOX_MASK | EC_MBX_SOE)
92#define EC_ERROR_MAILBOX_NOT_SUPPORTED_VOE (EC_ERROR_MAILBOX_MASK | EC_MBX_VOE)
93
94#define EC_ERROR_MAILBOX_READ_IS_NULL (EC_ERROR_MAILBOX_MASK | 0x00000010)
95#define EC_ERROR_MAILBOX_WRITE_IS_NULL (EC_ERROR_MAILBOX_MASK | 0x00000020)
96
97#define EC_ERROR_MAILBOX_READ_EMPTY (EC_ERROR_MAILBOX_MASK | 0x00000100)
98#define EC_ERROR_MAILBOX_WRITE_FULL (EC_ERROR_MAILBOX_MASK | 0x00000200)
99
100#define EC_ERROR_MAILBOX_TIMEOUT (EC_ERROR_MAILBOX_MASK | 0x00001000)
101#define EC_ERROR_MAILBOX_ABORT (EC_ERROR_MAILBOX_MASK | 0x00002000)
102#define EC_ERROR_MAILBOX_READ (EC_ERROR_MAILBOX_MASK | 0x00004000)
103#define EC_ERROR_MAILBOX_WRITE (EC_ERROR_MAILBOX_MASK | 0x00008000)
104
105#define EC_ERROR_MAILBOX_OUT_OF_SEND_BUFFERS (EC_ERROR_MAILBOX_MASK | 0x00010000)
106#define EC_ERROR_MAILBOX_OUT_OF_WRITE_BUFFERS (EC_ERROR_MAILBOX_MASK | 0x00020000)
107#define EC_ERROR_MAILBOX_BUFFER_TOO_SMALL (EC_ERROR_MAILBOX_MASK | 0x00040000)
108
109#define EC_ERROR_MAILBOX_COE_MASK (0x00200000)
110#define EC_ERROR_MAILBOX_COE_INDEX_NOT_FOUND (EC_ERROR_MAILBOX_COE_MASK | 0x00000001)
111#define EC_ERROR_MAILBOX_COE_SUBINDEX_NOT_FOUND (EC_ERROR_MAILBOX_COE_MASK | 0x00000002)
112
113#define EC_ERROR_MAILBOX_FOE_MASK (0x00800000)
114#define EC_ERROR_MAILBOX_FOE_ERROR_REQ (EC_ERROR_MAILBOX_FOE_MASK | 0x00000001)
115#define EC_ERROR_MAILBOX_FOE_NO_ACK (EC_ERROR_MAILBOX_FOE_MASK | 0x00000002)
116#define EC_ERROR_MAILBOX_FOE_AGAIN (EC_ERROR_MAILBOX_FOE_MASK | 0x00000004)
117
120#endif // LIBETHERCAT_ERROR_CODES_H
121
ethercat master common stuff
ethercat mailbox common access functions