Difference between revisions of "Vessel module sequence diagram"
Jump to navigation
Jump to search
(Added category.) |
|||
Line 11: | Line 11: | ||
* After the scenario block was parsed and the initial vessel state set, Orbiter calls [[VESSEL2::clbkSetStateEx]]. | * After the scenario block was parsed and the initial vessel state set, Orbiter calls [[VESSEL2::clbkSetStateEx]]. | ||
* Now, the vessel is almost ready to be used. Before the simulation starts, Orbiter calls [[VESSEL2::clbkPostCreation]] to let the vessel set the animations and initialize other data which depends on the beginning simulation state. | * Now, the vessel is almost ready to be used. Before the simulation starts, Orbiter calls [[VESSEL2::clbkPostCreation]] to let the vessel set the animations and initialize other data which depends on the beginning simulation state. | ||
+ | |||
+ | [[Category: VESSEL]] |
Revision as of 11:20, 16 May 2021
Vessel creation
When Orbiter discovers a new vessel in a scenario file, a fixed sequence of events take place:
- Orbiter seeks the configuration file in the folder "config" or alternativly "config/Vessel" and parses it. If it has a "module" attribute, Orbiter loads the DLL (unless it was already loaded)
- If the DLL gets loaded the first time, Orbiter calls DLLInit.
- After that, Orbiter calls the callback function ovcInit, requesting the DLL to create a new VESSEL2 object
- When the VESSEL2 derived object was created and returned to Orbiter, Orbiter calls VESSEL2::clbkSetClassCaps together with a file handle to the current configuration file. (Note: its possible to have multiple configuration files point at the same DLL)
- When the vessel was initially created, Orbiter gives the current section of the scenario file to the vessel by calling the callback VESSEL2::clbkLoadStateEx.
- After the scenario block was parsed and the initial vessel state set, Orbiter calls VESSEL2::clbkSetStateEx.
- Now, the vessel is almost ready to be used. Before the simulation starts, Orbiter calls VESSEL2::clbkPostCreation to let the vessel set the animations and initialize other data which depends on the beginning simulation state.