3 -- Grant of Unlimited Rights
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7 -- unlimited rights in the software and documentation contained herein.
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
9 -- this public release, the Government intends to confer upon all
10 -- recipients unlimited rights equal to those held by the Government.
11 -- These rights include rights to use, duplicate, release or disclose the
12 -- released technical data and computer software in whole or in part, in
13 -- any manner and for any purpose whatsoever, and to have or permit others
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
26 -- FOUNDATION DESCRIPTION:
27 -- This file declares the root type and primitive subprograms of an
28 -- alert system abstraction, to be used for tests covering tagged
29 -- types and type extensions.
32 -- 06 Dec 94 SAIC ACVC 2.0
33 -- 04 Jun 96 SAIC ACVC 2.1: Added pragma Elaborate for Ada.Calendar.
38 pragma Elaborate
(Ada
.Calendar
);
40 package F390A00
is -- Alert system abstraction.
43 -- Declarations used by component Display_On and procedure Display.
45 type Device_Enum
is (Null_Device
, Teletype
, Console
, Big_Screen
);
46 type Display_Counters
is array (Device_Enum
) of Natural;
48 Display_Count_For
: Display_Counters
:= (others => 0);
51 -- Declarations used by component Arrival_Time.
53 Default_Time
: constant Ada
.Calendar
.Time
:=
54 Ada
.Calendar
.Time_Of
(1901, 1, 1);
55 Alert_Time
: constant Ada
.Calendar
.Time
:=
56 Ada
.Calendar
.Time_Of
(1991, 6, 15);
60 type Alert_Type
is tagged record -- Root tagged type.
61 Arrival_Time
: Ada
.Calendar
.Time
:= Default_Time
;
62 Display_On
: Device_Enum
:= Null_Device
;
66 procedure Display
(A
: in Alert_Type
); -- To be inherited by
69 procedure Handle
(A
: in out Alert_Type
); -- To be overridden by
75 --==================================================================--
78 package body F390A00
is -- Alert system abstraction.
81 procedure Display
(A
: in Alert_Type
) is
83 Display_Count_For
(A
.Display_On
) := Display_Count_For
(A
.Display_On
) + 1;
87 procedure Handle
(A
: in out Alert_Type
) is
89 A
.Arrival_Time
:= Alert_Time
;