File: /home/oboss/Users/gec/sources/Basic_Services/Low_Level_Stuff/satellite_clock.ads

1     --% Compilation Unit:	Satellite_Clock
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: satellite_clock.ads,v $
13     --    Revision 2.0  2003/04/04 08:50:06  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:02  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     with Ada.Real_Time;
44     with Basic_Types;
45     with Mission_Parameters;
46     package Satellite_Clock is
47     
48        --% Library Package:
49        --    Interface to a satellite clock used for datation of telemetry and for
50        --+    on-board scheduling
51        --% Active Tasks:
52        -->   None
53        --% Passive Tasks:
54        -->   None
55     
56     
57        -- Exception indicating that an external clock value cannot be represented
58        --+    as an on-board CUC time
59        Time_Not_CUC_Representable : exception;
60     
61        -- Exception indicating that an on-board CUC time cannot be converted into
62        --+    Ada.Real_Time.Time
63        CUC_Time_Too_Large : exception;
64     
65     
66        --% Subprogram:
67        --    Function that reads the current external clock and represents it as an
68        --+    On_Board_Time, primarily for time-stamping telemetry packets.
69        --% Parameter Constraints:
70        -->   None
71        --% Exceptions Raised:
72        -->   Time_Not_CUC_Representable  - Raised when an external clock value
73        --+    cannot be represented as an on-board CUC time
74     
75        function Get_Time
76              (T_Rep :        Basic_Types.Time_Rep_Spec :=
77                     Mission_Parameters.Canonical_Time_Rep_Spec)
78              return Basic_Types.On_Board_Time;
79     
80     
81        --% Subprogram:
82        --    Procedure that establishes the time-relation between
83        --+    System_Clock.Clock and the external clock; must be called at start-up
84        --+    and regularly, at least once per day (to avoid overflows in
85        --+    CUC_Time_To_Real_Time)
86        --% Parameter Constraints:
87        -->   None
88        --% Exceptions Raised:
89        -->   None
90     
91        procedure Correlate_Real_Time_Clock;
92     
93     
94        --% Subprogram:
95        --    Function for converting CUC on-board time (typically from
96        --+    telecommands) into Ada.Real_Time.Time to be used in absolute delays.
97        --% Parameter Constraints:
98        -->   None
99        --% Exceptions Raised:
100        -->   CUC_Time_Too_Large  - Raised when an on-board CUC time cannot be
101        --+    converted into Ada.Real_Time.Time
102     
103        function CUC_Time_To_Real_Time
104              (CUC_Time :        Basic_Types.On_Board_Time)
105              return Ada.Real_Time.Time;
106     
107     end Satellite_Clock;
108     
109     --~-----------------------------------------------------------------------------
110