Library globals

Namespace globals . modules

View source

SPDX-License-Identifier: GPL-2.0-or-later

NOTE! This copyright does *not* cover user models that use these Nasal
services by normal function calls - this is merely considered normal use
of the code, and does *not* fall under the heading of "derived work."

Sub-namespaces

canvas_efis

dummy

------------------------------------------ dummy.nas empty file to avoid error message ------------------------------------------

repair_config

------------------------------------------------------------------------------- repair_config.mod This code repairs the userarchive flags for core nasal modules listed in defaults.xml, they may be wrongly set in the users home directory by earlier versions of FlightGear -------------------------------------------------------------------------------

Classes

Module

Class Module to handle a re-loadable Nasal module at runtime

Functions

commandModuleReload

isAvailable

load

setDebug

Variables

MODULES_DEFAULT_FILENAME

MODULES_DIR

------------------------------------------------------------------------------- modules.nas - Nasal module helper for Add-ons and re-loadable modules author: jsb created: 12/2019 ------------------------------------------------------------------------------- modules.nas allowes to load and unload Nasal modules at runtime (e.g. without restarting Flightgear as a whole). It implements resource tracking for setlistener and maketimer to make unloading easier. ------------------------------------------------------------------------------- Example - generic module load: if (modules.isAvailable("foo_bar")) { modules.load("foo_bar"); } Example - create an aircraft nasal system as module (e.g. for rapid reload while development) var my_foo_sys = modules.Module.new("my_aircraft_foo"); my_foo_sys.setDebug(1); my_foo_sys.setFilePath(getprop("/sim/aircraft-dir")~"/Nasal"); my_foo_sys.setMainFile("foo.nas"); my_foo_sys.load(); -------------------------------------------------------------------------------

MODULES_NODE