Package gov.nasa.jpl.aerie.merlin.protocol.model
In analogy to regular Java, it can be helpful to think of the model as a kind of class, whose mutator methods are
described by directive types, whose getter methods are described by resources, whose constructor parameters are
described by a configuration type, and whose internal state is described by simulation cells. In this metaphor,
the interfaces implemented by the model (in the gov.nasa.jpl.aerie.merlin.protocol.model package) provide
reflective access to the mission model and
these features thereof. While a multi-mission driver cannot know about the types used by a model concretely,
it can work with them generically and at a distance by way of these interfaces.
The ModelType interface describes the mission
model as a whole, and is the starting point for any interaction with a model. See its documentation for details.
Here are some of the most important reflective interfaces:
- The
ModelTypeinterface describes the mission model as a whole, and is the starting point for any interaction with a model. As a reflective interface, it is analogous toClass. It provides access to its directive types and configuration type, as well as the ability to instantiate the underlying model type. - The
InputTypeinterface describes a type of data that can be accepted by the model. It provides facilities for constructing and validating input values. As a reflective interface, it is roughly analogous to theClasses provided byMethod.getParameterTypes(). The model itself accepts input as configuration, and its directive types accept input to modulate the behavior of the resulting directives. - The
OutputTypeinterface describes a type of data that can be produced by the model. It provides facilities for interrogating the type's schematic structure and serializing individual values of the type. As a reflective interface, it is roughly analogous to theClassreturned byMethod.getReturnType(). The model produces such output from directives and resources. - The
DirectiveTypeinterface describes a directive type, a family of behaviors that the model can perform. As a reflective interface, it is roughly analogous toMethod. It includes an input type, an output type, and a facility for constructing an executableTaskagainst a model instance. - The
Resourceinterface describes a resource, an observable value computed based on the model's internal state. As a reflective interface, it is roughly analogous toMethod. It includes an output type and a facility for querying a value of that type from a model instance. - The
CellTypeinterface describes the internal state of a model. It provides facilities for applying events to a cell and stepping it forward over time. As a reflective interface, it is roughly analogous toField.
-
ClassDescriptionCellType<Effect,
State> DirectiveType<Model,Arguments, Result> A type of directive that can be issued to a Merlin model.EffectTrait<Effect>A trait for performing effect-algebraic operations on a type.InputType<T>A type of data accepted as input by a Merlin model.A named parameter to anInputTypeA human-readable advisory concerning a subset of the arguments for an instance of anInputType.A reflection-friendly service for interacting with a simulation model.ModelType<Config,Model> A Merlin simulation model.OutputType<T>A type of data produced as output by a Merlin model.Resource<Dynamics>Task<Output>TaskFactory<Output>A factory for creating fresh copies of a task.