Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: EasyCAT_LAB_simple EasyCAT_LAB_very_simple EasyCAT_LAB
ethercattype.h File Reference
General typedefs and defines for EtherCAT. More...
Go to the source code of this file.
Data Structures | |
struct | ec_errort |
Struct to retrieve errors. More... | |
Typedefs | |
typedef uint8 | ec_bufT [EC_BUFSIZE] |
definition for frame buffers | |
typedef PACKED_BEGIN struct PACKED | ec_etherheadert |
ethernet header definition | |
typedef PACKED_BEGIN struct PACKED | ec_comt |
EtherCAT datagram header definition. | |
Enumerations | |
enum | ec_err { EC_ERR_OK = 0, EC_ERR_ALREADY_INITIALIZED, EC_ERR_NOT_INITIALIZED, EC_ERR_TIMEOUT, EC_ERR_NO_SLAVES, EC_ERR_NOK } |
Possible error codes returned. More... | |
enum | ec_state { EC_STATE_NONE = 0x00, EC_STATE_INIT = 0x01, EC_STATE_PRE_OP = 0x02, EC_STATE_BOOT = 0x03, EC_STATE_SAFE_OP = 0x04, EC_STATE_OPERATIONAL = 0x08, EC_STATE_ACK = 0x10 } |
Possible EtherCAT slave states. More... | |
enum | ec_bufstate { EC_BUF_EMPTY = 0x00, EC_BUF_ALLOC = 0x01, EC_BUF_TX = 0x02, EC_BUF_RCVD = 0x03, EC_BUF_COMPLETE = 0x04 } |
Possible buffer states. More... | |
enum | ec_datatype |
Ethercat data types. More... | |
enum | ec_cmdtype { EC_CMD_NOP = 0x00, EC_CMD_APRD, EC_CMD_APWR, EC_CMD_APRW, EC_CMD_FPRD, EC_CMD_FPWR, EC_CMD_FPRW, EC_CMD_BRD, EC_CMD_BWR, EC_CMD_BRW, EC_CMD_LRD, EC_CMD_LWR, EC_CMD_LRW, EC_CMD_ARMW, EC_CMD_FRMW } |
Ethercat command types. More... | |
enum | ec_ecmdtype { EC_ECMD_NOP = 0x0000, EC_ECMD_READ = 0x0100, EC_ECMD_WRITE = 0x0201, EC_ECMD_RELOAD = 0x0300 } |
Ethercat EEprom command types. More... | |
enum | { ECT_SII_STRING = 10, ECT_SII_GENERAL = 30, ECT_SII_FMMU = 40, ECT_SII_SM = 41, ECT_SII_PDO = 50 } |
enum | |
Item offsets in SII general section. More... | |
enum | { ECT_MBXT_ERR = 0x00, ECT_MBXT_AOE, ECT_MBXT_EOE, ECT_MBXT_COE, ECT_MBXT_FOE, ECT_MBXT_SOE, ECT_MBXT_VOE = 0x0f } |
Mailbox types definitions. More... | |
enum | |
CoE mailbox types. More... | |
enum | |
CoE SDO commands. More... | |
enum | |
CoE Object Description commands. More... | |
enum | |
FoE opcodes. More... | |
enum | |
SoE opcodes. More... | |
enum | |
Ethercat registers. More... | |
enum | ec_err_type |
Error types. More... |
Detailed Description
General typedefs and defines for EtherCAT.
Defines that could need optimisation for specific applications are the EC_TIMEOUTxxx. Assumptions for the standard settings are a standard linux PC or laptop and a wired connection to maximal 100 slaves. For use with wireless connections or lots of slaves the timeouts need increasing. For fast systems running Xenomai and RT-net or alike the timeouts need to be shorter.
Definition in file ethercattype.h.
Typedef Documentation
typedef uint8 ec_bufT[EC_BUFSIZE] |
definition for frame buffers
Definition at line 81 of file ethercattype.h.
typedef PACKED_BEGIN struct PACKED ec_comt |
EtherCAT datagram header definition.
typedef PACKED_BEGIN struct PACKED ec_etherheadert |
ethernet header definition
Enumeration Type Documentation
anonymous enum |
- Enumerator:
ECT_SII_STRING SII category strings.
ECT_SII_GENERAL SII category general.
ECT_SII_FMMU SII category FMMU.
ECT_SII_SM SII category SM.
ECT_SII_PDO SII category PDO.
Definition at line 278 of file ethercattype.h.
anonymous enum |
Item offsets in SII general section.
Definition at line 293 of file ethercattype.h.
anonymous enum |
Mailbox types definitions.
- Enumerator:
Definition at line 307 of file ethercattype.h.
anonymous enum |
CoE mailbox types.
Definition at line 326 of file ethercattype.h.
anonymous enum |
CoE SDO commands.
Definition at line 339 of file ethercattype.h.
anonymous enum |
CoE Object Description commands.
Definition at line 351 of file ethercattype.h.
anonymous enum |
FoE opcodes.
Definition at line 363 of file ethercattype.h.
anonymous enum |
SoE opcodes.
Definition at line 374 of file ethercattype.h.
anonymous enum |
Ethercat registers.
Definition at line 385 of file ethercattype.h.
enum ec_bufstate |
Possible buffer states.
- Enumerator:
EC_BUF_EMPTY Empty.
EC_BUF_ALLOC Allocated, but not filled.
EC_BUF_TX Transmitted.
EC_BUF_RCVD Received, but not consumed.
EC_BUF_COMPLETE Cycle completed.
Definition at line 169 of file ethercattype.h.
enum ec_cmdtype |
Ethercat command types.
- Enumerator:
Definition at line 216 of file ethercattype.h.
enum ec_datatype |
Ethercat data types.
Definition at line 184 of file ethercattype.h.
enum ec_ecmdtype |
Ethercat EEprom command types.
- Enumerator:
EC_ECMD_NOP No operation.
EC_ECMD_READ Read.
EC_ECMD_WRITE Write.
EC_ECMD_RELOAD Reload.
Definition at line 252 of file ethercattype.h.
enum ec_err |
Possible error codes returned.
- Enumerator:
Definition at line 132 of file ethercattype.h.
enum ec_err_type |
Error types.
Definition at line 456 of file ethercattype.h.
enum ec_state |
Possible EtherCAT slave states.
- Enumerator:
Definition at line 149 of file ethercattype.h.
Generated on Tue Jul 12 2022 18:21:14 by
