Improving CLI tool and improving documentation
This commit is contained in:
12
examples/complex/.marte_schema.cue
Normal file
12
examples/complex/.marte_schema.cue
Normal file
@@ -0,0 +1,12 @@
|
||||
package schema
|
||||
|
||||
#Classes: {
|
||||
CustomController: {
|
||||
#meta: {
|
||||
multithreaded: false
|
||||
}
|
||||
Gain: float
|
||||
InputSignals: {...}
|
||||
OutputSignals: {...}
|
||||
}
|
||||
}
|
||||
12
examples/complex/Makefile
Normal file
12
examples/complex/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
MDT=../../build/mdt
|
||||
|
||||
all: check build
|
||||
|
||||
check:
|
||||
$(MDT) check src/*.marte
|
||||
|
||||
build:
|
||||
$(MDT) build -o app_full.marte src/*.marte
|
||||
|
||||
fmt:
|
||||
$(MDT) fmt src/*.marte
|
||||
42
examples/complex/src/app.marte
Normal file
42
examples/complex/src/app.marte
Normal file
@@ -0,0 +1,42 @@
|
||||
#package complex_ex
|
||||
|
||||
+App = {
|
||||
Class = RealTimeApplication
|
||||
+States = {
|
||||
Class = ReferenceContainer
|
||||
+Run = {
|
||||
Class = RealTimeState
|
||||
+ControlThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { Controller }
|
||||
}
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
Class = ReferenceContainer
|
||||
+Controller = {
|
||||
Class = CustomController // Defined in .marte_schema.cue
|
||||
Gain = 10.5
|
||||
InputSignals = {
|
||||
Ref = {
|
||||
DataSource = App.Data.References
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Actuation = {
|
||||
DataSource = App.Data.Actuators
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Data = {
|
||||
Class = ReferenceContainer
|
||||
DefaultDataSource = DDB1
|
||||
}
|
||||
+Scheduler = {
|
||||
Class = GAMScheduler
|
||||
TimingDataSource = TimingDS
|
||||
}
|
||||
}
|
||||
24
examples/complex/src/components.marte
Normal file
24
examples/complex/src/components.marte
Normal file
@@ -0,0 +1,24 @@
|
||||
#package complex_ex.App.Data
|
||||
|
||||
+References = {
|
||||
Class = GAMDataSource
|
||||
Signals = {
|
||||
Ref = {
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
+Actuators = {
|
||||
Class = GAMDataSource
|
||||
Signals = {
|
||||
Actuation = {
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
+TimingDS = {
|
||||
Class = TimingDataSource
|
||||
}
|
||||
+DDB1 = {
|
||||
Class = GAMDataSource
|
||||
}
|
||||
Reference in New Issue
Block a user