Board index FlightGear Support Interfacing

Location of generic protocol and nasal scripts.

Connecting two computers, using generic protocol, connecting with Matlab?

Location of generic protocol and nasal scripts.

Postby Soi » Tue Nov 25, 2014 7:08 am

Hi,

I have two questions:
1. From my understanding, nasal scripts "must' be installed under data/Nasal directory. Can I install the nasal scripts elsewhere?
2. Generic protocols xml files "must" be install in data/Protocol directory. Can I install the xml files elsewhere?

Many thanks,
Soi
Soi
 
Posts: 45
Joined: Wed May 21, 2014 6:17 am
Location: Australia
Callsign: soi
Version: 3.2
OS: Windows

Re: Location of generic protocol and nasal scripts.

Postby Thorsten » Tue Nov 25, 2014 8:39 am

1. From my understanding, nasal scripts "must' be installed under data/Nasal directory. Can I install the nasal scripts elsewhere?


That's globally relevant Nasal scripts. Model-specific ones reside with their model, aircraft-specific ones with their aircraft and Nasal menu helper functions with the menu xml.

I guess the basic idea is that specific Nasal may be embedded in the relevant xml structures.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Location of generic protocol and nasal scripts.

Postby Hooray » Tue Nov 25, 2014 11:14 am

  • common Nasal modules are located in $FG_ROOT/Nasal, these are loaded automatically (via their *.nas file extension)
  • Nasal submodules are located in a sub folder below $FG_ROOT/Nasal
  • user-specific Nasal extensions may also live under $FG_HOME
  • otherwise, scripts can be pretty much everywhere - but may need to be explicitly/manually loaded - e.g. via io.load_nasal() or io.include() - or via the -set.xml file

Like Thorsten mentioned, you can put Nasal pretty much anywhere, including XML sections - or even non-nas files (which we are using in the MapStructure/ND frameworks) - but you may need to manually process those - otherwise, there are only a handful of C++ subsystems that contain hard-coded support for "Nasal sections" embedded in XML, e.g. GUI files or model files.

If you are thinking in terms of some kind of "addon", $FG_HOME would probably be a good place - alternatively, just put a loader script into $FG_ROOT/Nasal and load your stuff from anywhere

PS: $FG_ROOT/Protocols is almost certainly hard-coded somewhere, if you really wanted to maintain the protocol elsewhere, you could include it, but would still need to drop a "stub" into $FG_ROOT/Protocols
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests