Message Copy Semantics for Experiment Code

ASCET supports several message copy semantics for experiment code, i.e. code generated for PC or ASCET‑RP targets, and production code, i.e. code generated for ASCET‑SE microcontroller targets (see the ASCET‑SE User Guide for more information).

In the Experiment Code node of the Project properties window, one of three message copy semantics can be selected.

Restrictions
NON_OPT_COPY_FUNCTION

A copy is used for each message accessed within the process or method. The message values are read at the beginning of the process/method execution, and changed values are written back to the master message upon exit of the process/method.

Note

This semantics is not safe with respect to a method being called from other processes/methods that access the same messages.

If this semantics is selected, warnings are issued in the following cases:

NON_OPT_COPY_TASK

Note

This semantics most closely resembles the NON_OPT_COPY semantics of ASCET‑SE targets.

During task execution, a task-specific struct that holds a copy of each message accessed within the task. The values are read from the master messages by a special process executed at the beginning of the task, and changed values are written back to the master messages by another special process executed as the last process in the task.

If a task accesses no messages, no struct is generated because ANSI-C does not allow empty structs.

Note

Init tasks do not use message copies, they use the master messages.

If this semantics is selected, errors are issued in the following cases:

If this semantics is selected, warnings are issued in the following cases:

NO_COPY

No message copies are used, i.e. each access manipulates the master message.

Note

If used for offline simulation, this semantics is equivalent to the OPT_COPY semantics of ASCET‑SE targets, with respect to data integrity.

If used for online simulation, this semantics is unsafe.

A warning is issued if this semantics is used in combination with an ASCET‑RP target.

WMdl320 – disabling message copy generation might be unsafe with respect to data integrity