Package org.kigalisim

Class KigaliWasmSimFacade

java.lang.Object
org.kigalisim.KigaliWasmSimFacade

public class KigaliWasmSimFacade extends Object
Facade which offers access to JS clients.

Entry point for the KigaliSim command line application which can run simulations from within the browser via TeaVM.

  • Constructor Details

    • KigaliWasmSimFacade

      public KigaliWasmSimFacade()
      Constructs a new KigaliWasmSimFacade.
  • Method Details

    • getVersion

      public static String getVersion()
      Returns the version of KigaliSim.
      Returns:
      The current version string.
    • execute

      public static String execute(String code)
      Executes all scenarios in the provided QubecTalk code and returns the results.
      This method parses and executes the provided QubecTalk code, running all scenarios defined in the code. It returns a formatted string containing:
      • A description of the execution result: either "OK" for success or "Error: message" for failure.
      • A blank line
      • The CSV contents with the simulation results
      Parameters:
      code - The QubecTalk code to execute.
      Returns:
      A formatted string with execution status and CSV results.
    • executeScenario

      public static String executeScenario(String code, String scenarioName)
      Executes a single scenario from the provided QubecTalk code.
      Parameters:
      code - The QubecTalk code to execute.
      scenarioName - The name of the specific scenario to execute.
      Returns:
      A formatted string with execution status and CSV results for the single scenario.
    • main

      public static void main(String[] args)
      Required entrypoint for wasm.
      Parameters:
      args - ignored arguments