]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/liborte/htimerNtp.c
Document gAVL, linked list and queue declaration
[orte.git] / orte / liborte / htimerNtp.c
index 8ef0ba56d25bdbfb7f90e0dae398ed4c930748ce..5a40ddb8c4b5812910bb477e6efa3b1bbed00aea 100644 (file)
@@ -2,9 +2,19 @@
  *  $Id: htimerNtp.c,v 0.0.0.1          2003/08/21 
  *
  *  DEBUG:  section 2                   HTimer for NtpTime
- *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
  *
- *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
+ *  -------------------------------------------------------------------  
+ *                                ORTE                                 
+ *                      Open Real-Time Ethernet                       
+ *                                                                    
+ *                      Copyright (C) 2001-2006                       
+ *  Department of Control Engineering FEE CTU Prague, Czech Republic  
+ *                      http://dce.felk.cvut.cz                       
+ *                      http://www.ocera.org                          
+ *                                                                    
+ *  Author:             Petr Smolik    petr.smolik@wo.cz             
+ *  Advisor:            Pavel Pisa                                   
+ *  Project Responsible: Zdenek Hanzalek                              
  *  --------------------------------------------------------------------
  *
  *  This program is free software; you can redistribute it and/or modify
  *  
  */ 
 
+#define UL_HTIMER_INC_FROM_BASE
+
 #include "orte_all.h"
 
-GAVL_FLES_INT_DEC(ul_htim_queue, ul_htim_queue_t, ul_htim_node_t, ul_htim_time_t,
-  timers, node, expires, ul_htimer_cmp_fnc)
+GAVL_FLES_INT_DEC(ul_htim_queue,       /* prefix */
+                 ul_htim_queue_t,      /* root_t */
+                 ul_htim_node_t,       /* item_t */
+                 ul_htim_time_t,       /* key_t */
+                 timers,               /* root_field */
+                 node,                 /* item_node */
+                 expires,              /* item_key */
+                 ul_htimer_cmp_fnc)    /* cmp_fnc */
 
 
 GAVL_FLES_INT_IMP(ul_htim_queue, ul_htim_queue_t, ul_htim_node_t, ul_htim_time_t,
@@ -155,7 +173,7 @@ htimerUnicastSendMetatraffic_run_expired(ORTEDomain *d,
     debug(2,10) ("htimerUnicastMetatraffic: %s\n",
                   timer->name);               
     retValue=timer->func(d,timer->arg1);
-    while (d->mbSend.needSend) {
+    while (d->taskSend.mb.needSend) {
       ORTESendData(d,objectEntryAID,ORTE_TRUE);
       timer->func(d,timer->arg1);
     }
@@ -163,7 +181,7 @@ htimerUnicastSendMetatraffic_run_expired(ORTEDomain *d,
       pthread_rwlock_unlock(timer->lock);
   }
   htimerUnicastSendMetatraffic_update_root_timer(&d->objectEntry,objectEntryAID);
-  if (d->mbSend.cdrStream.length>RTPS_HEADER_LENGTH) {
+  if (d->taskSend.mb.cdrCodec.wptr>RTPS_HEADER_LENGTH) {
       ORTESendData(d,objectEntryAID,ORTE_TRUE);
   }
 } 
@@ -215,7 +233,7 @@ htimerUnicastSendUserData_run_expired(ORTEDomain *d,
     if (timer->lock)
       pthread_rwlock_wrlock(timer->lock);
     retValue=timer->func(d,timer->arg1);
-    while (d->mbSend.needSend) {
+    while (d->taskSend.mb.needSend) {
       ORTESendData(d,objectEntryAID,ORTE_FALSE);
       timer->func(d,timer->arg1);
     }
@@ -223,7 +241,7 @@ htimerUnicastSendUserData_run_expired(ORTEDomain *d,
       pthread_rwlock_unlock(timer->lock);
   }
   htimerUnicastSendUserData_update_root_timer(&d->objectEntry,objectEntryAID);
-  if (d->mbSend.cdrStream.length>RTPS_HEADER_LENGTH) {
+  if (d->taskSend.mb.cdrCodec.wptr>RTPS_HEADER_LENGTH) {
       ORTESendData(d,objectEntryAID,ORTE_FALSE);
   }
 }