File: /home/oboss/Users/gec/sources/PUS_Services/Monitor/param_monitor.ads
1 --% Compilation Unit: Param_Monitor
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: param_monitor.ads,v $
13 -- Revision 2.1 2003/11/13 14:57:51 gec
14 -- Merged ECSS Migration branch to main trunk.
15 --
16 -- Revision 2.0.8.1 2003/11/13 14:40:51 gec
17 -- Updated On-board Monitoring Service in accordance with ECSS-E-70-41A
18 --
19 -- Revision 2.0 2003/04/04 08:51:14 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:13 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 Onboard_Monitoring_Types;
51 with Parameter_Monitoring_Definitions;
52 with Mission_Parameters;
53 with Task_Priority_Control;
54 generic
55
56 --% Generic Parameter Constraints:
57 --> Max_No_Of_Checks_In_Monitoring_Period - Should be larger than the
58 --+ maximum number of check to be performed during Monitoring_Period
59 --> Protected_Task_Priority - Shall exceed the ceiling of
60 --+ Monitor_Task_Priority and priority of any tasks calling provided
61 --+ operations
62 -- Maximum number of parameters to be monitored.
63 Max_Number_Of_Parameters : in Positive;
64
65 -- Period of cyclic task responsible for monitoring of parameters.
66 Monitoring_Period : in Positive;
67 -- Maximum number of checks to be performed during Monitoring_Period
68 Max_No_Of_Checks_In_Monitoring_Period : in Natural;
69
70 -- Application process ID associated to application process providing
71 --+ service.
72 My_Application_ID : in Mission_Parameters.APID;
73
74 -- Accessor function mapping a check definition ID into the value filter
75 --+ associated to the check definition.
76 with function Get_Value_Repetitions
77 (ID : Onboard_Monitoring_Types.Check_Definition_ID)
78 return Onboard_Monitoring_Types.Value_Number_Rep;
79 -- Predicate indicating whether the given check definition is valid.
80 with function Parameter_Is_Valid
81 (ID : Onboard_Monitoring_Types.Check_Definition_ID)
82 return Boolean;
83
84 -- Accessor for set of check definitions associated to identified parameter
85 --+ in monitoring list.
86 -- A lock of given type is placed on the monitoring definitions.
87 with function Get_Monitoring_Definitions
88 (ID : Onboard_Monitoring_Types.Check_Definition_ID;
89 Check_Type : Onboard_Monitoring_Types.Check_Definition_Type)
90 return Parameter_Monitoring_Definitions.Check_Definitions_List;
91
92 -- Add Event to list of unreported out-of-limit events.
93 with procedure Report_Transition_Event
94 (Event : in Onboard_Monitoring_Types.Transition_Event);
95
96 -- Predicate returning true iff given check selection parameter is
97 --+ currrently selected.
98 with function Is_Selected
99 (Selection_ID
100 : Onboard_Monitoring_Types.
101 Check_Selection_Parameter_Number)
102 return Boolean;
103
104 -- Roberto 13/09/2001
105 --- Provides current parameter value for parameter identified by ID
106 with function Receive
107 (ID : Onboard_Monitoring_Types.Parameter_ID)
108 return Onboard_Monitoring_Types.Parameter_Value'Class;
109
110 -- Priority of protected object implementing monitoring timeline
111 Protected_Task_Priority
112 : in Task_Priority_Control.
113 Passive_Task_Priority;
114
115 -- Priority and stack size of cyclic object performing parameter monitoring
116 Monitor_Task_Priority : in Task_Priority_Control.Active_Task_Priority;
117 Monitor_Task_Stack_Size : in Natural;
118
119 package Param_Monitor is
120
121 --% Package:
122 -- Monitors a collection of parameters with an individual period for each
123 --+ of these.
124 --% Active Tasks:
125 --> The_Monitor.The_Cyclic_Task - Cyclic
126 --% Passive Tasks:
127 --> Monitor_Scheduler.Critical_Region - Critical region protecting
128 --+ timeline of parameter collection events.
129
130 -- Indicates that a monitoring interval exceeds the maximum
131 Interval_Too_Large : exception;
132
133 -- Indicates that addition of a parameter failed as it was already monitored
134 --+
135 Parameter_Exists : exception;
136
137 procedure Initialize;
138
139 --% Subprogram:
140 -- Request monitoring of parameter identified by ID with period given by
141 --+ Mon_Interval
142 --% Parameter Constraints:
143 --> None
144 --% Exceptions Raised:
145 --> Interval_Too_Large - Mon_Interval exceeds the capabilities of the
146 --+ implementation
147 --> Parameter_Exists - Identified parameter is already being monitored
148 procedure Add_Check
149 (ID : in Onboard_Monitoring_Types.Parameter_ID;
150 Mon_Interval : in Onboard_Monitoring_Types.Interval);
151
152 --% Subprogram:
153 -- Stop monitoring identified parameter.
154 -- If no parameter with ID is currently monitored, operation has no
155 --+ effect.
156 --% Parameter Constraints:
157 --> None
158 --% Exceptions Raised:
159 --> None
160 procedure Clear_Check
161 (ID : in Onboard_Monitoring_Types.Parameter_ID);
162
163 --% Subprogram:
164 -- Stop monitoring of all parameters.
165 -- If no parameters are currently monitored, operation has no effect.
166 --% Parameter Constraints:
167 --> None
168 --% Exceptions Raised:
169 --> None
170 procedure Clear_All_Checks;
171
172 --% Subprogram:
173 -- Enable monitoring at an overall level. Monitoring of parameters in set
174 --+ will resume.
175 -- If monitoring is already enabled, operation has no effect
176 --% Parameter Constraints:
177 --> None
178 --% Exceptions Raised:
179 --> None
180 procedure Enable_Monitoring;
181
182 --% Subprogram:
183 -- Disable monitoring at an overall level. Monitoring of parameters in
184 --+ set will be suspended.
185 -- If monitoring is already enabled, operation has no effect
186 --% Parameter Constraints:
187 --> None
188 --% Exceptions Raised:
189 --> None
190 procedure Disable_Monitoring;
191
192 end Param_Monitor;
193
194 --~-----------------------------------------------------------------------------
195