diff -r 7c986b717411 -r 9f4ea66d89a3 master/globals.h --- a/master/globals.h Wed Feb 22 17:36:28 2006 +0000 +++ b/master/globals.h Thu Feb 23 09:58:50 2006 +0000 @@ -13,65 +13,51 @@ /*****************************************************************************/ -/** - Maximale Größe eines EtherCAT-Frames -*/ -#define EC_FRAME_SIZE 1500 +// EtherCAT-Protokoll +#define EC_MAX_FRAME_SIZE 1500 /**< Maximale Größe eines EtherCAT-Frames ohne + Ethernet-II-Header und -Prüfsumme*/ +#define EC_MIN_FRAME_SIZE 46 /** Minimale Größe, s. o. */ +#define EC_FRAME_HEADER_SIZE 2 /**< Größe des EtherCAT-Frame-Headers */ +#define EC_COMMAND_HEADER_SIZE 10 /**< Größe eines EtherCAT-Kommando-Headers */ +#define EC_COMMAND_FOOTER_SIZE 2 /**< Größe eines EtherCAT-Kommando-Footers */ +#define EC_SYNC_SIZE 8 /**< Größe einer Sync-Manager-Konfigurationsseite */ +#define EC_FMMU_SIZE 16 /**< Größe einer FMMU-Konfigurationsseite */ +#define EC_MAX_FMMUS 16 /**< Maximale Anzahl FMMUs pro Slave */ -/** - Maximale Anzahl der Prozessdatendomänen in einem Master -*/ -#define EC_MAX_DOMAINS 10 - -/** - NULL-Define, falls noch nicht definiert. -*/ +#define EC_MASTER_MAX_DOMAINS 10 /**< Maximale Anzahl Domänen eines Masters */ #ifndef NULL -#define NULL ((void *) 0) +#define NULL ((void *) 0) /**< NULL-Define, falls noch nicht definiert. */ #endif /*****************************************************************************/ /** - EtherCAT-Kommando-Typ -*/ - -typedef enum -{ - EC_COMMAND_NONE = 0x00, /**< Dummy */ - EC_COMMAND_APRD = 0x01, /**< Auto-increment physical read */ - EC_COMMAND_APWR = 0x02, /**< Auto-increment physical write */ - EC_COMMAND_NPRD = 0x04, /**< Node-addressed physical read */ - EC_COMMAND_NPWR = 0x05, /**< Node-addressed physical write */ - EC_COMMAND_BRD = 0x07, /**< Broadcast read */ - EC_COMMAND_BWR = 0x08, /**< Broadcast write */ - EC_COMMAND_LRW = 0x0C /**< Logical read/write */ -} -ec_command_type_t; - -/*****************************************************************************/ - -/** Zustand eines EtherCAT-Slaves */ typedef enum { - EC_SLAVE_STATE_UNKNOWN = 0x00, /**< Status unbekannt */ - EC_SLAVE_STATE_INIT = 0x01, /**< Init-Zustand (Keine Mailbox- - Kommunikation, Kein I/O) */ - EC_SLAVE_STATE_PREOP = 0x02, /**< Pre-Operational (Mailbox- - Kommunikation, Kein I/O) */ - EC_SLAVE_STATE_SAVEOP = 0x04, /**< Save-Operational (Mailbox- - Kommunikation und Input Update) */ - EC_SLAVE_STATE_OP = 0x08, /**< Operational, (Mailbox- - Kommunikation und Input/Output Update) */ - EC_ACK = 0x10 /**< Acknoledge-Bit beim Zustandswechsel - (dies ist kein eigener Zustand) */ + EC_SLAVE_STATE_UNKNOWN = 0x00, /**< Status unbekannt */ + EC_SLAVE_STATE_INIT = 0x01, /**< Init-Zustand (Keine Mailbox- + Kommunikation, Kein I/O) */ + EC_SLAVE_STATE_PREOP = 0x02, /**< Pre-Operational (Mailbox- + Kommunikation, Kein I/O) */ + EC_SLAVE_STATE_SAVEOP = 0x04, /**< Save-Operational (Mailbox- + Kommunikation und Input Update) */ + EC_SLAVE_STATE_OP = 0x08, /**< Operational, (Mailbox- + Kommunikation und Input/Output Update) */ + EC_ACK = 0x10 /**< Acknoledge-Bit beim Zustandswechsel + (dies ist kein eigener Zustand) */ } ec_slave_state_t; /*****************************************************************************/ #endif + +/* Emacs-Konfiguration +;;; Local Variables: *** +;;; c-basic-offset:4 *** +;;; End: *** +*/