1.0 KiB
1.0 KiB
Examples
This directory contains example projects demonstrating different features and usage patterns of mdt.
Directory Structure
examples/
simple/ # A basic, single-file application
complex/ # A multi-file project with custom schema
README.md # This file
Running Examples
Prerequisite: mdt must be built (or installed). The Makefiles in the examples assume mdt is available at ../../build/mdt.
Simple Project
Demonstrates a minimal setup:
- Single
main.martefile. - Basic Thread and GAM definition.
Run:
cd simple
make check
make build
Complex Project
Demonstrates advanced features:
- Multi-file Structure:
src/app.marte(Logic) andsrc/components.marte(Data). - Namespaces: Use of
#packageto organize nodes. - Custom Schema:
.marte_schema.cuedefines a custom class (CustomController) with specific metadata (#meta.multithreaded). - Validation: Enforces strict typing and custom rules.
Run:
cd complex
make check
make build