-
Notifications
You must be signed in to change notification settings - Fork 0
Home
AMS Wiki
AMS Source code (private)
AMS Discussion (private)
AMS Open Issues (private)
AMS Closed Issues (private)
AMS is a Lua library package for FlyWithLua.
It allows a precise control over the tasks called at each loop and provides additional integration with X-Plane SDK.
FlyWithLua's architecture limits the uses of local functions, because all the callbacks need to have the functions on the global scope.
AMS, on the other hand, has been designed to allow the use of local functions for the callbacks, avoiding any conflict between the scripts.
AMS implements a task management that allows one to pause, resume and kill each running process.
A task can even kill and pause itself, or move from a loop to another.
AMS tasks are executed as protected calls, thus every error generated by the called process doesn't stop the interpreter.
When a task generates a certain amount of consecutive errors, that can be set by the user, the process gets automatically killed. All the error messages are reported in the log file.
AMS takes track of the CPU usage of every task, giving information on the average and peak speed as well as the real-time value.
This is useful to monitor the performance of the running processes and make a better optimization.
AMS implements a system to take track of the datarefs' access requested by the scripts, to avoid duplicate access for the ones used by multiple scripts. It also takes care of making the custom defined datarefs and commandrefs visible to DatarefTool.
FlyWithLua adopted the quarantine mechanism to detect and remove faulty scripts. This system, though, has some side effects, such as moving the faulty script outside the Script
directory as well as having issues related to false-positives.
AMS provides an alternative scripts loader that detects faulty scripts, reporting the error encountered in the log file, without moving it.
All the scripts are loaded in protected mode, so the eventual errors on the script don't stop the interpreter.
AMS can install its Kickstarter to get automatically loaded upon FlyWithLua startup.
This allows AMS to take control of all the scripts available, not only the ones that explicitly require it, tracking their performance and dataref usage.
AMS can divert all the output messages to a dedicated log file called AMS_debug.log
that can be found in X-Plane's main dir. This makes it easier to browse the log and check for error messages.
AMS's logger will take care of automatically inserting the timestamp and the name of the script at the beginning of each entry in the file.
AMS lays on top of FlyWithLua to get access to X-Plane SDK; it also implements it's own SDK wrapper to add functions missing in FlyWithLua.
The following is the block diagram of AMS used just as packages, called by the scripts that need it, and used with Kickstarter, where AMS takes control of all the installed scripts.
AMS an Advanced Library Package for FlyWithLua
Updated to v.1.55a (private alpha)
Copyright (C) 2021 Pasquale Croce
- ams.core.kernel
-
ams.core.dref_mgr
- ams:create_dref()
- ams:create_command()
- ams:map_dref()
- ams.core.wm
- ams:register_window()
- ams.core.for_loop
- ams:for_loop()
- ams.core.spc
- ams:spc()
-
ams.core.procs_mon
- ams:procs_mon()
- ams.core.debug
- ams.core.config
- ams.sys.info
- ams.sys.timer
- ams.sys.win.timer
- ams.SDK.XPML
- ams.SDK.scenery
- ams.SDK.map
- ams.SDK.datarefs
- ams.SDK.AIplanes
- ams.SDK.menus
- ams.SDK.processing
- ams.SDK.graphics
- ams.xlua.math
- ams.xlua.strings
- ams.xlua.table
- ams.xlua.Vec2D
- ams.xlua.Const
- ams.xlua.Stack
- ams.carillon.carillon
- ams.utils.tts
- ams.install.loader