Package gov.nasa.jpl.aerie.merlin.protocol.model


package gov.nasa.jpl.aerie.merlin.protocol.model
Interfaces implemented by a mission 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 ModelType interface 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 to Class. It provides access to its directive types and configuration type, as well as the ability to instantiate the underlying model type.
  • The InputType interface 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 the Classes provided by Method.getParameterTypes(). The model itself accepts input as configuration, and its directive types accept input to modulate the behavior of the resulting directives.
  • The OutputType interface 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 the Class returned by Method.getReturnType(). The model produces such output from directives and resources.
  • The DirectiveType interface describes a directive type, a family of behaviors that the model can perform. As a reflective interface, it is roughly analogous to Method. It includes an input type, an output type, and a facility for constructing an executable Task against a model instance.
  • The Resource interface describes a resource, an observable value computed based on the model's internal state. As a reflective interface, it is roughly analogous to Method. It includes an output type and a facility for querying a value of that type from a model instance.
  • The CellType interface 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 to Field.