File: /home/oboss/Users/gec/sources/PUS_Services/Event_Action/event_action-service.ads

1     --% Compilation Unit: Event_Action.Service
2     --
3     --% Category: Generic Package Declaration
4     --
5     --% Release:  $Name:  $
6     --
7     --% Version:  $Revision: 1.2 $
8     --
9     --% Author:   $Author: jhl $
10     --
11     --% Revision Log:
12     --    $Log: event_action-service.ads,v $
13     --    Revision 1.2  2003/10/09 11:05:24  jhl
14     --    Added Service 13 And 19
15     --
16     --    Revision 1.1.2.2  2003/10/06 12:17:17  jhl
17     --    Event Action Post Review first update
18     --
19     --    Revision 1.1.2.1  2003/10/01 11:54:35  jhl
20     --    Initial version of service 13 Event Action, and 19 Large Data Transfer.
21     --
22     --    Revision 2.0  2003/04/04 10:08:58  gec
23     --    Initial release serving as baseline for OBOSS-III project.
24     --
25     --    Revision 1.1.1.1  2003/04/04 07:19:20  gec
26     --    Imported using TkCVS
27     --
28     --
29     --
30     --% Project: OBOSS
31     --
32     --% Copyright (C) 2003 by Terma A/S
33     --  Proprietary and intellectual rights of Terma A/S, Denmark,
34     --  are involved in the subject-matter of this material and
35     --  all manufacturing, reproduction, use, disclosure, and
36     --  sales rights pertaining to such subject-matter are
37     --  expressly reserved. This material is submitted for a
38     --  specific purpose as agreed, and the recipient by
39     --  accepting this material agrees that this material will
40     --  not be used, copied, or reproduced in whole or in part
41     --  nor its contents revealed in any manner or to any person,
42     --  except to meet the purpose for which it was submitted and
43     --  subject to the terms of the agreement.
44     --
45     --% Target Dependencies:
46     --    None
47     --% Compiler Dependencies:
48     --    None
49     
50     --~-----------------------------------------------------------------------------
51     
52     with Task_Priority_Control;
53     with Event_Action.Detection_List;
54     with Event_Action.Event_Reporter;
55     generic
56     
57        --% Generic Parameter Constraints:
58        -->   Detection_List_Priority  - Shall be equal to the ceiling of priorities
59        --+    of all tasks using services from the event action
60     
61        --  Application ID of application process to which this service is
62        --+    associated.
63        Application_Process_ID : in     Mission_Parameters.APID;
64     
65        -- Maximum number of events in event detection list
66        Max_Detection_List_Length : in     Positive;
67     
68        -- Maximum number of "Add Events" in an Event Action Telecommand
69        Max_Add_Events : in     Positive;
70     
71        -- Maximum number of "Delete Events" in an Event Action  Telecommand
72        Max_Delete_Events : in     Positive;
73     
74        -- Maximum number of action controls (Enable/Disable) in an Event Action
75        --+     Telecommand
76        Max_Action_Controls : in     Positive;
77     
78        -- PUS Packet deposit function
79        with function Optional_Deposit
80              (PUS_Packet :        PUS.Optional_PUS_Packet)
81              return Boolean;
82     
83        -- Task priorities
84     
85        -- Priority of protected object implementing buffering of calls to
86        --+    Handle_PUS_Packet
87        PUS_Handler_Buffer_Priority
88                                    : in     Task_Priority_Control.
89                                      Passive_Task_Priority;
90     
91        -- Maximum number of entries in buffer of calls to Handle_PUS_Packet.
92        -- Should be defined to cater for bursts in arrival of PUS packets for
93        --+    execution
94        PUS_Handler_Buffer_Size : in     Positive;
95     
96        -- Priority and stack size of sporadic task performing PUS packet execution
97        --+    as a response to calls to Handle_PUS_Packet
98        PUS_Handler_Interpreter_Priority
99                                         : in     Task_Priority_Control.
100                                           Active_Task_Priority;
101     
102        PUS_Handler_Interpreter_Stack_Size : in     Natural;
103     
104        -- Priority of critical region making operations on event detection list
105        --+    data structures atomic
106        Detection_List_Priority
107                                : in     Task_Priority_Control.Passive_Task_Priority;
108     
109     package Event_Action.Service is
110     
111        --% Library Package:
112        --    Generic implementation of the event action service (service type  19)
113        --+    as described in the ECSS-70-41A PUS standard.
114        --% Active Tasks:
115        -->   The_PUS_Handler.The_Interpreter - Sporadic
116        --% Passive Tasks:
117        -->   The_Detection_List.The_List.Simple_Map - Passive, protecting the data
118        --+    in the detection list.
119     
120        -- Program error caused by an implementaion error which could no be
121        --+    recovered from.
122        Implementation_Error : exception;
123     
124        --% Subprogram:
125        --    Initialization of generic package instantiation.
126        --% Parameter Constraints:
127        -->   None
128        --% Exceptions Raised:
129        -->   None
130     
131        procedure Initialize;
132     
133        --% Subprogram:
134        --    Handle the TC or TM packet delivered to the Event Action Service.
135        --% Parameter Constraints:
136        -->   None
137        --% Exceptions Raised:
138        -->   None
139     
140        procedure Handle_PUS_Packet
141              (PUS_Packet : in     PUS.PUS_Packet);
142     
143     private
144     
145        -- Package instantiations with types and functionality, for use in private
146        --+    generic children
147     
148        --% Library Package:
149        --    Instantiation of the event action service detection list.
150     
151        package The_Detection_List is new Event_Action.Detection_List
152                 (Application_Process_ID    => Application_Process_ID,
153                  Max_Detection_List_Length => Max_Detection_List_Length,
154                  Detection_List_Priority   => Detection_List_Priority);
155     
156        --% Library Package:
157        --    Instantiation of the event reporter
158     
159        package The_Event_Reporter is new Event_Action.Event_Reporter
160                 (Application_Process_ID => Application_Process_ID,
161                  Optional_Deposit       => Optional_Deposit);
162     
163     end Event_Action.service;
164     
165     --~-----------------------------------------------------------------------------
166