File: /home/oboss/Users/gec/sources/CDH_Structure/Up_Down_Link_Bus/up_down_link_parameters.ads

1     --% Compilation Unit: Up_Down_Link_Parameters
2     --
3     --% Category: Package Declaration
4     --
5     --% Release:  $Name:  $
6     --
7     --% Version:  $Revision: 2.3 $
8     --
9     --% Author:   $Author: gec $
10     --
11     --% Revision Log:
12     --    $Log: up_down_link_parameters.ads,v $
13     --    Revision 2.3  2004/02/13 16:16:29  gec
14     --    Merged results of Demonstrator development on to main OBOSS trunk.
15     --
16     --    Revision 2.2.6.2  2004/02/12 09:41:51  gec
17     --    Corrected erroneous buffer size for low-level receive buffer on uplink.
18     --
19     --    Revision 2.2.6.1  2003/12/12 12:12:40  gec
20     --    Updated buffer size on uplink to be able to contain one telecommand packet.
21     --
22     --    Revision 2.2  2003/10/21 13:07:33  gec
23     --    Eliminated comments referring to Alsys compiler.
24     --
25     --    Revision 2.1  2003/04/29 08:51:34  gec
26     --    Relocated up/downlink to UART B.
27     --
28     --    Revision 2.0  2003/04/04 08:50:25  gec
29     --    Initial release of source files serving as baseline for OBOSS-III
30     --+    project.
31     --
32     --    Revision 1.1.1.1  2003/04/04 08:13:10  gec
33     --    Imported using TkCVS
34     --
35     --
36     --
37     --% Project: OBOSS
38     --
39     --% Copyright (C) 2003 by Terma A/S
40     --  Proprietary and intellectual rights of Terma A/S, Denmark,
41     --  are involved in the subject-matter of this material and
42     --  all manufacturing, reproduction, use, disclosure, and
43     --  sales rights pertaining to such subject-matter are
44     --  expressly reserved. This material is submitted for a
45     --  specific purpose as agreed, and the recipient by
46     --  accepting this material agrees that this material will
47     --  not be used, copied, or reproduced in whole or in part
48     --  nor its contents revealed in any manner or to any person,
49     --  except to meet the purpose for which it was submitted and
50     --  subject to the terms of the agreement.
51     --
52     --% Target Dependencies:
53     --    None
54     --% Compiler Dependencies:
55     --    None
56     
57     --~-----------------------------------------------------------------------------
58     
59     with Basic_Types;
60     with External_PUS_Data_Types;
61     with PUS;
62     with Mission_Parameters;
63     with Application_Process_Parameters;
64     with Task_Priority_Control;
65     with Ada_Task_Configuration;
66     with Kernel.Peripherals;
67     package Up_Down_Link_Parameters is
68     
69        Application_ID :
70           constant Mission_Parameters.APID := Mission_Parameters.Ground;
71     
72        -- UART assigned to up/downlink
73        UART_Channel :
74           constant Kernel.Peripherals.UART_Channel := Kernel.Peripherals.B;
75        -- Common Baud rate applicable to UART A and UART B on the ERC32
76        UART_Baud_Rate : constant Kernel.Peripherals.UART_Baudrate := 115_200;
77        -- Common protocol definition applicable to UART A and UART B on the ERC32
78        UART_Parity :
79           constant Kernel.Peripherals.UART_Parity := Kernel.Peripherals.None;
80        UART_Stop_Bits :
81           constant Kernel.Peripherals.UART_Stop_Bits := Kernel.Peripherals.One;
82        -- Priority assigned to protected around UART
83        UART_Protected_Priority :
84           constant Task_Priority_Control.Passive_Task_Priority :=
85                    Ada_Task_Configuration.UART_Protected_Priority;
86        -- Priority assigned to interruppt handler associated to UART
87        UART_Interrupt_Handler_Priority :
88           constant Task_Priority_Control.Interrupt_Task_Priority :=
89                    Ada_Task_Configuration.UART_Interrupt_Handler_Priority;
90        -- Priority and stack size of Sporadic object reading from UART
91        UART_Receiver_Task_Priority :
92           constant Task_Priority_Control.Active_Task_Priority :=
93                    Ada_Task_Configuration.UART_Receiver_Task_Priority;
94        UART_Receiver_Task_Stack_Size : constant Natural       := 8_000;
95        -- Size of receiver buffer in UART
96        UART_Receive_Buffer_Size :
97           constant Natural := Mission_Parameters.Tcpkt_Max_Length;
98     
99        use Task_Priority_Control;
100     
101        Circular_Buffer_Low_Level_Byte_Buffer_Size :
102           constant Natural := 2048;
103        Circular_Buffer_Low_Level_Byte_Buffer_Priority :
104           constant Task_Priority_Control.Passive_Task_Priority :=
105                    Ada_Task_Configuration.
106                       Up_Down_Link_Circular_Buffer_Low_Level_Byte_Buffer_Priority;
107        Dispatcher_Event_Buffer_Size :
108           constant Natural :=
109                    Application_Process_Parameters.The_Parameters
110                          (Mission_Parameters.Ground).Packet_Queue_Size;
111        Dispatcher_Task_Priority :
112           constant Task_Priority_Control.Active_Task_Priority :=
113                    Ada_Task_Configuration.Up_Down_Link_Dispatcher_Task_Priority;
114        Dispatcher_Task_Stack_Size : constant Natural           := 8_000;
115        Dispatcher_Event_Buffer_Priority :
116           constant Task_Priority_Control.Passive_Task_Priority :=
117                    Ada_Task_Configuration.
118                       Up_Down_Link_Dispatcher_Event_Buffer_Priority;
119        Receiver_Event_Buffer_Task_Priority :
120           constant Task_Priority_Control.Passive_Task_Priority :=
121                    Ada_Task_Configuration.
122                       Up_Down_Link_Receiver_Event_Buffer_Task_Priority;
123        The_Receiver_Task_Priority :
124           constant Task_Priority_Control.Active_Task_Priority :=
125                    Ada_Task_Configuration.Up_Down_Link_The_Receiver_Task_Priority;
126        The_Receiver_Task_Stack_Size : constant Natural         := 8_000;
127        -- Only The_Receiver_Buffer_Size calls in sporadic object are buffered
128        The_Receiver_Buffer_Size : constant Natural := 20;
129     
130        -- Sync word used to mark the start of packets
131        Ground_Sync_Word :
132           constant Basic_Types.Byte_Array (1 .. 2) := (16#DE#, 16#AD#);
133     
134        TC_Low_Level_Receiver_Task_Priority :
135           constant Task_Priority_Control.Active_Task_Priority :=
136                    Ada_Task_Configuration.
137                       Up_Down_Link_TC_Low_Level_Receiver_Task_Priority; --Will
138                                            --+    later become interrupt!
139     
140        --% Subprogram:
141        --% Parameter Constraints:
142        -->   None
143        --% Exceptions Raised:
144        -->   PUS_Data_Types.Wrong_Packet_Kind  - Raised if the packet is not TC
145        function Convert_From_Ground_External_To_PUS_Packet
146              (Packet         : in     Basic_Types.Byte_Array;
147               Type_Of_Packet : in     External_PUS_Data_Types.External_Packet_Type)
148              return PUS.Optional_PUS_Packet;
149     
150        --% Subprogram:
151        --% Parameter Constraints:
152        -->   None
153        --% Exceptions Raised:
154        -->   PUS_Data_Types.Wrong_Packet_Kind  - Raised if the packet is not TM
155        function Convert_From_PUS_To_Ground_External_Packet
156              (PUS_Packet : in     PUS.PUS_Packet)
157              return Basic_Types.Byte_Array;
158     
159     end Up_Down_Link_Parameters;
160     
161     --~-----------------------------------------------------------------------------
162