1.
..."sub modules" provide support for on-demand loading
...All sub modules are automatically loaded AFTER $FG_ROOT/Nasal has been processed
So on-demand or automatically?
Folks waste hours trying to guess the real nasal behaviour after the manuals.
As i guess, we need switch "enabled" to "true" to load them on demand.
2.
... Submodules are loaded _after_ the main fgdata/Nasal scripts,
so they can rely on all fgdata/Nasal content to be already present.
so why _setlistener instead of setlistener is used in example
- Code: Select all
_setlistener("/nasal/my_module/loaded", init);
- Code: Select all
_setlistener("/sim/signals/nasal-dir-initialized", mycode);
3.
there are some tricks in xml to express what you want, for example
the following seq gives us module test1 listed in /nasal/test1/file[0-2] property tree
with only one property /nasal/test1/loaded
- Code: Select all
<nasal n="0">
<test1 n="0"><file n="0">Aircraft/test/Nasal/test/test1_1.nas</file></test1>
<test1 n="0"><file n="1">Aircraft/test/Nasal/test/test1_2.nas</file></test1>
</nasal>
<nasal n="0">
<test1 n="0"><file n="2">Aircraft/test/Nasal/test/test1_3.nas</file></test1>
</nasal>
the following seq gives us module test1 listed in /nasal/test1[0-2]/file property tree
with three separated property /nasal/test1[0-2]/loaded
- Code: Select all
<nasal n="0">
<test1 n="0"><file n="0">Aircraft/test/Nasal/test/test1_1.nas</file></test1>
<test1 n="1"><file n="0">Aircraft/test/Nasal/test/test1_2.nas</file></test1>
</nasal>
<nasal n="0">
<test1 n="2"><file n="0">Aircraft/test/Nasal/test/test1_3.nas</file></test1>
</nasal>
and is there a way (similar to submodules) to load all files of test1 and check they
was loaded by single /nasal/test1/loaded?
4.
Nasal code in model XML files
The code is load/unload as soon as tile loader decides to load/unload the model.
It is using two properies <load> and <unload>.
what models can be used with nasal embedded. I can't did it.
what is "the object has to be present at sim startup"?
what is namespace of the nasal code?