Ratatosk is a set of executables and libraries for real-time communication and data exchange, with focus on interfacing ship systems for purposes such as logging, monitoring and control. Ratatosk includes an API which provides a bridge between ship systems and your own software, as well as a set of executables with ready-made functionalities.
Ratatosk builds on Data Distribution Service (DDS) and adds
A vessel installation will typically consist of a range of distributed executables (Ratatosk components), controlled by one Ratatosk Manager per physical computer. The Managers are responsible for keeping the specified components running and for performing e.g. periodic tasks. The Ratatosk Components typically read data from an onboard sensor or system, and make it available on the DDS bus. But they can also write data from the DDS bus to files or send data from the DDS bus to ship systems.
The figure below shows how a simple, generic installation might look. Red arrows show communication over proprietary protocols, while green arrows show communication over DDS.
A Data Distribution Service (DDS) is a middleware standard developed by the Object management Group (OMG). It works as a network middleware, that simplifies network programming and implements a publish-subscribe pattern for sending and receiving data between applications.
In a publish-subscribe message pattern, a publisher creates categories for its messages, and publishes its messages in these categories. The system can be topic-based or content based. In a topic-based system, messages are published to topics and a receiver can subscribe to this topic. In a content-based system, the subscriber defines a set of constraints for the contents of a message, and recieves a message only if it matches these constraints. In both these methods of message filtering, the publisher does not send the message to an explicit reciever, but simply makes it available for subscribers.
DDS uses a topic-based publish-subscribe message pattern.
In Ratatosk, publisher and subscribers are created as Ratatsk components.
Topics are the units of information in a DDS. They consist of a topic name (e.g. "depth", "temperature", "speed"), a topic type and a set of Quality of service properties.
In ratatosk a topic is created with an arbitrary topic name, and a topic type from a collection of predefined types (see Ratatosk Topic Types).
OMG DDS includes Quality Of Service parameters such as reliability, bandwidth, delivery deadlines, and resource limits, to offer the user greater control of the performance of the service.
A domain represents a global data space and is uniquely identified by an integer domain ID. A DDS entity can only interact with entities within the same domain.
Partition is a QoS which provides another way to control which DataWriters and DataReaders which can communicate. Partition names are strings, and only DataWriters and DataReaders that belong to the same partition can talk to each other.
YAML (acronym for "yaml Ain't Markup Language") is a human-friendly data serialization language, often used for configuration files.
Ratatosk uses YAML-files as inputfiles to its components, where YAML-mappings (unordered sets of key-value pairs) define options, signals, values, expressions etc. (see Ratatosk Components and Ratatosk Components Extra). Each key in such a mapping can contain several values, by the use of YAML block sequences (a leading "-" before each value).
Muparser is a mathematics parser library written in C++. Mathematical expressions are transformed into bytecode, and constant parts are precalculated.
Ratatosk utilize muparser for enterpreting mathematical expressions defined in the YAML-files.