master/device.h
branchredundancy
changeset 2158 69f2b2702336
parent 1863 8ea4a79dfe84
child 2372 d895cd1db2bf
equal deleted inserted replaced
2157:8fa0571f9996 2158:69f2b2702336
    99 
    99 
   100     // Frame statistics
   100     // Frame statistics
   101     u64 tx_count; /**< Number of frames sent. */
   101     u64 tx_count; /**< Number of frames sent. */
   102     u64 last_tx_count; /**< Number of frames sent of last statistics cycle. */
   102     u64 last_tx_count; /**< Number of frames sent of last statistics cycle. */
   103     u64 rx_count; /**< Number of frames received. */
   103     u64 rx_count; /**< Number of frames received. */
   104     u64 tx_bytes; /**< Number of frames sent. */
   104     u64 last_rx_count; /**< Number of frames received of last statistics
       
   105                          cycle. */
       
   106     u64 tx_bytes; /**< Number of bytes sent. */
   105     u64 last_tx_bytes; /**< Number of bytes sent of last statistics cycle. */
   107     u64 last_tx_bytes; /**< Number of bytes sent of last statistics cycle. */
       
   108     u64 rx_bytes; /**< Number of bytes received. */
       
   109     u64 last_rx_bytes; /**< Number of bytes received of last statistics cycle.
       
   110                         */
   106     u64 tx_errors; /**< Number of transmit errors. */
   111     u64 tx_errors; /**< Number of transmit errors. */
   107     u64 last_loss; /**< Tx/Rx difference of last statistics cycle. */
       
   108     unsigned int tx_frame_rates[EC_RATE_COUNT]; /**< Transmit rates in
   112     unsigned int tx_frame_rates[EC_RATE_COUNT]; /**< Transmit rates in
       
   113                                                   frames/s for different
       
   114                                                   statistics cycle periods. */
       
   115     unsigned int rx_frame_rates[EC_RATE_COUNT]; /**< Receive rates in
   109                                                   frames/s for different
   116                                                   frames/s for different
   110                                                   statistics cycle periods. */
   117                                                   statistics cycle periods. */
   111     unsigned int tx_byte_rates[EC_RATE_COUNT]; /**< Transmit rates in byte/s
   118     unsigned int tx_byte_rates[EC_RATE_COUNT]; /**< Transmit rates in byte/s
   112                                                  for different statistics
   119                                                  for different statistics
   113                                                  cycle periods. */
   120                                                  cycle periods. */
   114     int loss_rates[EC_RATE_COUNT]; /**< Frame loss rates for different
   121     unsigned int rx_byte_rates[EC_RATE_COUNT]; /**< Receive rates in byte/s
   115                                      statistics cycle periods. */
   122                                                  for different statistics
   116     unsigned long stats_jiffies; /**< Jiffies of last statistic cycle. */
   123                                                  cycle periods. */
   117 
   124 
   118 #ifdef EC_DEBUG_IF
   125 #ifdef EC_DEBUG_IF
   119     ec_debug_t dbg; /**< debug device */
   126     ec_debug_t dbg; /**< debug device */
   120 #endif
   127 #endif
   121 #ifdef EC_DEBUG_RING
   128 #ifdef EC_DEBUG_RING
   139 
   146 
   140 void ec_device_poll(ec_device_t *);
   147 void ec_device_poll(ec_device_t *);
   141 uint8_t *ec_device_tx_data(ec_device_t *);
   148 uint8_t *ec_device_tx_data(ec_device_t *);
   142 void ec_device_send(ec_device_t *, size_t);
   149 void ec_device_send(ec_device_t *, size_t);
   143 void ec_device_clear_stats(ec_device_t *);
   150 void ec_device_clear_stats(ec_device_t *);
       
   151 void ec_device_update_stats(ec_device_t *);
   144 
   152 
   145 #ifdef EC_DEBUG_RING
   153 #ifdef EC_DEBUG_RING
   146 void ec_device_debug_ring_append(ec_device_t *, ec_debug_frame_dir_t,
   154 void ec_device_debug_ring_append(ec_device_t *, ec_debug_frame_dir_t,
   147         const void *, size_t);
   155         const void *, size_t);
   148 void ec_device_debug_ring_print(const ec_device_t *);
   156 void ec_device_debug_ring_print(const ec_device_t *);