type FwDpIdType = U32
+dictionary constant a = 1
+dictionary array A = [3] U32
+dictionary struct S { x: U32, y: F32 }
+dictionary type T = S
+dictionary enum E { A, B }
From 090544f26034b83d18905f3262a22d9d5202ca79 Mon Sep 17 00:00:00 2001
From: Rob Bocchino
If a type definition D is a dictionary definition, then the type -defined by D must be a displayable type.
-If a constant definition D is a dictionary definition, then the expression appearing in D must have one of the following types:
If a type definition D is a dictionary definition, then the type +defined by D must be a displayable type.
+Framework definitions are type and constant definitions that -are specially used by the F Prime Framework. If a model defines -framework definitions, they must conform to the rules described -in the the FPP Specification.
+One of the artifacts generated from an FPP model is a dictionary +that tells the ground data system how to interpret and display +the data produced by the FSW. +By default, the dictionary contains representations of the following +types and constants defined in FPP:
+Types and constants that are known to the framework and that are
+needed by every dictionary, e.g., FwOpcodeType.
Types and constants that appear in the definitions of the data produced +by the FSW, e.g., event specifiers or telemetry specifiers. +(In later sections of this manual we will explain how to define +event reports and +telemetry channels.)
+To write a framework definition, we write the type or constant -and ensure that the definition follows the rules for that -framework definition.
+Sometimes you will need the dictionary to include the definition of a type or +constant +that does not satisfy either of these conditions. +For example, a downlink configuration parameter may be +shared by the FSW implementation and the GDS and may be otherwise unused +in the FPP model.
For example, to write the FwDpIdType framework definition,
-we would write an alias FwDpIdType that represents an
-integer type:
In this case you can mark a type or constant definition as a dictionary +definition. +A dictionary definition tells the FPP analyzer two things:
+The definition should be included in the model, even if it +isn’t used anywhere in the model.
+Whenever a dictionary is generated from the model, the definition should be +included in the dictionary.
+To write a dictionary definition, you write the keyword dictionary
+before the definition.
+You can do this for a constant definition, a type definition,
+or an enum definition.
+For example:
type FwDpIdType = U32
+dictionary constant a = 1
+dictionary array A = [3] U32
+dictionary struct S { x: U32, y: F32 }
+dictionary type T = S
+dictionary enum E { A, B }
To write the Fw.DpCfg.CONTAINER_USER_DATA_SIZE framework definition,
-we would define modules Fw and DpCfg and write a constant
-CONTAINER_USER_DATA_SIZE with an integer type:
Each dictionary definition must observe the following rules:
+A dictionary constant definition must have a numeric value (integer or
+floating point),
+a Boolean value (true or false), a string value such as "abc", or an
+enumerated constant value such as E.A.
A dictionary type definition must define a displayable type, i.e., a +type that the F Prime ground data system knows how to display. +For example, the type may not be an +abstract type. +Nor may it be an array or struct type that has an abstract type +as a member type.
+For example, the following dictionary definitions are invalid:
module Fw {
- module DpCfg {
- constant CONTAINER_USER_DATA_SIZE = 1
- }
-}
-An FPP model may include type and constant definitions -that are dictionary definitions. These definitions describe -type and constant definitions that will be output to the -dictionary.
-To write a dictionary definition, prefix an array, struct,
-alias, or constant definition with the dictionary keyword.
-For example, to define a constant dictionary definition
-we write the following:
dictionary constant a = 1
-To define an array dictionary definition, we write the following:
-dictionary array a = [3] U32
-dictionary constant a = { x = 1, y = 2.0 } # Error: a has struct type
+dictionary type T # Error: T is an abstract type
b.fpp, not a.fppi.
Dictionary specifiers define the location of constant or type -dictionary definitions. +
A dictionary specifier defines the location of a
+dictionary definition.
To write a dictionary specifier, write a location specifier and include
the dictionary keyword before the constant or type keyword.