1<?xml version="1.0"?>
  2<class>
  3    <name>TELECOMMAND</name>
  4    <key-code>TC</key-code>
  5    <template>Telecommand extracted out of TC table with {%for p in payload%}{%if not forloop.first%}, {%endif%}{{p}}{%empty%}no parameters{%endfor%}</template>
  6    <renderer>telecommand</renderer>
  7    <db-table>TC_STORE</db-table>
  8    <description>Telecommand Packets - Events built on the fly from TC_STORE table</description>
  9    <!--
 10        <source>telecommand / TC_STORE</source>
 11
 12Storage options:
 13
 141. (Add a tc_name column in EVENTS table)
 152. Add/convert a JSONB column PROPERTIES replacing or in addition to the XML PROPERTIES
 163. Reimplement Event and EventClass to read directly from the TC_STORE table
 174. Replace the full set of properties with just NAME, and the Event constructor can
 18pull the rest from the TC table
 195. Add a new instance property type tc-event for PAYLOAD. Store everything as before.
 20The event viewer display code can pick this up, know
 21
 22sid_num, start_time, instance_properties:{spid=1}, event_class
 23
 24Details taken from:    MCS Software User Manual, MTG MOF, EGOS-EUD-S2K-SUM-1001
 25
 26    -->
 27    <instance-property>
 28        <name>Name</name>
 29        <description>Name of the Command</description>
 30        <type>string</type>
 31        <defaultview/>
 32    </instance-property>
 33    <instance-property>
 34        <name>Description</name>
 35        <description>Description of the Command</description>
 36        <type>string</type>
 37        <optional/>
 38        <defaultview/>
 39    </instance-property>
 40    <instance-property>
 41        <name>Sequence</name>
 42        <description>The name of the sequence which was used to load the command on the stack</description>
 43        <type>string</type>
 44        <optional/>
 45    </instance-property>
 46    <instance-property>
 47        <name>Domain</name>  <!-- Not available... -->
 48        <description>Prefix of the Domain originating the command. Obtained from configuration variable based on the domain identifier set in the
 49S2K packet header. In single domain mode this field is hidden</description>
 50        <type>string</type>
 51        <optional/>
 52    </instance-property>
 53    <instance-property>
 54        <name>Release_Time</name>
 55        <description>Time of command Released from MCS</description>
 56        <type>datetime</type>
 57        <optional/>
 58        <defaultview/>
 59    </instance-property>
 60    <instance-property>
 61        <name>Uplink_Time</name>
 62        <description>Uplinked time, command received on satellite</description>
 63        <type>datetime</type>
 64        <optional/>
 65    </instance-property>
 66    <instance-property>
 67        <name>Execution_Time</name>
 68        <description>Predicted time of command execution</description>
 69        <type>datetime</type>
 70        <optional/>
 71        <defaultview/>
 72    </instance-property>
 73    <instance-property>
 74        <name>Last_Update_Time</name>
 75        <description>The last time the packet was updated, e.g. with stage verification information</description>
 76        <type>datetime</type>
 77        <optional/>
 78        <defaultview/>
 79    </instance-property>
 80    <instance-property>
 81        <name>MRC_Flag</name>
 82        <description>Command Execution type: S for SRC Commands (Single Shot), 
 83M for MRC Commands (repeated every repeat cycle, ~9 days 22 hours), 
 84R for re-inserted MRC commands (after they have executed they are re-inserted in the command stack, 9 days 22 hours later)</description>
 85        <type>string</type>
 86        <optional/>
 87        <defaultview/>
 88    </instance-property>
 89    <instance-property>
 90        <name>Ops_Orb</name>
 91        <description>Orbit position: Orbit Number. This column is left empty for release-time based commands and for time-tagged commands</description>
 92        <type>uint</type>
 93        <optional/>
 94        <defaultview/>
 95    </instance-property>
 96    <instance-property>
 97        <name>Ops_Ang</name>
 98        <description>Orbit Angle expressed in degrees. This column is left empty for release-time based commands and for time-tagged commands</description>
 99        <type>float</type>
100        <optional/>
101        <defaultview/>
102    </instance-property>
103    <instance-property>
104        <name>S_D_C</name>
105        <description>S: Static, D: Dynamic, C: CEV; PTV Check State, where E => Enabled, D => Disabled or O => Overridden</description>
106        <type>string</type>
107        <optional/>
108        <defaultview/>
109    </instance-property>
110    <instance-property>
111        <name>G_B</name>
112        <description>Group flag value (G => in a group, E => last in a group, Block flag value (B => in a block, E => last in a block)</description>
113        <type>string</type>
114        <optional/>
115        <defaultview/>
116    </instance-property>
117    <instance-property>
118        <name>IL</name>
119        <description>Interlock Status, two characters, the first reports the interlock type and scope, the second, the interlock stage type</description>
120        <type>string</type>
121        <optional/>
122    </instance-property>    
123    <!--
124    Interlock Type and Scope
125    Symbol     Description
126        L     Wait-Fail Local
127        G     Wait-Fail Global
128        S     Wait-Fail Subsystem Local
129        F     Fail-Only Local
130        T     Fail-Only Subsystem Local
131
132    Interlock Stage Type
133    Symbol Description
134        R     1st UV stage: Ground Stn. Reception
135        U     2nd UV stage: Uplink
136        O     3rd UV stage: On Board Reception
137        A     Execution Ver.: Acceptance
138        C     Execution Ver.: Completion
139    -->
140        
141    <instance-property>
142        <name>ST</name>
143        <description>Source Type (MS => Man.Stack, AS => Auto Stack)</description>
144        <type>string</type>
145        <optional/>
146        <defaultview/>
147    </instance-property>
148    <instance-property>
149        <name>Source</name>
150        <description>Source workstation ID</description>
151        <type>uint</type>
152        <optional/>
153    </instance-property>
154    <instance-property>
155        <name>FC</name>
156        <description>Frame Counter: indicating current frame count. Only applicable for CLTU AD mode</description>
157        <type>uint</type>
158        <optional/>
159        <defaultview/>
160    </instance-property>
161
162    <instance-property>
163        <name>R_GTO_A_SS_1122_CC</name>
164        <description>Current command Verification Status. See MCS Software User Manual for full description.
165Colour coding comes from Status parameter.</description>
166        <type>string</type>
167        <optional/>
168        <defaultview/>
169        <choices>
170            <item>
171                <name/>
172                <use-colour>Status</use-colour>
173            </item>
174        </choices>
175    </instance-property>
176    <!--
177    R_GTO_A_SS_1122_CC, where:
178    R         Release from SCOS-2000 to the NCTRS. Note that a failure for this
179            stage may be caused by one of the following reasons:
180            PTV NOT OK at release time (the PTV state is visible in the CQD
181            PTV/CEV pane)
182            PTV OK (e.g. dynamic PTV was overridden) but no TCP/IP
183            connection between the releaser and the NCTRS was available at
184            release time
185            The command was successfully released but eventually rejected by
186            the NCTRS e.g. because the required connection to the station
187            equipment was not available at release time. In this case an
188            administrative message is also received from the NCTRS and
189            logged in the HFA.
190    G         Ground station reception (UV 1st stage)
191    T         Uplink a.k.a. radiation (UV 2nd stage) and in case of Throw Event
192            Command it corresponds to the Execution stage.
193    O         On-board reception a.k.a. transfer (3rd UV stage, only applicable in
194            AD mode)
195    A         On-board application acceptance
196    SS         Execution start - two instances of the stage are shown, one
197            corresponding to updates from Real Time and the other
198            corresponding to updates from Playback TM
199    11, 22, ... Execution step 'n' - two instances of each stage are shown, one
200            corresponding to updates from Real Time and the other
201            corresponding to updates from Playback TM
202    CC         Execution completion - two instances of the stage are shown, one
203            corresponding to updates from Real Time and the other
204            corresponding to updates from Playback TM
205    -->
206
207    <instance-property>
208        <name>Status</name>
209        <description>Task Status, colour coded according to the verification status of the command.</description>
210        <type>uint</type>
211        <optional/>
212        <choices>
213            <item>
214                <value>1</value>
215                <name>Failed</name>
216                <description>Something Failed</description>
217                <colour>Red</colour>
218            </item>
219            <item>
220                <value>2</value>
221                <name>Unverified</name>
222                <description>Something Unverified</description>
223                <colour>Orange</colour>
224            </item>
225            <item>
226                <value>3</value>
227                <name>Deleted</name>
228                <description>Something Timeout - Deleted</description>
229                <colour>LightSalmon</colour>
230            </item>
231            <item>
232                <value>7</value>
233                <name>Success</name>
234                <description>Passed state</description>
235                <colour>Lime</colour>
236            </item>
237            <item>
238                <value>4</value>
239                <name>Unknown</name>
240                <description>Something in unknown state</description>
241                <colour>Yellow</colour>
242            </item>
243            <item>
244                <value>5</value>
245                <name>Pending</name>
246                <description>Something in Pending state LightBlue</description>
247                <colour>LightBlue</colour>
248            </item>
249            <item>
250                <value>6</value>
251                <name>Idle</name>
252                <description>Something in idle state</description>
253                <colour>Cyan</colour>
254            </item>
255        </choices>
256        <defaultview/>
257    </instance-property>
258    <!--
259    This field is coloured according to the verification status of the command. The colours
260    listed below are the ones used as a default in the SCOS-2000 MISCconfig file.
261    Red         fail (i.e. at least one stage is in a fail state)
262    Light Red     uncertain failed (i.e. valid TM failing verification and after
263                verification window)
264    Orange         unverified (i.e. at least one stage is in a unverified state)
265    Orange         superseded (i.e. affecting stage opened while in state  PENDING)
266    Light Orange time-out (i.e. at least one stage is in a time-out state)
267    Light Orange affected (i.e. affecting stage opened while in state  UNKNOWN)
268    Yellow         unknown (i.e. at least one stage is in a unknown state)
269    Light Blue     pending (i.e. at least one stage is in a pending state)
270    Cyan         idle (i.e. at least one stage is in an idle state)
271    Light Green uncertain success (i.e. valid TM received passing
272                verification but after verification window)
273    Green         success (i.e. all applicable stages are in a success state)
274
275    If the command is disabled the background colour is marked in yellow.
276    The status of each individual verification stage may have one of the following values
277    (see Section for a description of the different verification states):
278        F     Fail
279        U     Unverified
280        X     Unknown
281        P     Pending
282        T     Time-out
283        S     Success
284        I     Idle
285        A     Assumed Passed
286        C     Affected
287        V     Uncertain Successful
288        N     Uncertain Failed
289        E     Superseded
290        Blank N/A
291    The following behaviour of a time-tagged commands verification status are extended:
292    If a time-tagged command is deleted prior to execution, a string 'DELETED' is showed
293    in verification stage field
294    If a time-tagged command is disabled at execution, EV stages are marked as 'D'
295    -->
296
297    <instance-property>
298        <name>Param_Data</name>
299        <description>Packet TC Parameter data values</description>
300        <type>json</type>
301        <optional/>
302    </instance-property>
303    <instance-property>
304        <name>APID</name>
305        <description>Packet APID</description>
306        <type>uint</type>
307        <defaultview/>
308    </instance-property>
309    <instance-property>
310        <name>Type</name>
311        <description>Packet Type</description>
312        <type>uint</type>
313        <optional/>
314    </instance-property>
315    <instance-property>
316        <name>SType</name>
317        <description>Packet SubType</description>
318        <type>uint</type>
319        <optional/>
320    </instance-property>
321    <instance-property>
322        <name>Uplink_Flag</name>
323        <description>High Priority Flag</description>
324        <type>uint</type>
325        <optional/>
326    </instance-property>
327    <instance-property>
328        <name>Map_Id</name>
329        <description>The displayed value corresponds to the value currently specified in the Map ID field of the TC
330Uplink Configuration panel. It is used by the command Releaser in order to encode the released data units.</description>
331        <type>uint</type>
332        <optional/>
333    </instance-property>
334    <instance-property>
335        <name>PTV_Status</name>
336        <description>Current status of PTV checks</description>
337        <type>uint</type>
338        <optional/>
339    </instance-property>
340    <instance-property>
341        <name>Overall_Ver_Status</name>
342        <description>Overall verification status, indicating which different stage statuses request currently has</description>
343        <type>uint</type>
344        <optional/>
345    </instance-property>
346    <instance-property>
347        <name>Uplink_Mode</name>
348        <description>Command Uplink mode (AD/BD)</description>
349        <type>uint</type>
350        <optional/>
351    </instance-property>
352    <instance-property>
353        <name>Check_States</name>
354        <description>Encoded block indicating whether the PTV/CEV checks are enabled, disabled or overridden</description>
355        <type>uint</type>
356        <optional/>
357    </instance-property>
358    <instance-property>
359        <name>Group_Block_Info</name>
360        <description>Encoded block indicating whether start/middle/end of group or block</description>
361        <type>uint</type>
362        <optional/>
363    </instance-property>
364    <instance-property>
365        <name>Interlock_Type</name>
366        <description>Indicating NONE, LOCAL, GLOBAL, SUBSYSTEM</description>
367        <type>uint</type>
368        <optional/>
369    </instance-property>
370    <instance-property>
371        <name>Interlock_Stage_Type</name>
372        <description>Type of stage, e.g. Acceptance, Completion</description>
373        <type>uint</type>
374        <optional/>
375    </instance-property>
376    <instance-property>
377        <name>Ext_Source_Id</name>
378        <description>External procedure source id</description>
379        <type>uint</type>
380        <optional/>
381    </instance-property>
382    <instance-property>
383        <name>Num_Verification_Results</name>
384        <description>Number of execution verification stages in this request</description>
385        <type>uint</type>
386        <optional/>
387    </instance-property>
388    <instance-property>
389        <name>Variable_Data</name>
390        <description>Variable Command data holding CMDparam stucture, CMDdataDetails</description>
391        <type>string</type>
392        <optional/>
393    </instance-property>
394    <instance-property>
395        <name>Hex_Data</name>
396        <description>JSON block holding full packet contents in Hex format</description>
397        <type>json</type>
398        <optional/>
399    </instance-property>
400</class>