About Realtime Configuration

A realtime configuration is a package gathering the different realtime tasks and the mapping that describes how functional model elements are executed, scheduled, and integrated into the realtime platform. This is the input given to the code generation configurations.

This page discusses:

See Also
Configuring Realtime For C and C++ Code Generation

Realtime Mapping

You 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 Strategies

You 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 Characteristics

You 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 Elements

Functional 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 Assembly

Consider a small embedded application with two software parts deployed as instances:

  • A controller that runs the lamp logic (states such as off, on, blinking) in a classifier state machine.
  • A button that detects press and release, also modeled as a classifier state machine, and that can notify the controller.

At runtime, these parts usually do not share a single anonymous loop:

  • The controller is often executed on a periodic task (for example every 10 ms) so lamp state and timeouts advance reliably.
  • The button is often handled on an event task (or a separate periodic task with a shorter period), because user input arrives unpredictably.

In the realtime configuration editor, you can create two tasks, then map:

  • The controller instance’s classifier statemachine to a periodic task
  • The button instance’s classifier statemachine to an event task.

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.