module A {
- module B {
-
- }
-}
-From 57a4937d2cc189eeccbf6afaf1b3cc5cf84d3beb Mon Sep 17 00:00:00 2001
From: jwest115 XML limitation: The F Prime XML format supports
-only one level of C++ namespaces.
-Therefore nested modules are not translated properly to C++.
-As a workaround, you can use an underscore prefix.
-For example, instead of writing you can write The member GDS limitation: The F Prime GDS does not properly handle
-member arrays.
-Therefore, if you plan to use the F Prime GDS, then you should avoid
-using a struct type with a member array in the flight-ground interface (i.e.,
-commands, events, telemetry, and parameters). GDS limitation:
-The F Prime GDS currently assumes that all enums use the default representation
-size of XML limitation: The F Prime XML representation does
-not allow limits for telemetry channels
-of array or struct type. XML limitation: In most cases, a qualified name such as The component The type Similarly, the FPP constant To generate code in the various languages that F Prime uses, e.g.,
-C++, Python, XML.
+C++, JSON, and XML.
In this document, we will call these languages the target languages.5. Defining Modules
-
-
-@ This is module M
module M {
constant a = 0
-}
-module A {
- module B {
-
- }
-}
module A_B {
-
}
6.2.4. Member Arra
x
of the struct S
gets three copies of the value
10 specified for x
in the default value expression.6.2.5. Member Format Strings
@@ -2997,15 +2964,6 @@ 7.4. The Representation Type
U8 value
in C++.
I32
.
-Therefore, if you plan to use the F Prime GDS, then
-you should not use any enum with a specified representation
-type other than I32
in the flight-ground interface (i.e., commands, events, telemetry,
-and parameters).7.5. The Default Value
@@ -5685,11 +5643,6 @@ 9.7.5. Limits
each of whose members satisfies condition (1) or
condition (2).
9.10. Constants and Types
The name scoping mechanism emphasizes the hierarchical relationship
and prevents name clashes.
Switch.State
-in FPP becomes a qualified name such as Switch::State
when translating
-to C++.
-However, the F Prime XML format does not support the definition
-of constants and types as members of C++ components.
-Therefore, when translating the previous example through XML to C++,
-the following occurs:
-
-Switch
becomes an auto-generated C++ class
-SwitchComponentBase
.State
becomes a C++ class Switch_State
.SerialSplitter.splitFactor
-becomes a C++ constant SerialSplitter_SplitFactor
.
-We will have more to say about this issue in the sections on
-generating XML
-and
-generating C++.9.11. Include Specifiers
From ac02e9a99a789e6f28df5d90419b2519f7715c48 Mon Sep 17 00:00:00 2001
From: Rob Bocchino 20.4. Translation Tools
1. Introduction
1. Introduction
We recommend that you read this document before consulting that one.
XML limitations: -As of this writing, F Prime still uses an older XML format, e.g., -to support the Ground Data System (GDS). -Some features of FPP are not supported in the XML representation. -Where a feature is not supported in XML, we will call out this fact in a -note marked XML limitation. -As we phase out the XML code generation, we will phase in support -for all the features described here.
-GDS limitations: -It is currently possible to construct FPP models that are not -fully supported by the F Prime Ground Data System (GDS). -Where an FPP feature is not supported in the GDS, we will call out this -fact in a note marked GDS limitation.
-Overview: The rest of this document proceeds as follows. Section 2 explains how to get up and running with FPP. Sections 3 through 11 describe the elements of an FPP @@ -6351,6 +6334,34 @@
In most cases, a qualified name such as Switch.State
+in FPP becomes a qualified name such as Switch::State
when translating
+to C++.
+However, the F Prime XML format does not support the definition
+of constants and types as members of C++ components.
+Therefore, when translating the previous example to C++,
+the following occurs:
The component Switch
becomes an auto-generated C++ class
+SwitchComponentBase
.
The type State
becomes a C++ class Switch_State
.
Similarly, the FPP constant SerialSplitter.splitFactor
+becomes a C++ constant SerialSplitter_SplitFactor
.
+We will have more to say about this issue in the sections on
+generating XML
+and
+generating C++.
As shown, to write an instance specifier, you write the
keyword instance
and the name of a component instance
definition.
-In general the name may be a qualified name such as A.B
+In general the name may be a qualified name such as A.B
.
if the instance is defined inside a
module; in this simple
example it is not.
@@ -9947,7 +9958,11 @@
This section describes how to generate XML from FPP.
+The use of XML in F Prime is being phased out in favor of generating +JSON and directly generating C++. +However, the F Prime XML representation is still used, e.g., in +for specifying the layout of telemetry packets. +This section describes how to generate XML from FPP.
XML file names: The table XML File Names shows how FPP definitions are @@ -10254,12 +10269,6 @@
fpp-check
.
XML limitations: The XML translation has several -limitations. -For more information, see the text marked XML limitations elsewhere -in this manual.
-fpp-to-xml
.
-n
file : Write the names of the generated XML files
+
-n
file : Write the names of the generated C++ files
to file.
This is similar to the -n
option for
fpp-to-xml
.