equal
deleted
inserted
replaced
44 #include <linux/list.h> |
44 #include <linux/list.h> |
45 #include <linux/time.h> |
45 #include <linux/time.h> |
46 #include <linux/timex.h> |
46 #include <linux/timex.h> |
47 |
47 |
48 #include "globals.h" |
48 #include "globals.h" |
|
49 |
|
50 /*****************************************************************************/ |
|
51 |
|
52 /** size of the datagram description string */ |
|
53 #define EC_DATAGRAM_NAME_SIZE 20 |
49 |
54 |
50 /*****************************************************************************/ |
55 /*****************************************************************************/ |
51 |
56 |
52 /** |
57 /** |
53 EtherCAT datagram type. |
58 EtherCAT datagram type. |
101 uint16_t working_counter; /**< working counter */ |
106 uint16_t working_counter; /**< working counter */ |
102 ec_datagram_state_t state; /**< datagram state */ |
107 ec_datagram_state_t state; /**< datagram state */ |
103 cycles_t cycles_sent; /**< time, the datagram was sent */ |
108 cycles_t cycles_sent; /**< time, the datagram was sent */ |
104 unsigned long jiffies_sent; /**< jiffies, when the datagram was sent */ |
109 unsigned long jiffies_sent; /**< jiffies, when the datagram was sent */ |
105 cycles_t cycles_received; /**< time, when the datagram was received */ |
110 cycles_t cycles_received; /**< time, when the datagram was received */ |
106 unsigned long jiffies_received; /**< jiffies, when the datagram was rec. */ |
111 unsigned long jiffies_received; /**< jiffies the datagram was received */ |
|
112 unsigned int skip_count; /**< number of requeues when not yet received */ |
|
113 unsigned long stats_output_jiffies; /**< last statistics output */ |
|
114 char name[EC_DATAGRAM_NAME_SIZE]; /**< description of the datagram */ |
107 } |
115 } |
108 ec_datagram_t; |
116 ec_datagram_t; |
109 |
117 |
110 /*****************************************************************************/ |
118 /*****************************************************************************/ |
111 |
119 |
120 int ec_datagram_brd(ec_datagram_t *, uint16_t, size_t); |
128 int ec_datagram_brd(ec_datagram_t *, uint16_t, size_t); |
121 int ec_datagram_bwr(ec_datagram_t *, uint16_t, size_t); |
129 int ec_datagram_bwr(ec_datagram_t *, uint16_t, size_t); |
122 int ec_datagram_lrw(ec_datagram_t *, uint32_t, size_t); |
130 int ec_datagram_lrw(ec_datagram_t *, uint32_t, size_t); |
123 |
131 |
124 void ec_datagram_print_wc_error(const ec_datagram_t *); |
132 void ec_datagram_print_wc_error(const ec_datagram_t *); |
|
133 void ec_datagram_output_stats(ec_datagram_t *datagram); |
125 |
134 |
126 /*****************************************************************************/ |
135 /*****************************************************************************/ |
127 |
136 |
128 #endif |
137 #endif |