File: /home/oboss/Users/gec/sources/PUS_Services/Large_Data_Transfer/large_data_transfer-receiver.ads

1     --% Compilation Unit: Large_Data_Transfer.Receiver
2     --
3     --% Category: Generic Package Declaration
4     --
5     --% Release:  $Name:  $
6     --
7     --% Version:  $Revision: 1.2 $
8     --
9     --% Author:   $Author: jhl $
10     --
11     --% Revision Log:
12     --    $Log: large_data_transfer-receiver.ads,v $
13     --    Revision 1.2  2003/10/09 11:05:28  jhl
14     --    Added Service 13 And 19
15     --
16     --    Revision 1.1.2.3  2003/10/08 10:34:07  jhl
17     --    Large Data Transfer post review third update
18     --
19     --    Revision 1.1.2.2  2003/10/03 09:47:52  jhl
20     --    Large Data Transfer post review first update
21     --
22     --    Revision 1.1.2.1  2003/10/01 11:54:42  jhl
23     --    Initial version of service 13 Event Action, and 19 Large Data Transfer.
24     --
25     --    Revision 2.0  2003/04/04 10:08:58  gec
26     --    Initial release serving as baseline for OBOSS-III project.
27     --
28     --    Revision 1.1.1.1  2003/04/04 07:19:20  gec
29     --    Imported using TkCVS
30     --
31     --
32     --
33     --% Project: OBOSS
34     --
35     --% Copyright (C) 2003 by Terma A/S
36     --  Proprietary and intellectual rights of Terma A/S, Denmark,
37     --  are involved in the subject-matter of this material and
38     --  all manufacturing, reproduction, use, disclosure, and
39     --  sales rights pertaining to such subject-matter are
40     --  expressly reserved. This material is submitted for a
41     --  specific purpose as agreed, and the recipient by
42     --  accepting this material agrees that this material will
43     --  not be used, copied, or reproduced in whole or in part
44     --  nor its contents revealed in any manner or to any person,
45     --  except to meet the purpose for which it was submitted and
46     --  subject to the terms of the agreement.
47     --
48     --% Target Dependencies:
49     --    None
50     --% Compiler Dependencies:
51     --    None
52     
53     
54     --~-----------------------------------------------------------------------------
55     
56     with Large_Data_Transfer.Receiver_State;
57     
58     -- With'S for task prioritizing
59     with Task_Priority_Control;
60     
61     generic
62     
63        --% Generic Parameter Constraints:
64        -->   None
65     
66        -- TC Handler Parameters:
67     
68        -- Priority of protected object implementing buffering of calls to
69        --+    Handle_TC_Packet
70        TC_Handler_Buffer_Priority
71                                   : in     Task_Priority_Control.
72                                     Passive_Task_Priority;
73     
74        -- Maximum number of entries in buffer of calls to Handle_TC_Packet.
75        -- Should be defined to cater for bursts in arrival of TC packets for
76        --+    execution.
77        TC_Handler_Buffer_Size : in     Positive;
78     
79        -- Priority and stack size of sporadic task performing TC packet execution
80        --+    as a response to calls to Handle_TC_Packet
81        TC_Handler_Interpreter_Priority
82                                        : in     Task_Priority_Control.
83                                          Active_Task_Priority;
84     
85        TC_Handler_Interpreter_Stack_Size : in     Natural;
86     
87        -- Priority of proteceted object encapsulating actual state changes, making
88        --+    them atomic.
89        Protected_State_Priority
90                                 : in     Task_Priority_Control.
91                                   Passive_Task_Priority;
92     
93        -- Timeout interval for downlink reception acknowledgement TC from receiver.
94        --+
95        Timeout_Interval_In_Milliseconds : in     Positive;
96     
97        -- Timeout handler for sending sub-service
98        --
99        -- This subprogram can be overridden with an application process
100        -- specific handler.
101     
102        with procedure Receiver_Timeout_Handler
103              (Timeout : in     Receiver_Timeout) is
104              Large_Data_Transfer.Default_Receiver_Timeout_Handler;
105     
106        -- Priority of proteceted object encapsulating the timout control
107        Protected_Timer_Control_Priority
108            : in     Task_Priority_Control.Passive_Task_Priority;
109     
110        -- Priority of the actual timer task for timeout control
111        Active_Timer_Priority : in     Task_Priority_Control.Active_Task_Priority;
112     
113     package Large_Data_Transfer.Receiver is
114     
115        --% Library Package:
116        --    The main package for the instantiation of the Large Data Transfer
117        --+    receiving sub-service.
118        --
119        --    Assembles SDU Parts  and sends a SDU TC PUS Packet to the receiving
120        --+    service according to the receiving protocol defined for the Large
121        --+    Data Transfer, as understood from the ECSS-E-70-41A Packet
122        --+    Utilization Standard
123        --
124        --% Active Tasks:
125        -->   The_Large_Data_Transfer_Receiver_TC_Handler - Handles TC PUS Packets
126        -->   The_Receiver_State - Contains an active task for triggering timeouts
127        --% Passive Tasks:
128        -->   The_Receiver_State - Contains a protected object maintaining the state
129        --+    of the receiving sub-service.
130        -->   The_Receiver_State - Contains a protected object controlling the
131        --+    timeout functionality
132     
133        --% Subprogram:
134        --    Initialization of generic package instantiation.
135        --% Parameter Constraints:
136        -->   None
137        --% Exceptions Raised:
138        -->   None
139     
140        procedure Initialize;
141     
142        --% Subprogram:
143        --    Main handler for PUS Packet delivered to the Large Data Transfer
144        --+    receiving sub-service from the Large Data Transfer service (CDH PUS
145        --+    Packet distributer)
146        --
147        --    This subprogram shall override the default subprogram in the
148        --+    instantiation of the Large_Data_Transfer.Service if the receiving
149        --+    sub-service is to be used.
150        --
151        --% Parameter Constraints:
152        -->   TC_Packet - Must be a TC Packet with service type and service sub-type
153        --+    for the Large Data Transfer receiving sub-service
154        --% Exceptions Raised:
155        -->   None
156     
157        procedure Handle_TC_Packet
158              (TC_Packet : in     PUS.PUS_Packet);
159     
160     private
161     
162        -- Package instantiations with types and functionality, for use in private
163        --+    generic children
164     
165        --% Library Package:
166        --    Instantiation of the receiver state
167     
168        package The_Receiver_State is new Large_Data_Transfer.Receiver_State
169                 (Protected_State_Priority =>
170                     Protected_State_Priority,
171                  Timeout_Interval_In_Milliseconds =>
172                     Timeout_Interval_In_Milliseconds,
173                  Receiver_Timeout_Handler =>
174                     Receiver_Timeout_Handler,
175                  Protected_Timer_Control_Priority =>
176                     Protected_Timer_Control_Priority,
177                  Active_Timer_Priority =>
178                     Active_Timer_Priority);
179     
180     end Large_Data_Transfer.receiver;
181     
182     --~-----------------------------------------------------------------------------
183