File: /home/oboss/Users/gec/sources/CDH_Structure/Dynamic_Application_Process_Descrs/appl_proc_descr_manager.ads

1     --% Compilation Unit: Appl_Proc_Descr_Manager
2     --
3     --% Category: Package Declaration
4     --
5     --% Release:  $Name:  $
6     --
7     --% Version:  $Revision: 2.1 $
8     --
9     --% Author:   $Author: gec $
10     --
11     --% Revision Log:
12     --    $Log: appl_proc_descr_manager.ads,v $
13     --    Revision 2.1  2003/11/13 14:57:36  gec
14     --    Merged ECSS Migration branch to main trunk.
15     --
16     --    Revision 2.0.8.2  2003/10/29 15:38:09  gec
17     --    Added support for management of telemetry packet subcounters.
18     --
19     --    Revision 2.0.8.1  2003/10/29 07:17:39  gec
20     --    Packet headers and data field headers updated to be compliant to ECSS
21     --+    Telemetry & Telecommand Packet Utilization standard.
22     --
23     --    Revision 2.0  2003/04/04 08:50:21  gec
24     --    Initial release of source files serving as baseline for OBOSS-III
25     --+    project.
26     --
27     --    Revision 1.1.1.1  2003/04/04 08:13:09  gec
28     --    Imported using TkCVS
29     --
30     --
31     --
32     --% Project: OBOSS
33     --
34     --% Copyright (C) 2003 by Terma A/S
35     --  Proprietary and intellectual rights of Terma A/S, Denmark,
36     --  are involved in the subject-matter of this material and
37     --  all manufacturing, reproduction, use, disclosure, and
38     --  sales rights pertaining to such subject-matter are
39     --  expressly reserved. This material is submitted for a
40     --  specific purpose as agreed, and the recipient by
41     --  accepting this material agrees that this material will
42     --  not be used, copied, or reproduced in whole or in part
43     --  nor its contents revealed in any manner or to any person,
44     --  except to meet the purpose for which it was submitted and
45     --  subject to the terms of the agreement.
46     --
47     --% Target Dependencies:
48     --    None
49     --% Compiler Dependencies:
50     --    None
51     
52     --~-----------------------------------------------------------------------------
53     
54     with Parameter_Representation;
55     with Mission_Parameters;
56     with PUS;
57     with PUS_Data_Types;
58     with PUS_State;
59     with Verification_Types;
60     with Parameter_Representation_Constraints;
61     with Packet_Counters_Manager;
62     with Storage_Selection_Manager;
63     package Appl_Proc_Descr_Manager is
64     
65        --% Library Package:
66        --    Management of application process descriptors including TC and TM
67        --+    counters as well as storage selection criteria.
68        --% Active Tasks:
69        -->   None
70        --% Passive Tasks:
71        -->   None
72     
73        subtype TC_Sequence_Counters is
74              Packet_Counters_Manager.TC_Sequence_Counters;
75        subtype TM_Sequence_Counters is
76              Packet_Counters_Manager.TM_Sequence_Counters;
77     
78        subtype Appl_Proc_Descr is Packet_Counters_Manager.Appl_Proc_Descr;
79     
80     
81        --% Subprogram:
82        --    Initialization of application process descriptors
83        --% Parameter Constraints:
84        -->   None
85        --% Exceptions Raised:
86        -->   None
87     
88        procedure Init_Appl_Proc_Descr
89              (Appl_ID : in     Mission_Parameters.APID;
90               Descr   : in     Appl_Proc_Descr)
91              renames Packet_Counters_Manager.Init_Appl_Proc_Descr;
92     
93     
94        --% Subprogram:
95        --    Increment and return TC counter
96        --% Parameter Constraints:
97        -->   None
98        --% Exceptions Raised:
99        -->   None
100     
101        function Get_Next_TC_Counter
102              (Source_APID      :        Mission_Parameters.Source_ID;
103               Destination_APID :        Mission_Parameters.APID)
104              return PUS_Data_Types.Sequence_Count
105              renames Packet_Counters_Manager.Get_Next_TC_Counter;
106     
107     
108        --% Subprogram:
109        --    Increment and return TM counter
110        --% Parameter Constraints:
111        -->   None
112        --% Exceptions Raised:
113        -->   None
114     
115        function Get_Next_TM_Counter
116              (Source_APID      :        Mission_Parameters.APID;
117               Destination_APID :        Mission_Parameters.Destination_ID)
118              return PUS_Data_Types.Sequence_Count
119              renames Packet_Counters_Manager.Get_Next_TM_Counter;
120     
121        --% Subprogram:
122        --    Increment and return TM packet sub-counter
123        --% Parameter Constraints:
124        -->   None
125        --% Exceptions Raised:
126        -->   None
127     
128        function Get_Next_TM_Packet_Subcounter
129              (Source_APID      :        Mission_Parameters.APID;
130               Destination_APID :        Mission_Parameters.Destination_ID;
131               Service          :        PUS_Data_Types.Service_Name)
132              return PUS_Data_Types.Packet_Subcount
133              renames Packet_Counters_Manager.Get_Next_TM_Packet_Subcounter;
134     
135        subtype Packet_Store_Subtypes_Index is
136              Storage_Selection_Manager.Packet_Store_Subtypes_Index;
137        subtype Packet_Subtype_Array        is
138              Storage_Selection_Manager.Packet_Subtype_Array;
139     
140     
141        --% Subprogram:
142        --    Enable a specific on-board store for packets from a specific
143        --+    application process
144        --% Parameter Constraints:
145        -->   None
146        --% Exceptions Raised:
147        -->   None
148     
149        function Enable_Storage
150              (Source_APID :        Mission_Parameters.APID;
151               Storage_ID  :        Mission_Parameters.Packet_Store_ID)
152              return Verification_Types.Result
153              renames Storage_Selection_Manager.Enable_Storage;
154     
155     
156        --% Subprogram:
157        --    Disable a specific on-board store for packets from a specific
158        --+    application process
159        --% Parameter Constraints:
160        -->   None
161        --% Exceptions Raised:
162        -->   None
163     
164        function Disable_Storage
165              (Source_APID :        Mission_Parameters.APID;
166               Storage_ID  :        Mission_Parameters.Packet_Store_ID)
167              return Verification_Types.Result
168              renames Storage_Selection_Manager.Disable_Storage;
169     
170     
171        --% Subprogram:
172        --    Add all packet types to the selection definitions of a specific
173        --+    on-board store for packets from a specific application process
174        --% Parameter Constraints:
175        -->   None
176        --% Exceptions Raised:
177        -->   None
178     
179        function Add_All_Storage_Selection_Def
180              (Source_APID :        Mission_Parameters.APID;
181               Storage_ID  :        Mission_Parameters.Packet_Store_ID)
182              return Verification_Types.Result
183              renames Storage_Selection_Manager.Add_All_Storage_Selection_Def;
184     
185     
186        --% Subprogram:
187        --    Add a service type to the selection definitions of a specific on-board
188        --+    store for packets from a specific application process
189        --% Parameter Constraints:
190        -->   None
191        --% Exceptions Raised:
192        -->   None
193     
194        function Add_All_Subtypes_Storage_Selection_Def
195              (Source_APID :        Mission_Parameters.APID;
196               Storage_ID  :        Mission_Parameters.Packet_Store_ID;
197               Service     :        PUS_Data_Types.Service_Type)
198              return Verification_Types.Result
199              renames Storage_Selection_Manager.
200                 Add_All_Subtypes_Storage_Selection_Def;
201     
202     
203        --% Subprogram:
204        --    Add specific service subtypes to the selection definitions of a
205        --+    specific on-board store for packets from a specific application
206        --+    process
207        --% Parameter Constraints:
208        -->   None
209        --% Exceptions Raised:
210        -->   None
211     
212        function Add_Specific_Subtypes_Storage_Selection_Def
213              (Source_APID :        Mission_Parameters.APID;
214               Storage_ID  :        Mission_Parameters.Packet_Store_ID;
215               Service     :        PUS_Data_Types.Service_Type;
216               Subservices :        Packet_Subtype_Array)
217              return Verification_Types.Result
218              renames Storage_Selection_Manager.
219                 Add_Specific_Subtypes_Storage_Selection_Def;
220     
221     
222        --% Subprogram:
223        --    Remove all packet types from the selection definitions of a specific
224        --+    on-board store for packets from a specific application process
225        --% Parameter Constraints:
226        -->   None
227        --% Exceptions Raised:
228        -->   None
229     
230        function Remove_All_Storage_Selection_Def
231              (Source_APID :        Mission_Parameters.APID;
232               Storage_ID  :        Mission_Parameters.Packet_Store_ID)
233              return Verification_Types.Result
234              renames Storage_Selection_Manager.Remove_All_Storage_Selection_Def;
235     
236     
237        --% Subprogram:
238        --    Remove a service type from the selection definitions of a specific
239        --+    on-board store for packets from a specific application process
240        --% Parameter Constraints:
241        -->   None
242        --% Exceptions Raised:
243        -->   None
244     
245        function Remove_All_Subtypes_Storage_Selection_Def
246              (Source_APID :        Mission_Parameters.APID;
247               Storage_ID  :        Mission_Parameters.Packet_Store_ID;
248               Service     :        PUS_Data_Types.Service_Type)
249              return Verification_Types.Result
250              renames Storage_Selection_Manager.
251                 Remove_All_Subtypes_Storage_Selection_Def;
252     
253     
254        --% Subprogram:
255        --    Remove specific service subtypes from the selection definitions of a
256        --+    specific on-board store for packets from a specific application
257        --+    process
258        --% Parameter Constraints:
259        -->   None
260        --% Exceptions Raised:
261        -->   None
262     
263        function Remove_Specific_Subtypes_Storage_Selection_Def
264              (Source_APID :        Mission_Parameters.APID;
265               Storage_ID  :        Mission_Parameters.Packet_Store_ID;
266               Service     :        PUS_Data_Types.Service_Type;
267               Subservices :        Packet_Subtype_Array)
268              return Verification_Types.Result
269              renames Storage_Selection_Manager.
270                 Remove_Specific_Subtypes_Storage_Selection_Def;
271     
272     
273        --% Subprogram:
274        --    Check whether a given service type is currently selected for storage
275        --+    in a specific on-board store for packets from a specific application
276        --+    process
277        --% Parameter Constraints:
278        -->   None
279        --% Exceptions Raised:
280        -->   None
281     
282        function Is_Storage_Selection_Service_Present
283              (Source_APID :        Mission_Parameters.APID;
284               Storage_ID  :        Mission_Parameters.Packet_Store_ID;
285               Service     :        PUS_Data_Types.Service_Type)
286              return Boolean
287              renames Storage_Selection_Manager.
288                 Is_Storage_Selection_Service_Present;
289     
290     
291        --% Subprogram:
292        --    Check whether all packet types are currently selected for storage in a
293        --+    specific on-board store for packets from a specific application
294        --+    process
295        --% Parameter Constraints:
296        -->   None
297        --% Exceptions Raised:
298        -->   None
299     
300        function Is_Storage_Selection_All_Present
301              (Source_APID :        Mission_Parameters.APID;
302               Storage_ID  :        Mission_Parameters.Packet_Store_ID)
303              return Boolean
304              renames Storage_Selection_Manager.Is_Storage_Selection_All_Present;
305     
306     
307        --% Subprogram:
308        --    Extract the current storage selection definitions of a specific
309        --+    on-board store for packets from a specific application process
310        --% Parameter Constraints:
311        -->   None
312        --% Exceptions Raised:
313        -->   None
314     
315        function Get_Storage_Selection_Service_Def
316              (Source_APID :        Mission_Parameters.APID;
317               Storage_ID  :        Mission_Parameters.Packet_Store_ID;
318               Service     :        PUS_Data_Types.Service_Type)
319              return Packet_Subtype_Array
320              renames Storage_Selection_Manager.Get_Storage_Selection_Service_Def;
321     
322     
323        --% Subprogram:
324        --    Determine the application process to which a packet is to be routed
325        --% Parameter Constraints:
326        -->   None
327        --% Exceptions Raised:
328        -->   None
329     
330        function Get_Routing_Destination_APID
331              (TM_Packet :        PUS.PUS_Packet)
332              return Mission_Parameters.APID
333              renames Storage_Selection_Manager.Get_Routing_Destination_APID;
334     
335     
336        --% Subprogram:
337        --    Determine the packet store, if any, in which a TM packet is to be
338        --+    stored
339        --% Parameter Constraints:
340        -->   None
341        --% Exceptions Raised:
342        -->   None
343     
344        procedure Get_Destination_Packet_Store_ID
345              (TM_Packet     : in     PUS.PUS_Packet;
346               Store_Defined :    out Boolean;
347               Store_ID      :    out Mission_Parameters.Packet_Store_ID)
348              renames Storage_Selection_Manager.Get_Destination_Packet_Store_ID;
349     
350     end Appl_Proc_Descr_Manager;
351     
352     --~-----------------------------------------------------------------------------
353