vsTASKER 7 User Manual
×
Menu
Index

Code

 
This code part will belong to the scenario only and will be called after the scenario class code.
See here.
 
Code
1

Initialization

1. Initialization
This code is called automatically at system events.
Refer to the Developer Guide for more details on system phases/events.
2

Runtime

2. Runtime
This panel contains the Scenario runtime code. This code is called at the RTC frequency specified in Database (Runtime) but is not called in Freeze mode.
The Scenario implementation code is a function that must return a value:
  • AGAIN: the Scenario is called again at next cycle.
  • DONE: the Scenario finishes normally. All Entities are terminated. Simulation stops but can be restarted.
  • EXIT: the Scenario finishes normally, simulation stops and exits. 
The user can put whatever C/C++ code he wants there. This code can access all vsTASKER API, all included third party APIs and all user designed scenario and model data of the current database.
3

Display

3. Display
This panel contains the Scenario display code. This code is called two (2) times at the RTC frequency specified in Database (Runtime), even during the Freeze mode. It is a good idea to put here the Scenario visual representation on the OpenGL window (default) or the 3rd party application viewer.
 
  • BEFORE_DRAW: Called before Entity Draw functions are called.
  • AFTER_DRAW: Called once after Entity Draw functions are called.