master/datagram.h
changeset 511 73fb3c35e53d
parent 398 ff37601361a8
child 527 3eea08638522
equal deleted inserted replaced
510:0d0c6fe0e3b2 511:73fb3c35e53d
    70    EtherCAT datagram state.
    70    EtherCAT datagram state.
    71 */
    71 */
    72 
    72 
    73 typedef enum
    73 typedef enum
    74 {
    74 {
    75     EC_DATAGRAM_INIT, /**< new datagram */
    75     EC_DATAGRAM_INIT,      /**< new datagram */
    76     EC_DATAGRAM_QUEUED, /**< datagram queued by master */
    76     EC_DATAGRAM_QUEUED,    /**< datagram queued for sending */
    77     EC_DATAGRAM_SENT, /**< datagram has been sent and still in the queue */
    77     EC_DATAGRAM_SENT,      /**< datagram has been sent (still in the queue) */
    78     EC_DATAGRAM_RECEIVED, /**< datagram has been received and dequeued */
    78     EC_DATAGRAM_RECEIVED,  /**< datagram has been received (dequeued) */
    79     EC_DATAGRAM_TIMED_OUT, /**< datagram timed out and was dequeued */
    79     EC_DATAGRAM_TIMED_OUT, /**< datagram timed out (dequeued) */
    80     EC_DATAGRAM_ERROR /**< error while sending/receiving, datagram dequeued */
    80     EC_DATAGRAM_ERROR      /**< error while sending/receiving (dequeued) */
    81 }
    81 }
    82 ec_datagram_state_t;
    82 ec_datagram_state_t;
    83 
    83 
    84 /*****************************************************************************/
    84 /*****************************************************************************/
    85 
    85 
   117     size_t mem_size; /**< datagram \a data memory size */
   117     size_t mem_size; /**< datagram \a data memory size */
   118     size_t data_size; /**< size of the data in \a data */
   118     size_t data_size; /**< size of the data in \a data */
   119     uint8_t index; /**< datagram index (set by master) */
   119     uint8_t index; /**< datagram index (set by master) */
   120     uint16_t working_counter; /**< working counter */
   120     uint16_t working_counter; /**< working counter */
   121     ec_datagram_state_t state; /**< datagram state */
   121     ec_datagram_state_t state; /**< datagram state */
   122     cycles_t cycles_queued; /**< time, the datagram was queued */
       
   123     cycles_t cycles_sent; /**< time, the datagram was sent */
   122     cycles_t cycles_sent; /**< time, the datagram was sent */
   124     unsigned long jiffies_sent; /**< jiffies when datagram was sent */
   123     unsigned long jiffies_sent; /**< jiffies, when the datagram was sent */
   125     cycles_t cycles_received; /**< time, the datagram was received */
   124     cycles_t cycles_received; /**< time, when the datagram was received */
   126     unsigned long jiffies_received; /**< jiffies when datagram was received */
   125     unsigned long jiffies_received; /**< jiffies, when the datagram was rec. */
   127 }
   126 }
   128 ec_datagram_t;
   127 ec_datagram_t;
   129 
   128 
   130 /*****************************************************************************/
   129 /*****************************************************************************/
   131 
   130