What I want to do feels like sending av event from one module to another (like pressing a button). But as I have searched it seems that it should be done in an other way becuase I haven't found any standard way to send av event trigger/notification.
My simple model consists of two mudules, 1 Generator and 1 Controller. I want the Generator to be able to set an internal boolean in the Controller to true (indicating that there has been a registration on a sensor). The controller has a thread that acts if there has been a registration since last time and then resets the bool to false (effectively ignoring and discarding more sensor registrations during the 5 second wait).
if(sensor_activity)
{
doStuff();
wait(5, SC_SEC);
sensor_activity = 0;
}
How should I send my signal from Generator to Controller?