diff --git a/master/datagram.c b/master/datagram.c index e8554bec5a6c7bd9960a023f22e07eb534dbd9f2..a0304bd699152411e379c8215bc9113bc9c4d515 100644 --- a/master/datagram.c +++ b/master/datagram.c @@ -78,7 +78,6 @@ void ec_datagram_init(ec_datagram_t *datagram /**< EtherCAT datagram */) datagram->index = 0x00; datagram->working_counter = 0x00; datagram->state = EC_DATAGRAM_INIT; - datagram->cycles_queued = 0; datagram->cycles_sent = 0; datagram->jiffies_sent = 0; datagram->cycles_received = 0; diff --git a/master/datagram.h b/master/datagram.h index 0cb48721618ab3613909451e0b41e335480da5b8..b4519df1e5852d8b790acec56c3aea8413d849ec 100644 --- a/master/datagram.h +++ b/master/datagram.h @@ -72,12 +72,12 @@ ec_datagram_type_t; typedef enum { - EC_DATAGRAM_INIT, /**< new datagram */ - EC_DATAGRAM_QUEUED, /**< datagram queued by master */ - EC_DATAGRAM_SENT, /**< datagram has been sent and still in the queue */ - EC_DATAGRAM_RECEIVED, /**< datagram has been received and dequeued */ - EC_DATAGRAM_TIMED_OUT, /**< datagram timed out and was dequeued */ - EC_DATAGRAM_ERROR /**< error while sending/receiving, datagram dequeued */ + EC_DATAGRAM_INIT, /**< new datagram */ + EC_DATAGRAM_QUEUED, /**< datagram queued for sending */ + EC_DATAGRAM_SENT, /**< datagram has been sent (still in the queue) */ + EC_DATAGRAM_RECEIVED, /**< datagram has been received (dequeued) */ + EC_DATAGRAM_TIMED_OUT, /**< datagram timed out (dequeued) */ + EC_DATAGRAM_ERROR /**< error while sending/receiving (dequeued) */ } ec_datagram_state_t; @@ -119,11 +119,10 @@ typedef struct uint8_t index; /**< datagram index (set by master) */ uint16_t working_counter; /**< working counter */ ec_datagram_state_t state; /**< datagram state */ - cycles_t cycles_queued; /**< time, the datagram was queued */ cycles_t cycles_sent; /**< time, the datagram was sent */ - unsigned long jiffies_sent; /**< jiffies when datagram was sent */ - cycles_t cycles_received; /**< time, the datagram was received */ - unsigned long jiffies_received; /**< jiffies when datagram was received */ + 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. */ } ec_datagram_t; diff --git a/master/master.c b/master/master.c index 4af7b388cc608690f7df4bdf710a54758ab8d298..6b590bc518c6bc1a7d7d9b119f3fdd0ba458faf0 100644 --- a/master/master.c +++ b/master/master.c @@ -487,7 +487,6 @@ void ec_master_queue_datagram(ec_master_t *master, /**< EtherCAT master */ list_add_tail(&datagram->queue, &master->datagram_queue); datagram->state = EC_DATAGRAM_QUEUED; - datagram->cycles_queued = get_cycles(); } /*****************************************************************************/