File: /home/oboss/Users/gec/sources/CDH_Structure/Dynamic_Application_Process_Descrs/packet_counters_manager.ads
1 --% Compilation Unit: Packet_Counters_Manager
2 --
3 --% Category: Package Declaration
4 --
5 --% Release: $Name: $
6 --
7 --% Version: $Revision: 2.1 $
8 --
9 --% Author: $Author: gec $
10 --
11 --% Revision Log:
12 -- $Log: packet_counters_manager.ads,v $
13 -- Revision 2.1 2003/11/13 14:57:37 gec
14 -- Merged ECSS Migration branch to main trunk.
15 --
16 -- Revision 2.0.8.2 2003/10/29 15:38:09 gec
17 -- Added support for management of telemetry packet subcounters.
18 --
19 -- Revision 2.0.8.1 2003/10/29 07:17:40 gec
20 -- Packet headers and data field headers updated to be compliant to ECSS
21 --+ Telemetry & Telecommand Packet Utilization standard.
22 --
23 -- Revision 2.0 2003/04/04 08:50:21 gec
24 -- Initial release of source files serving as baseline for OBOSS-III
25 --+ project.
26 --
27 -- Revision 1.1.1.1 2003/04/04 08:13:10 gec
28 -- Imported using TkCVS
29 --
30 --
31 --
32 --% Project: OBOSS
33 --
34 --% Copyright (C) 2003 by Terma A/S
35 -- Proprietary and intellectual rights of Terma A/S, Denmark,
36 -- are involved in the subject-matter of this material and
37 -- all manufacturing, reproduction, use, disclosure, and
38 -- sales rights pertaining to such subject-matter are
39 -- expressly reserved. This material is submitted for a
40 -- specific purpose as agreed, and the recipient by
41 -- accepting this material agrees that this material will
42 -- not be used, copied, or reproduced in whole or in part
43 -- nor its contents revealed in any manner or to any person,
44 -- except to meet the purpose for which it was submitted and
45 -- subject to the terms of the agreement.
46 --
47 --% Target Dependencies:
48 -- None
49 --% Compiler Dependencies:
50 -- None
51
52 --~-----------------------------------------------------------------------------
53
54 with Parameter_Representation;
55 with Mission_Parameters;
56 with PUS;
57 with PUS_Data_Types;
58 with PUS_State;
59 with Verification_Types;
60 with Parameter_Representation_Constraints;
61 package Packet_Counters_Manager is
62
63 --% Library Package:
64 -- Management of TC and TM counters for each (source,destination)
65 --+ application process pair
66 --% Active Tasks:
67 --> None
68 --% Passive Tasks:
69 --> Counters_Critical_Region - Protection of TC and TM counters
70
71 type TC_Sequence_Counters is array (Mission_Parameters.APID) of
72 PUS_Data_Types.Sequence_Count;
73 type TM_Sequence_Counters is array (Mission_Parameters.Destination_ID) of
74 PUS_Data_Types.Sequence_Count;
75 type TM_Packet_Subcounters is array
76 (Mission_Parameters.Destination_ID, PUS_Data_Types.Service_Type,
77 PUS_Data_Types.Service_Subtype) of PUS_Data_Types.Packet_Subcount;
78
79 type Appl_Proc_Descr is
80 record
81 TC_Counters : TC_Sequence_Counters;
82 TM_Counters : TM_Sequence_Counters;
83 TM_Subcounters : TM_Packet_Subcounters;
84 end record;
85
86
87 --% Subprogram:
88 -- Initialization of application process descriptors
89 --% Parameter Constraints:
90 --> None
91 --% Exceptions Raised:
92 --> None
93
94 procedure Init_Appl_Proc_Descr
95 (Appl_ID : in Mission_Parameters.APID;
96 Descr : in Appl_Proc_Descr);
97
98
99 --% Subprogram:
100 -- Increment and return TC counter
101 --% Parameter Constraints:
102 --> None
103 --% Exceptions Raised:
104 --> None
105
106 function Get_Next_TC_Counter
107 (Source : Mission_Parameters.Source_ID;
108 Destination : Mission_Parameters.APID)
109 return PUS_Data_Types.Sequence_Count;
110
111
112 --% Subprogram:
113 -- Increment and return TM counter
114 --% Parameter Constraints:
115 --> None
116 --% Exceptions Raised:
117 --> None
118
119 function Get_Next_TM_Counter
120 (Source : Mission_Parameters.APID;
121 Destination : Mission_Parameters.Destination_ID)
122 return PUS_Data_Types.Sequence_Count;
123
124 --% Subprogram:
125 -- Increment and return TM packet sub-counter
126 --% Parameter Constraints:
127 --> None
128 --% Exceptions Raised:
129 --> None
130
131 function Get_Next_TM_Packet_Subcounter
132 (Source : Mission_Parameters.APID;
133 Destination : Mission_Parameters.Destination_ID;
134 Service : PUS_Data_Types.Service_Name)
135 return PUS_Data_Types.Packet_Subcount;
136
137 end Packet_Counters_Manager;
138
139 --~-----------------------------------------------------------------------------
140