File: /home/oboss/Users/gec/sources/PUS_Services/Memory_Management/memory_management.ads
1 --% Compilation Unit: Memory_Management
2 --
3 --% Category: Generic Package Declaration
4 --
5 --% Release: $Name: $
6 --
7 --% Version: $Revision: 2.0 $
8 --
9 --% Author: $Author: gec $
10 --
11 --% Revision Log:
12 -- $Log: memory_management.ads,v $
13 -- Revision 2.0 2003/04/04 08:51:08 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:12 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 Task_Priority_Control;
44 with Memory_Management_Types;
45 with External_Memory_Management_Types;
46 with Mission_Parameters;
47 with PUS;
48 with ISO_Checksum;
49 generic
50
51 --% Generic Parameter Constraints:
52 --> Optional_Deposit - This operation must update TM counters
53 --> Telecommand_Buffer_Priority - Shall exceed ceiling of any callers of
54 --+ Handle_PUS_Packet and Telecommand_Interpreter_Priority
55 -- Identification of the application process of the "current" instance of
56 --+ this service
57
58 Application_ID : in Mission_Parameters.APID;
59
60 -- Maximal length of parameter lists in telecommands and telemetry reports
61 Max_List_Length : in Positive;
62
63 -- Maximal length of data (in octets) in telecommands and telemetry
64 --+ reports
65 Max_Data_Length : in Positive;
66
67 -- Types and representations of memory identifications
68 type Memory_ID is (<>);
69 type Memory_ID_Rep is array (Memory_ID) of
70 External_Memory_Management_Types.Memory_ID;
71 Memory_ID_Rep_Vals : in Memory_ID_Rep;
72
73 -- Routine for writing data at a given memory block and a given start
74 --+ address within that block.
75 with procedure Write_Data
76 (Memory_Def : in Memory_ID;
77 Absolute_Address : in Memory_Management_Types.Start_Address;
78 Data_Val : in Memory_Management_Types.Data);
79
80 -- Routine for reading data at a given memory block and a given start
81 --+ address within that block and with a given length.
82 with procedure Read_Data
83 (Memory_Def : in Memory_ID;
84 Absolute_Address : in Memory_Management_Types.Start_Address;
85 Data_Val : out Memory_Management_Types.Data);
86
87 -- Routine for calculating the ISO checksum data at a given memory block and
88 --+ a given start address within that block and with a given length.
89 with function Calculate_ISO_Checksum
90 (Memory_Def : in Memory_ID;
91 Absolute_Address : in Memory_Management_Types.Start_Address;
92 Length : in Memory_Management_Types.Data_Length)
93 return ISO_Checksum.Checksum_Type;
94
95 -- Routine for depositing generated telemetry, should be instantiated with
96 --+ an operation that ensures that telemetry packet counters are
97 --+ updated.
98 with function Optional_Deposit
99 (Packet : in PUS.Optional_PUS_Packet)
100 return Boolean;
101
102 -- Priority of protected object implementing buffering of calls to
103 --+ Handle_PUS_Packet
104 Telecommand_Buffer_Priority
105 : in Task_Priority_Control.
106 Passive_Task_Priority;
107
108 -- Size of buffer for events corresponding to requests for execution of TCs
109 Telecommand_Buffer_Size : in Natural;
110
111 -- Priority and stack size of sporadic task performing telecommand execution
112 --+ as a response to calls to Handle_PUS_Packet
113 Telecommand_Interpreter_Priority
114 : in Task_Priority_Control.
115 Active_Task_Priority;
116 Telecommand_Interpreter_Stack_Size : in Natural;
117
118 package Memory_Management is
119
120 --% Library Package:
121 -- Implementation of the memory management service
122 --% Active Tasks:
123 --> Memory_Management_TC_Interpreter.The_TC_Interpreter.The_Sporadic_Task
124 --+ - Sporadic
125 --% Passive Tasks:
126 -->
127 --+ Memory_Management_TC_Interpreter.The_TC_Interpreter.Event_Buffer.Queue_Task
128 --+ - Implementation of TC buffer
129
130 procedure Initialize;
131
132
133 --% Subprogram:
134 -- Handling of memory management related TCs
135 --% Parameter Constraints:
136 --> None
137 --% Exceptions Raised:
138 --> None
139
140 procedure Handle_PUS_Packet
141 (Packet : in PUS.PUS_Packet);
142
143 end Memory_Management;
144
145 --~-----------------------------------------------------------------------------
146