diff -r c21e7c12dd50 -r 674071846ee3 master/master.h --- a/master/master.h Thu Apr 20 13:19:36 2006 +0000 +++ b/master/master.h Thu Apr 20 13:31:31 2006 +0000 @@ -2,7 +2,7 @@ * * m a s t e r . h * - * Struktur für einen EtherCAT-Master. + * EtherCAT master structure. * * $Id$ * @@ -35,61 +35,59 @@ /*****************************************************************************/ /** - EtherCAT-Rahmen-Statistiken. + Cyclic EtherCAT statistics. */ typedef struct { - unsigned int timeouts; /**< Kommando-Timeouts */ - unsigned int delayed; /**< Verzögerte Kommandos */ - unsigned int corrupted; /**< Verfälschte Rahmen */ - unsigned int unmatched; /**< Unpassende Kommandos */ - unsigned int eoe_errors; /**< Ethernet-over-EtherCAT Fehler */ - cycles_t t_last; /**< Timestamp-Counter bei der letzten Ausgabe */ + unsigned int timeouts; /**< command timeouts */ + unsigned int delayed; /**< delayed commands */ + unsigned int corrupted; /**< corrupted frames */ + unsigned int unmatched; /**< unmatched commands */ + unsigned int eoe_errors; /**< Ethernet-over-EtherCAT errors */ + cycles_t t_last; /**< time of last output */ } ec_stats_t; /*****************************************************************************/ /** - EtherCAT-Master - - Verwaltet die EtherCAT-Slaves und kommuniziert mit - dem zugewiesenen EtherCAT-Gerät. + EtherCAT-Master. + Manages slaves, domains and IO. */ struct ec_master { - struct list_head list; /**< Noetig fuer Master-Liste */ - struct kobject kobj; /**< Kernel-Object */ - unsigned int index; /**< Master-Index */ - struct list_head slaves; /**< Liste der Slaves auf dem Bus */ - unsigned int slave_count; /**< Anzahl Slaves auf dem Bus */ - ec_device_t *device; /**< EtherCAT-Gerät */ - struct list_head command_queue; /**< Kommando-Warteschlange */ - uint8_t command_index; /**< Aktueller Kommando-Index */ - struct list_head domains; /**< Liste der Prozessdatendomänen */ - ec_command_t simple_command; /**< Kommando für Initialisierungsphase */ - ec_command_t watch_command; /**< Kommando zum Überwachen der Slaves */ - unsigned int slaves_responding; /**< Anzahl antwortender Slaves */ - ec_slave_state_t slave_states; /**< Zustände der antwortenden Slaves */ - int debug_level; /**< Debug-Level im Master-Code */ - ec_stats_t stats; /**< Rahmen-Statistiken */ - unsigned int timeout; /**< Timeout für synchronen Datenaustausch */ - struct list_head eoe_slaves; /**< Ethernet over EtherCAT Slaves */ - unsigned int reserved; /**< Master durch Echtzeitprozess reserviert */ - struct timer_list freerun_timer; /**< Timer fuer Free-Run-Modus. */ - ec_master_mode_t mode; /**< Modus des Masters */ + struct list_head list; /**< list item */ + struct kobject kobj; /**< kobject */ + unsigned int index; /**< master index */ + struct list_head slaves; /**< list of slaves on the bus */ + unsigned int slave_count; /**< number of slaves on the bus */ + ec_device_t *device; /**< EtherCAT device */ + struct list_head command_queue; /**< command queue */ + uint8_t command_index; /**< current command index */ + struct list_head domains; /**< list of domains */ + ec_command_t simple_command; /**< command structure for initialization */ + ec_command_t watch_command; /**< command for watching the slaves */ + unsigned int slaves_responding; /**< number of responding slaves */ + ec_slave_state_t slave_states; /**< states of the responding slaves */ + int debug_level; /**< master debug level */ + ec_stats_t stats; /**< cyclic statistics */ + unsigned int timeout; /**< timeout in synchronous IO */ + struct list_head eoe_slaves; /**< Ethernet-over-EtherCAT slaves */ + unsigned int reserved; /**< true, if the master is reserved for RT */ + struct timer_list freerun_timer; /**< timer object for free run mode */ + ec_master_mode_t mode; /**< master mode */ }; /*****************************************************************************/ -// Master creation and deletion +// master creation and deletion int ec_master_init(ec_master_t *, unsigned int); void ec_master_clear(struct kobject *); void ec_master_reset(ec_master_t *); -// Free-Run +// free run void ec_master_freerun_start(ec_master_t *); void ec_master_freerun_stop(ec_master_t *); @@ -98,10 +96,10 @@ void ec_master_queue_command(ec_master_t *, ec_command_t *); int ec_master_simple_io(ec_master_t *, ec_command_t *); -// Slave management +// slave management int ec_master_bus_scan(ec_master_t *); -// Misc +// misc. void ec_master_debug(const ec_master_t *); void ec_master_output_stats(ec_master_t *); void ec_master_run_eoe(ec_master_t *); @@ -109,9 +107,3 @@ /*****************************************************************************/ #endif - -/* Emacs-Konfiguration -;;; Local Variables: *** -;;; c-basic-offset:4 *** -;;; End: *** -*/