1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Telecommands: `<CommandMetaData>` and what it defines.
//!
//! # Why a command is a container here
//!
//! XTCE describes a telecommand with its own vocabulary — a `<MetaCommand>` with an
//! `<ArgumentList>`, an inheritance link that carries `<ArgumentAssignment>`s, and a
//! `<CommandContainer>` whose entry list may name arguments, parameters and fixed values.
//! None of that is a new *shape*. It is a container of fields, selected by fixed values, and
//! that is exactly what a telemetry container is.
//!
//! So it is lowered into the machinery that already exists:
//!
//! * an `<Argument>` becomes a [`crate::Parameter`], qualified under the command that owns it
//! — the schema says an argument reference "is always resolved locally to the metacommand",
//! and two commands may each have a `MODE`;
//! * a `<CommandContainer>` becomes a [`crate::Container`];
//! * an `<ArgumentAssignment>` becomes a [`crate::MatchCriteria`] on the container, because
//! assigning a value to an inherited argument is how a command is specialised, and
//! comparing that same value is how an arriving packet is recognised as this command;
//! * a `<FixedValueEntry>` becomes an [`crate::EntryKind::FixedValue`].
//!
//! What is left over — which commands exist, what each one is called, which container packs
//! it and which arguments it takes — is [`MetaCommand`]. The interpreter and both code
//! generators need none of it: by the time they run, a command *is* a container. It is here
//! so that a caller can ask what commands a database defines, and so `xtce info` can say.
//!
//! # What the reference does with all this
//!
//! Nothing. `space_packet_parser` has no command support at all — the string
//! `CommandMetaData` does not appear in its source, and a definition carrying one loads with
//! the command half silently ignored. So unlike almost everything else in this crate, none of
//! this is checked against it. The oracle is the schema, quoted where it decides something.
use crate;
use crateNameId;
/// A `<xtce:MetaCommand>`.