Realtime MappingYou can use realtime mapping when you generate embedded C or C++ and must specify system tasks (period, priority, stack) and which model behaviors run on each task. Embedded platforms schedule work under strict timing and memory limits; allocating behaviors to tasks is how generated code fits that model instead of relying on the default behavior allocation. Tasking StrategiesYou can use tasking strategies to define how functional model elements are triggered during execution. They describe the execution model associated with the system elements, such as periodic, event-driven, or mixed.Timing Properties and Runtime CharacteristicsYou can use task properties to define the execution configuration of a task, including both timing constraints and runtime behavior, such as periods, priorities, scheduling policies, and resource allocation (stack size for example) settings. Functional Model ElementsFunctional model elements are UML behaviors and operation implementations owned by structural classifiers (for example blocks, components, or classes). They represent the executable functionality of the system, typically expressed as activities, statemachines, or operation methods, and they can be mapped to realtime tasks. Example: Simple Flashlight-Style AssemblyConsider a small embedded application with two software parts deployed as instances:
At runtime, these parts usually do not share a single anonymous loop:
In the realtime configuration editor, you can create two tasks, then map:
You set period, priority, and stack size in the realtime task table, then link the realtime mapping package to your C or C++ code generation configuration. This way, the generation knows how to schedule these behaviors. | |||||||||