OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [support/] [f392d00.a] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- F392D00.A
2
--
3
--                             Grant of Unlimited Rights
4
--
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
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
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.
24
--*
25
--
26
-- FOUNDATION DESCRIPTION:
27
--      This foundation declares parent tagged types and subprograms for use
28
--      in tests covering dispatching operations.
29
--
30
-- CHANGE HISTORY:
31
--      06 Dec 94   SAIC    ACVC 2.0
32
--
33
--!
34
 
35
package F392D00 is
36
 
37
   type Depth_Of_Field is range 5 .. 100;
38
   type Shutter_Speed  is (One, Two_Fifty, Four_Hundred, Thousand);
39
 
40
   type Remote_Camera is tagged record
41
      DOF    : Depth_Of_Field := 10;
42
      Shutter: Shutter_Speed  := One;
43
   end record;
44
 
45
   -- ...Other declarations.
46
 
47
   procedure Focus (C     : in out Remote_Camera;
48
                    Depth : in     Depth_Of_Field);
49
 
50
   procedure Self_Test (C: in out Remote_Camera'Class);
51
 
52
   -- ...Other operations.
53
 
54
private
55
 
56
   procedure Set_Shutter_Speed (C     : in out Remote_Camera;
57
                                Speed : in     Shutter_Speed);
58
 
59
   -- For the basic remote camera, shutter speed might be set as a function of
60
   -- focus perhaps, thus it is declared as a private operation (usable
61
   -- only internally within the abstraction).
62
 
63
 
64
end F392D00;
65
 
66
 
67
     --==================================================================--
68
 
69
 
70
package body F392D00 is
71
 
72
   procedure Focus (C     : in out Remote_Camera;
73
                    Depth : in     Depth_Of_Field) is
74
   begin
75
      -- Artificial for testing purposes.
76
      C.DOF := 46;
77
   end Focus;
78
 
79
   -----------------------------------------------------------
80
   procedure Set_Shutter_Speed (C     : in out Remote_Camera;
81
                                Speed : in     Shutter_Speed) is
82
   begin
83
      -- Artificial for testing purposes.
84
      C.Shutter := Thousand;
85
   end Set_Shutter_Speed;
86
 
87
   -----------------------------------------------------------
88
   procedure Self_Test (C: in out Remote_Camera'Class) is
89
      TC_Dummy_Depth : constant Depth_Of_Field := 23;
90
      TC_Dummy_Speed : constant Shutter_Speed  := Four_Hundred;
91
   begin
92
 
93
      -- Test focus at various depths:
94
      Focus(C, TC_Dummy_Depth);
95
      -- ...Additional calls to Focus.
96
 
97
      -- Test various shutter speeds:
98
      Set_Shutter_Speed(C, TC_Dummy_Speed);
99
      -- ...Additional calls to Set_Shutter_Speed.
100
 
101
   end Self_Test;
102
 
103
end F392D00;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.