Copyright VirtualSim 2004-2020 - All rights reserved
Interaction
Code
The Interaction base code is called at the requested frequency (or upon event or manual call) and the return values will tell what to do with the request to publish:
PROCEED
All parameters will be processed for publish
CONTINUE
Same as PROCEED but the same function will be called again immediately after (and not at next cycle)
LEAVE
Do nothing and stop looping (only way to quit a CONTINUE loop)
For subscribed Interaction: the Code section will be called after all parameters have been received.
Normally, it is in this section that the data of each parameter will be used and stored in the simulation environment.
In the above example, x and y variables (declared in the FedItem) are set with data coming from the Event that has triggered the Interaction (FedItem).
Then, the drawCircle runtime graphics function is called (so that to display a circle on the GUI map).
PROCEED is returned, meaning that all parameters will be processed to send the data thru the RTI.
Parameters
This part of the code is put just before sending the Interaction Parameters.
Some variables (like _userTime and _userTag) can be locally modified if needed.
You can see this code in the following function of the [database_name].intfc.cpp file: