node.tmplt 986 Bytes
Newer Older
1
2
3
4
5
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@   : Name of the node from deployment view
@@-- @_Partition_Names_@ : Tag listing the partitions in this node
@@-- @_Partitions_@  : List of rendered code for partitions
6
@@-- @_CPU_Name_@, _Platform_@, _Classifier_@, _Ada_Runtime_@ : Info about CPU
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@@-- In standard TASTE systems there is only one partition per node
@@-- Ada basic runtime (body)
with System,
     Ada.Real_Time,
     System_Time;

use System;

package body @_CAPITALIZE:Node_Name_@ is

   package body Periodic_Task is
      task body Periodic_Thread is
         use Ada.Real_Time;
         Next_Period : Time := System_Start_Time + Offset;
      begin
         Init;
         loop
            delay until Next_Period;
            Cyclic_Operation;
            Next_Period := Next_Period + Milliseconds (Period);
         end loop;
      end Periodic_Thread;
   end Periodic_Task;

   @_Partitions'Indent_@

end @_CAPITALIZE:Node_Name_@;