Skip to content

Sending a delayed signal

Leon Starr edited this page Sep 5, 2021 · 1 revision

You can specify a duration to wait before dispatching an event to the target instance using the at @ symbol:

Off -> my heater @ heating interval

Here, the variable my heater (note that my is NOT a keyword) gets the event after the delay duration (as close to it as the MX can manage). To send a signal at a specific time, you can also use the @ symbol and supply a time value instead of a duration.

On -> the air conditioner @ time to cooldown

In this example, a time value is stored in the time to cooldown variable. To avoid confusion for the readers of your action language, name your times and delays appropriately as in the examples above.

An error results if the scalar value after the @ is not a time or duration based data type. No, you can’t just use Integer!

Canceling a delayed signal

Use the cancel signal !-> symbol to cancel a delayed signal:

On !-> the air conditioner @ time to cooldown

Introduction

Model semantics

Flows (as Variables)

Constants and literals

Structure of an activity

Accessing the class model

Data flow


Grammar and parsing notes

Components

Clone this wiki locally