]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - doc/txt/tep106.txt
Swapping HEAD and DEVEL branches
[tinyos-2.x.git] / doc / txt / tep106.txt
index f84f0c4fa0bb80a291f15e134be96dcc312b4647..4c9d1e5deb61d3e50df58ec4319aebb6b7ae79da 100644 (file)
@@ -351,16 +351,21 @@ For a module to have an earliest deadline first task, it uses the
 TaskEdf interface. Its configuration SHOULD wire it to TinySchedulerC.
 The key used for task unique identifiers MUST be "TinySchedulerC.TaskInterface",
 where *TaskInterface* is the name of the new task interface as presented
-by the scheduler.  For example, the module SomethingP requires two EDF
-tasks::
+by the scheduler.  A common way to make sure a consistent string is used
+is to #define it. For example, TaskEdf.nc might include::
+
+#define UQ_TASK_EDF "TinySchedulerC.TaskEdf"
 
+In this example, the module SomethingP requires two EDF
+tasks::
+  
   configuration SomethingC {  
     ...  
   }  
   implementation {  
     components SomethingP, TinySchedulerC;  
-    SomethingP.SendTask -> TinySchedulerC.TaskEdf["TinySchedulerC.TaskEdf"];  
-    SomethingP.SenseTask -> TinySchedulerC.TaskEdf["TinySchedulerC.TaskEdf"];  
+    SomethingP.SendTask -> TinySchedulerC.TaskEdf[unique(UQ_TASK_EDF)];  
+    SomethingP.SenseTask -> TinySchedulerC.TaskEdf[unique(UQ_TASK_EDF)];  
   }  
 
 The module SomethingP also has a basic task. The nesC compiler