An outer description of a system.
Transparent component whose internal structure can be represented as a StaticSystem.
Import components to core package.
Basis point of connection of other elements.
Basis point of connection of other elements. If auxiliary then it is drawn on the graph as a simple little circle.
It order to improve performance the contact is compared by referential equality (#eq()). That's why it is not a case class. However, this creates some inconvenience in serialization.
NB: the contact is not very well serializable. After deserialization we obtain a different instance of the contact. But in most cases the comparison is done by referential equality (.eq) and thus it won't do well.
In synapse-grid-akka there is a solution for Contact serializations.
ru.primetalk.synapse.akka.ContactSerializer.
The kind of link that does sequential transformation of data.
The system that can be embedded into some other static system.
The system that can be embedded into some other static system. It has specially processed state:
structure of the system
the handle within parent system that holds internal system's state. The handle points to the map (stateHandle -> value)
a few state handles that are shared between the parent system and child. During runtime processing current values from parent are copied to child state before processing any signals and copied back afterwards.
The Link is represented with a triple of two contacts and a linkInfo
The Link is represented with a triple of two contacts and a linkInfo
Special care is taken for type variants. Contacts are invariant because data is "set" and "get". However, the function is contra- and co- variant, because it is a function. So we have two additional types TL1, TL2.
LinkInfo are individually processed functions with different signatures.
Named is used to store graph specific information - label or name.
This link can connect contacts of the same type.
Prioritize contacts when some data passes through this link.
Prioritize contacts when some data passes through this link. Processes until the data is only on stopContacts. "Fires" starting from the initial contact until "firewall" contacts. TODO: move to Components.
Signal is a pair of contact and data on it.
Signal is a pair of contact and data on it. Two methods are provided to match those of pairs - _1 and _2.
Signal for remote transfer.
Signal for remote transfer. The real contacts are not quite well serializable (see Contact for details). Thus we use the position of the contact in the system's index.
Permanent contacts store shared state that can be updated with stateful links.
Special component that atomically updates state.
Special component that atomically updates state. It doesn't have any output contact.
Zips state value with the inner data and
Stateful elements of the system.
The kind of link that does sequential transformation of data.
The kind of link that does sequential transformation of data. The function itself has state that is transformed every time. Prefer to use StateZipLink (?)
The core class for SynapseGrid.
The core class for SynapseGrid. Contains an immutable description of a system.
input contacts of the system. Within the system it is prohibited to send signals on them.
output contacts of the system. Within the system it is prohibited to connect outgoing links to these contacts. This is due to the fact that the signals that come to output contacts are not processed within the system. They are delayed for processing by the outer system.
state identifiers for variables available within the system. The system itself is immutable and it is prohibited to save state somewhere in closures or global vars (due to thread unsafety). Instead the system's internal state is "provided" by runtime system in the form of map stateHandle->value. updates of states can be done only in a purely functional way.
inner parts of the system - links, subsystems and other blocks. They have inputs and outputs.
the system's name extension methods: unhandledExceptionHandler - user-defined exception handler. It can recover from exception by returning repaired Context, log it or rethrow. index - ContactsIndex styles - ContactsStyles
ExtensionId for a StaticSystem extension.
ExtensionId for a StaticSystem extension. Every extension can be installed only once on the same StaticSystem.
The extension can contain some additional state for system processing.
However, it is not recommended to add mutable state to otherwise immutable StaticSystem.
A component that has single input and single output.
An outer description of a system. Actual description is deferred to descendants. See also Links