Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Plug files contain configs that are shared among multiple vehicles/platforms.  For example, the acomms driver is the same on every platform/vehicle that uses it, so there's just one plug_iAcommsDriver.moos file that is shared by all the different meta files.  If something changes in the driver configuration only the one file has to be changed.  

"But wait!" you say..  Different vehicles need to set different serial ports for the acomms driver.  Things that are shared but different (brilliant wording, I know) among vehicles can be set to a variableOf course there are some attributes, such as the name of a serial port, that are common to all vehicles but take different values on each one.  For these we can define a variable that nsplug will fill in when it generates the target moos file.  In the acomms driver it looks something like port=$(ACOMMSPORT).  Something similar is done in many other places, including the community name and MOOSDB port.  Then we tell nsplug the value of all these variables and it will fill them all in and generate a target moos file, such as targ_nostromo.moos.  Where do we call nsplug?  The launch script! 

P.S. - this all works for behavior files too.

...