You should create a separate task, using the tasking functions described in “Synchronization of Primitive Activities” of this section. The task can be initiated in the
user_init()
function in theuser_activities.a
module.Use the input task to read inputs from the environment (possibly from the keyboard or an input file), and use the value setting functions to insert the changes into the Rational Statemate model. In order to simulate the passage of time, the
delay
function should be used between inputs.The outputs can be captured using the event callback mechanism, or they can be polled using a separate task.