A very convenient way to define a StaticSystem is by implementing BaseTypedSystem.
A very convenient way to define a StaticSystem is by implementing BaseTypedSystem.
Why is it so? We define both the outer world interface (inputs and outputs) and implementation (in defineSystem). Both are declared altogether, in the same class.
However there is another way for system's construction, which provides better decomposition. It is described in comment to TypedSystemConstructor
Extractor of contacts' data from result.
Extractor of contacts' data from result.
The context for system is a map from state handles to values.
The context for system is a map from state handles to values.
An interface of some object that can collect information about outer interface of a system.
An interface of some object that can collect information about outer interface of a system. Not only it create contact instances, but it usually transforms and collect them.
The simplest signal processor.
The simplest signal processor. Corresponds to FlatMap.
An encapsulation of the signal that targets a subsystem's internal contact.
An encapsulation of the signal that targets a subsystem's internal contact.
DSL for constructing systems.
DSL for constructing systems.
This builder supports step-by-step creation of contact system. At the end one must convert it to StaticSystem.
The builder supports the notion of extensions (much like akka actor system extensions). When we need to store additional information during system construction, we may request an extention instance from the builder. The builder creates the singleton instance if it is not available yet and returns it.
The builder is used in BaseTypedSystem as a DSL for system's construction.
An extension that adds some additional state to SystemBuilder.
An extension that adds some additional state to SystemBuilder. It also has an opportunity to adjust the generated StaticSystem via hook #postProcess
ExtensionId for a system builder.
ExtensionId for a system builder. Every extension can be installed only once on the same SystemBuilder. An instance of the extension is created by the extend method.
Implements a system of type T.
Implements a system of type T. Uses external SystemBuilder instance to define internal System's structure.
A function that takes a single signal on input and returns the last trellis element.
A function that takes a single signal on input and returns the last trellis element. This producer does not store managed state in it.
A snapshot of a running system at some discrete time moment.
A snapshot of a running system at some discrete time moment.
A function that makes single step (or a few steps) over time.
A function that makes single step (or a few steps) over time.
Another way for system's construction is to define inputs and outputs in a separate class/trait and then enumerate them in system builder: sb.inputs(in1, in2, in3) and sb.outputs(out1, out2)
Another way for system's construction is to define inputs and outputs in a separate class/trait and then enumerate them in system builder: sb.inputs(in1, in2, in3) and sb.outputs(out1, out2)
class MySystemsInterface { val in1 = new Contact[String]("in1") val in2 = new Contact[String]("in2") val out1 = new Contact[String]("out1") }
implicit object MySystemImplementation extends TypedSystemConstructor[T] { def apply(outer:T):StaticSystem = {
} }
The type of a handler that will handle exceptions during signal processing.
The type of a handler that will handle exceptions during signal processing. If the exception is recoverable, then the handler should provide a new Context for further processing. If not recoverable - throw some exception (or rethrow the original one).
This contact is used to process answers of internal system.
This contact is used to process answers of internal system.
This contact is used to process signals of internal system.
This contact is used to process signals of internal system.
In asynchronous execution the resulting signal should come at the same level of "call stack". However as far as we usually get the signal asynchronously it is processed at top level. So in order to run it in inside the subsystem, we package asynchronous result into Signal(SubsystemSpecialContact, SubsystemDirectSignal( name, actual resulting signal))
Create a contact with the given name.
Create a contact with the given name.
Usage: extension[LabellingExt].methodInExtension
Usage: extension[LabellingExt].methodInExtension
Automatic usage of extensions when an implicit extension id is present in the scope.
Automatic usage of extensions when an implicit extension id is present in the scope.
One may use notation (contact -> data) to represent a signal
One may use notation (contact -> data) to represent a signal
A system builder with inputs and outputs given in advance.
A system builder with inputs and outputs given in advance.