diff -r 7bc131b92039 -r 07fd94c5119d master/datagram.h --- a/master/datagram.h Fri Aug 10 15:27:08 2007 +0000 +++ b/master/datagram.h Thu Sep 13 11:08:46 2007 +0000 @@ -49,6 +49,11 @@ /*****************************************************************************/ +/** size of the datagram description string */ +#define EC_DATAGRAM_NAME_SIZE 20 + +/*****************************************************************************/ + /** EtherCAT datagram type. */ @@ -84,28 +89,6 @@ /*****************************************************************************/ /** - EtherCAT address. -*/ - -typedef union -{ - /** - * Physical address. - */ - struct - { - uint16_t slave; /**< configured or autoincrement address */ - uint16_t mem; /**< physical memory address */ - } - physical; - - uint32_t logical; /**< logical address */ -} -ec_address_t; - -/*****************************************************************************/ - -/** EtherCAT datagram. */ @@ -115,7 +98,7 @@ struct list_head queue; /**< master datagram queue item */ struct list_head sent; /**< master list item for sent datagrams */ ec_datagram_type_t type; /**< datagram type (APRD, BWR, etc) */ - ec_address_t address; /**< recipient address */ + uint8_t address[EC_ADDR_LEN]; /**< recipient address */ uint8_t *data; /**< datagram data */ size_t mem_size; /**< datagram \a data memory size */ size_t data_size; /**< size of the data in \a data */ @@ -125,7 +108,10 @@ cycles_t cycles_sent; /**< time, the datagram was sent */ unsigned long jiffies_sent; /**< jiffies, when the datagram was sent */ cycles_t cycles_received; /**< time, when the datagram was received */ - unsigned long jiffies_received; /**< jiffies, when the datagram was rec. */ + unsigned long jiffies_received; /**< jiffies the datagram was received */ + unsigned int skip_count; /**< number of requeues when not yet received */ + unsigned long stats_output_jiffies; /**< last statistics output */ + char name[EC_DATAGRAM_NAME_SIZE]; /**< description of the datagram */ } ec_datagram_t; @@ -143,6 +129,9 @@ int ec_datagram_bwr(ec_datagram_t *, uint16_t, size_t); int ec_datagram_lrw(ec_datagram_t *, uint32_t, size_t); +void ec_datagram_print_wc_error(const ec_datagram_t *); +void ec_datagram_output_stats(ec_datagram_t *datagram); + /*****************************************************************************/ #endif