File: /home/oboss/Users/gec/sources/PUS_Services/TC_Verification/verification_types.ads

1     --% Compilation Unit:	Verification_Types
2     --
3     --% Category: Package Declaration
4     --
5     --% Release:  $Name:  $
6     --
7     --% Version:  $Revision: 2.0 $
8     --
9     --% Author:   $Author: gec $
10     --
11     --% Revision Log:
12     --    $Log: verification_types.ads,v $
13     --    Revision 2.0  2003/04/04 08:51:23  gec
14     --    Initial release of source files serving as baseline for OBOSS-III project.
15     --
16     --    Revision 1.1.1.1  2003/04/04 08:13:15  gec
17     --    Imported using TkCVS
18     --
19     --
20     --
21     --% Project: OBOSS
22     --
23     --% Copyright (C) 2003 by Terma A/S
24     --  Proprietary and intellectual rights of Terma A/S, Denmark,
25     --  are involved in the subject-matter of this material and
26     --  all manufacturing, reproduction, use, disclosure, and
27     --  sales rights pertaining to such subject-matter are
28     --  expressly reserved. This material is submitted for a
29     --  specific purpose as agreed, and the recipient by
30     --  accepting this material agrees that this material will
31     --  not be used, copied, or reproduced in whole or in part
32     --  nor its contents revealed in any manner or to any person,
33     --  except to meet the purpose for which it was submitted and
34     --  subject to the terms of the agreement.
35     --
36     --% Target Dependencies:
37     --    None
38     --% Compiler Dependencies:
39     --    None
40     
41     --~-----------------------------------------------------------------------------
42     
43     package Verification_Types is
44     
45        --% Library Package:
46        --    Internal representation of fields and parameters related to service
47        --+    type 1: Telecommand Verification Service.
48        --% Active Tasks:
49        -->   None
50        --% Passive Tasks:
51        -->   None
52     
53        type Result is
54              (Success,
55               Failure);
56     
57        type Verification_Code        is new Natural;
58        type Verification_Step_Number is new Natural;
59     
60        -- Verification Parameters are not suported. A tentative type declaration is
61        --+    included for extendability
62        type Verification_Parameters is
63              (Not_Supported);
64     
65        -- Represntation of execution status for which telecommand verification
66        --+    packets may be generated.
67     
68        type Verification_Status(Contains_Code : Boolean := False) is
69           record
70              The_Result : Result;
71              case Contains_Code is
72                 when True =>
73                    Code : Verification_Code;
74                 when False =>
75                    null;
76              end case;
77           end record;
78     
79        --% Subprogram:
80        --    Constructor of verification statusses corresponding to Result
81        --+    excluding any Code
82        --% Parameter Constraints:
83        -->   None
84        --% Exceptions Raised:
85        -->   None
86        function Make_Verification_Status
87              (The_Result :        Result)
88              return Verification_Status;
89     
90        --% Subprogram:
91        --    Constructor of verification statusses corresponding to Result
92        --+    including a Code
93        --% Parameter Constraints:
94        -->   None
95        --% Exceptions Raised:
96        -->   None
97        function Make_Verification_Status
98              (The_Result :        Result;
99               Code       :        Verification_Code)
100              return Verification_Status;
101     
102        --% Subprogram:
103        --    Predicate stating whether a verification status indicates success of a
104        --+    telecommand processing stage.
105        --% Parameter Constraints:
106        -->   None
107        --% Exceptions Raised:
108        -->   None
109        function Is_Success
110              (Status :        Verification_Status)
111              return Boolean;
112     
113        --% Subprogram:
114        --    Predicate stating whether a verification status indicates failure of a
115        --+    telecommand processing stage.
116        --% Parameter Constraints:
117        -->   None
118        --% Exceptions Raised:
119        -->   None
120        function Is_Failure
121              (Status :        Verification_Status)
122              return Boolean;
123     
124        --% Subprogram:
125        --    Predicate stating whether a verification status includes a Code.
126        --% Parameter Constraints:
127        -->   None
128        --% Exceptions Raised:
129        -->   None
130        function Contains_Code
131              (Status :        Verification_Status)
132              return Boolean;
133     
134        --% Subprogram:
135        --    Accessor extracting Code filed from a verification status.
136        --% Parameter Constraints:
137        -->   None
138        --% Exceptions Raised:
139        -->   Constraint_Error - Status does not contain a code field.
140        function Get_Code
141              (Status :        Verification_Status)
142              return Verification_Code;
143     
144     end Verification_Types;
145     
146     --~-----------------------------------------------------------------------------
147