File: /home/oboss/Users/gec/sources/PUS_Services/HK_Collector/external_hk_collector_types.ads
1 --% Compilation Unit: External_HK_Collector_Types
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: external_hk_collector_types.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 Parameter_Representation;
51 with HK_Collector_Types;
52 with HK_Collector_Types;
53 with Source_Data_Stream;
54 package External_HK_Collector_Types is
55
56 --% Library Package:
57 -- Definition of external representation of packet fields related to
58 --+ service type 3: Housekeeping and diagnostic data reporting.
59 -- NB: Type definitions should be derived types as the implementation
60 --+ uses implicitly declared subprograms defined on the types.
61 --% Active Tasks:
62 --> None
63 --% Passive Tasks:
64 --> None
65
66 -- Indicates that a Get operation failed due to som illegal input.
67 External_Parameter_Error : exception;
68
69 -- External representation of length of packet field sequences (NPAR1, NFA,
70 --+ NREP, NPAR2, NSID, and N).
71 type Count_Type is new Parameter_Representation.Unsigned_Integer_12;
72
73 -- External representation of Timeout field in service (3,19) and (3,20).
74 subtype Timeout_Type is Count_Type;
75
76 -- External representation of thresholds (re. service (3,19) and (3,20)).
77 type Threshold is new Parameter_Representation.Unsigned_Integer_12;
78 type Threshold_Type is new Parameter_Representation.Enumerated_1;
79
80 -- External representation of collection intervals (re. service (3,1),
81 --+ (3,2), (3,10) and (3,12)).
82 type Interval_Type is new Parameter_Representation.Unsigned_Integer_12;
83
84 -- External representation of structure IDs as used by all services.
85 type Structure_ID is new Parameter_Representation.Enumerated_8;
86
87 -- External representation of Packet Generation Mode
88 type Mode is new Parameter_Representation.Enumerated_2;
89
90 --% Subprogram:
91 -- Collection of read operations extracting packet fields - in external
92 --+ format defined above - from head of Stream returning the field in its
93 --+ internal representation as defined by HK_Collector_Types.
94 --% Parameter Constraints:
95 --> None
96 --% Exceptions Raised:
97 --> Source_Data_Stream.Read_Stream_Exhausted - End of stream was met while
98 --+ reading packet field.
99 --> Constraint_Error - Transformation from external to internal format
100 --+ failed.
101 --> External_Parameter_Error - Transformation from external to internal
102 --+ format failed.
103 procedure Get
104 (Stream : in out Source_Data_Stream.Read_Stream;
105 Count : out HK_Collector_Types.Count_Type);
106 procedure Get
107 (Stream : in out Source_Data_Stream.Read_Stream;
108 The_Threshold : out HK_Collector_Types.Absolute_Threshold);
109 procedure Get
110 (Stream : in out Source_Data_Stream.Read_Stream;
111 The_Threshold : out HK_Collector_Types.Relative_Threshold);
112 procedure Get
113 (Stream : in out Source_Data_Stream.Read_Stream;
114 The_Threshold_Type : out HK_Collector_Types.Threshold_Type);
115 procedure Get
116 (Stream : in out Source_Data_Stream.Read_Stream;
117 Interval : out HK_Collector_Types.Interval_Type);
118 procedure Get
119 (Stream : in out Source_Data_Stream.Read_Stream;
120 SID : out HK_Collector_Types.Structure_ID);
121
122 --% Subprogram:
123 -- Collection of write operations transforming packet fileds from their
124 --+ internal to their external representation appending this at the tail
125 --+ of Stream.
126 --% Parameter Constraints:
127 --> None
128 --% Exceptions Raised:
129 --> Source_Data_Stream.Write_Stream_Exhausted - End of stream was met
130 --+ while writing packet field.
131 --> Constraint_Error - Transformation from internal to external format
132 --+ failed.
133 procedure Put
134 (Stream : in out Source_Data_Stream.Write_Stream;
135 Count : in HK_Collector_Types.Count_Type);
136 procedure Put
137 (Stream : in out Source_Data_Stream.Write_Stream;
138 The_Threshold : in HK_Collector_Types.Absolute_Threshold);
139 procedure Put
140 (Stream : in out Source_Data_Stream.Write_Stream;
141 The_Threshold : in HK_Collector_Types.Relative_Threshold);
142 procedure Put
143 (Stream : in out Source_Data_Stream.Write_Stream;
144 The_Threshold_Type : in HK_Collector_Types.Threshold_Type);
145 procedure Put
146 (Stream : in out Source_Data_Stream.Write_Stream;
147 Interval : in HK_Collector_Types.Interval_Type);
148 procedure Put
149 (Stream : in out Source_Data_Stream.Write_Stream;
150 SID : in HK_Collector_Types.Structure_ID);
151 procedure Put
152 (Stream : in out Source_Data_Stream.Write_Stream;
153 The_Mode : in HK_Collector_Types.Packet_Generation_Mode);
154
155 end External_HK_Collector_Types;
156
157 --~-----------------------------------------------------------------------------
158