How to add new function

If you want to add new function to LibamtrackWeb all you need is to follow this steps:

1. Prepare special JavaScript wrapper function to use compiled from C library function. Use JSFunctionGenerator to quickly get wrapper method from C function’s signature. More details how to use this tool you can find clicking green button ‘show help’ on the tool’s page.

Warning

During development remember to restart your local server, because auto import plugin generates dependencies to functions during start.

  1. Put wrapper function into /src/functionsFromC directory.
  2. Prepare JSON that describes functions. See details in Function configuration JSON.
  3. Put prepared JSON into directory /src/static/json/<category_name>/
  4. Add all required dictionaries to /src/static/json/dictionaries/. See details in Dictionary JSON.
  5. Prepare new category or add function to existing one in Global Configuration JSON, which can be found in /src/static/json/GlobalConfig.json.
  6. Rebuild app and test :)