File: /home/oboss/Users/gec/sources/PUS_Services/HK_Collector/hk_collector.ads
1 --% Compilation Unit: HK_Collector
2 --
3 --% Category: Generic Package Declaration
4 --
5 --% Release: $Name: $
6 --
7 --% Version: $Revision: 2.1 $
8 --
9 --% Author: $Author: gec $
10 --
11 --% Revision Log:
12 -- $Log: hk_collector.ads,v $
13 -- Revision 2.1 2003/11/13 14:57:45 gec
14 -- Merged ECSS Migration branch to main trunk.
15 --
16 -- Revision 2.0.8.1 2003/11/10 13:38:20 gec
17 -- Updated Housekeeping & Diagnostics Reporting Service according to ECSS-E-70-41A.
18 --
19 -- Revision 2.0 2003/04/04 08:51:06 gec
20 -- Initial release of source files serving as baseline for OBOSS-III
21 --+ project.
22 --
23 -- Revision 1.1.1.1 2003/04/04 08:13:12 gec
24 -- Imported using TkCVS
25 --
26 --
27 --
28 --% Project: OBOSS
29 --
30 --% Copyright (C) 2003 by Terma A/S
31 -- Proprietary and intellectual rights of Terma A/S, Denmark,
32 -- are involved in the subject-matter of this material and
33 -- all manufacturing, reproduction, use, disclosure, and
34 -- sales rights pertaining to such subject-matter are
35 -- expressly reserved. This material is submitted for a
36 -- specific purpose as agreed, and the recipient by
37 -- accepting this material agrees that this material will
38 -- not be used, copied, or reproduced in whole or in part
39 -- nor its contents revealed in any manner or to any person,
40 -- except to meet the purpose for which it was submitted and
41 -- subject to the terms of the agreement.
42 --
43 --% Target Dependencies:
44 -- None
45 --% Compiler Dependencies:
46 -- None
47
48 --~-----------------------------------------------------------------------------
49
50 with HK_Collector_Types;
51 with Parameter_Representation;
52 with PUS;
53 with Mission_Parameters;
54 with Parameter_Structure_Descriptions;
55 with HK_Diag_TC_Interpreter;
56 with Standard_Thresholds;
57 with Task_Priority_Control;
58 generic
59
60 --% Generic Parameter Constraints:
61 --> Telecommand_Buffer_Priority - Shall exceed ceiling of any callers of
62 --+ Handle_PUS_Packet and Telecommand_Interpreter_Priority
63 --> HK_Diag_Report_Definition_Priority - Shall be higher than
64 --+ Telecommand_Interpreter_Priority and HK_Diag_Event_Task_Priority
65
66 -- Application process ID of application process providing the service.
67 Application_ID : in Mission_Parameters.APID;
68
69 -- Maximum number of Structure-IDs to be defined at the same time.
70 Max_SIDs : in Positive;
71
72 -- Maximum total number of sampling events to be active at any one time.
73 Max_Sampling_Events : in Positive;
74
75 -- Maximum total number of Simply-Commutated parameters in a given HK/Diag
76 --+ report.
77 Max_Simple_Params : in HK_Collector_Types.Count_Type;
78
79 -- Maximum total number of Super-Commutated parameters in a given HK/Diag
80 --+ report.
81 Max_Super_Params : in HK_Collector_Types.Count_Type;
82
83 -- Maximum number of repetitions for Super-Commutated parameters in a given
84 --+ HK/Diag report.
85 Max_Super_Reps : in HK_Collector_Types.Count_Type;
86
87 -- Predicate returning true if Par_ID is one of the parameter IDs to be
88 --+ monitored.
89 with function Is_Legal_Parameter_ID
90 (Par_ID : Parameter_Structure_Descriptions.Parameter_ID)
91 return Boolean;
92
93 -- Roberto 12/09/2001
94 -- Operation acquiring the current value for parameter identified by
95 --+ P_Addr.
96 with function Receive
97 (P_Addr : in Parameter_Structure_Descriptions.Parameter_ID)
98 return Parameter_Representation.Standard_Value'Class;
99
100 -- Function responsible for routing of generated telemetry.
101 -- Returns true iff depositing suceeded.
102 with function Optional_Deposit
103 (Packet : in PUS.Optional_PUS_Packet)
104 return Boolean;
105
106 -- Predicate indicating whether the given threshold specification is legal
107 --+ for the parameter identified by Parameter_No.
108 -- Check should be static, and is applied when a threshold is specified for
109 --+ the parameter as part of a filtered mode telecommand request.
110
111 with function Threshold_Is_Legal
112 (Parameter_No : HK_Collector_Types.Parameter_ID;
113 Parameter_Threshold
114 : HK_Collector_Types.
115 Threshold_Specification)
116 return Boolean is Standard_Thresholds.Threshold_Is_Legal;
117
118 -- Predicate indicating whether the change between the current value of a
119 --+ parameter, and its previous value, exceeds a given threshold.
120
121 with function Threshold_Is_Exceeded
122 (Parameter_No : in HK_Collector_Types.Parameter_ID;
123 Current_Value
124 : in Parameter_Representation.Standard_Value'
125 Class;
126 Previous_Value
127 : in Parameter_Representation.Standard_Value'
128 Class;
129 Parameter_Threshold
130 : in HK_Collector_Types.
131 Threshold_Specification)
132 return Boolean is Standard_Thresholds.Threshold_Is_Exceeded;
133
134 -- Maximum number parameter collections to be performed during
135 --+ HK_Diag_Period
136 Max_No_Of_Checks_In_HK_Diag_Period : in Natural;
137
138 -- Period by which any parameters due for collection will be collected.
139 HK_Diag_Period : in Positive;
140
141 -- Priority and stack size of cyclic object performing parameter monitoring
142 HK_Diag_Event_Task_Priority
143 : in Task_Priority_Control.
144 Active_Task_Priority;
145 HK_Diag_Event_Task_Size : in Natural;
146
147 -- Priority of protected object implementing timeline of collection events
148 HK_Diag_Event_List_Priority
149 : in Task_Priority_Control.
150 Passive_Task_Priority;
151
152 -- Priority of protected object implementing buffering of calls to
153 --+ Handle_PUS_Packet
154 Telecommand_Buffer_Priority
155 : in Task_Priority_Control.
156 Passive_Task_Priority;
157
158 -- Maximum number of entries in buffer of calls to Handle_PUS_Packet.
159 -- Should be defined to cater for bursts in arrival of telecommands for
160 --+ execution
161 Telecommand_Buffer_Size : in Positive;
162
163 -- Priority and stack size of sporadic task performing telecommand execution
164 --+ as a response to calls to Handle_PUS_Packet
165 Telecommand_Interpreter_Priority
166 : in Task_Priority_Control.
167 Active_Task_Priority;
168 Telecommand_Interpreter_Stack_Size : in Natural;
169
170 -- Priority assigned to critical region protecting report definitions
171 HK_Diag_Report_Definition_Priority
172 : in Task_Priority_Control.Passive_Task_Priority;
173
174 package HK_Collector is
175
176 --% Package:
177 -- Implementation of service type 3: Housekeeping and Diagnostic Data
178 --+ Reporting from Packet Utilisation Standard.
179 --% Active Tasks:
180 --> TC_Interpreter.Event_Manager.Event_Task.The_Cyclic_Task - Cyclic
181 --> TC_Interpreter_Task.The_Sporadic_Task - Sporadic
182 --% Passive Tasks:
183 --> TC_Interpreter.Event_Manager.The_Event_Scheduler.Critical_Region -
184 --+ Critical region ensuring atomic execution of operations on time line
185 --+ of collection events.
186 --> TC_Interpreter.Report_Generator.SID_Map.Map_Protector - Critical
187 --+ region ensuring atomic execution of operations on map of report
188 --+ definitions.
189 --> TC_Interpreter_Task.Event_Buffer.Queue_Task - Critical region
190 --+ protecting queue of telecommands pending for execution
191
192 procedure Initialize;
193
194 --% Subprogram:
195 -- Submit given telecommand packet for execution by housekeeping and
196 --+ diagnostic reporting service
197 -- Invariant: It is assumed that only one task may call
198 --+ Handle_PUS_Packet, meaning that its execution will be atomic.
199 --% Parameter Constraints:
200 --> None
201 --% Exceptions Raised:
202 --> None
203 procedure Handle_PUS_Packet
204 (Packet : in PUS.PUS_Packet);
205
206 end HK_Collector;
207
208 --~-----------------------------------------------------------------------------
209