The new version 20170909-153823 is available as of today. Master server admins can apply this update as soon as they can. This new version is bringing several enhancements.
Scripts are customized routines written by BrandMeister developers or BrandMeister server administrators. They run each time a call reaches the master server. Ensure they run quickly and efficiently is therefore critical.
Added Lua traceback to logging on segfault
This will ensure speedy debugging whenever someone writes a custom script that causes the server to crash.
Added new function getLinkReference to Scripting
When writing scripts, BrandMeister passes certain values to LUA certain , one of them being the name of the link driver (for ex: dv4mini, ip-siteconnect, etc.). The standard way to branch based on the driver type was to perform a string comparison which is extremely CPU taxing. This special function created by the developer of Brandmeister returns a pointer reference to the driver, which will make the comparaison reference extremely fast. This new function will help optimizing the performance of LUA and the scripts, and therefore the performance of the BrandMeister server.
Added link references in Scripting to many objects
In the same fashion as above, many objects usually passed in a format that is both inefficient to compare and requires the garbage collector to perform additional tasks, many objects are now passed by reference.
Optimized embedded Scripting by replacing returned values sets by index function
Due to the nature of the language, each object passed from BrandMeister to the LUA virtual machine ends up with its own type in LUA. This conversion cost a lot of CPU cycles. This is especially problematic considering that BrandMeister passes a lot of data (context and event parameters) to LUA using one unique structure which provides the script with all the information it might need.
With this new version, the BrandMeister developer created a function Index Meta Method, passing to LUA only necessary information and leaving the rest in an outside structure which can be called by LUA using Index Meta Method when needed. This way, all values required by the LUA code will be delivered on-demand. This saves a lot of CPU cycles for data conversion, as well as those used by the garbage collector.
Once this optimization has been added, the developers were actually astonished by the significant performance improvement, which in return guarantees a DMR network always more efficient.
As requested by several users, the repeater path for outgoing APRS packets is being added to the digipath field of the AX.25-formatted message. For this to work, the repeater where the position information is sent must be connected directly to a BrandMeister server (will not work through gateways)