This repository contains some demonstrations of documentation generated automatically for real-time control programs developed with the MARTe2 system.
The MARTe2-tools repository (not yet published in public) contains three applications for parsing and analysing MARTe2 application descriptions. MARTe2 applications can be described using three alternative formats : cdb (configuration database - the traditional markup), json, and XML.
- CfgToString.ex : creates a large C string variable from a complete application file.
- CfgToCfg.ex : transforms an application description from cdb/json/xml to cdb/json/xml
- CfgToDot.ex : generates a series of several graphviz (dot) graphs which describe parts of the application
See this detailed explanation with an example application.
A MARTe2 application is defined in several stanzas which describe respectively :
- Interfaces : optional components that provide bindings to external applications over a variety of protocols (HTTP, CA, ...)
- StateMachine : an optional component for applications which require several states. One state is active at one time.
- Data Sources and Data Sinks : mandatory components which provide the route for data into or out of the real-time threads.
- States : at least one state, which must hold at least one Real-Time thread.
- Real-Time Threads : a container of functions and other executable objects which implement a data pipeline
- Scheduler/Timer : a supervisory service for orchestrating the pace of real-time threads.
sequenceDiagram
participant P as Power Function
participant R as Real-Time Thread
participant So as Data Source
participant B as Broker
participant Si as Data Sink
R->>So: Read(Voltage)
So->>B: Execute()
B->>R: return ADC(Ch.1).Read()
R->>So: Read(Current)
So->>B: Execute()
B->>R: return ADC(Ch.2).Read()
R->>P: Execute(Current, Voltage)
P->>R: return I*V
R->>Si: Write(Power)
Si->>B: Execute()
B->>R: DAC(Ch.1).Write()