Versions Compared

Key

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

...

Trebuchet populates it's application list and creates a listener for discovery data based on a JSON configuration file. On start up, the launcher looks for this file, called appConfiguration.json in the same folder as the Trebuchet executable. On first start up, a blank config file will be created and written to disk (the blank config should allow radar discovery on most systems).

If the app cannot parse the config file (usually due to a syntax error, or if the file is empty), no data will be displayed in the app:

...

The config file itself consists of two sections: ConnectionConfig and TrebuchetApps, which are the Radar Discovery Connection Details and the App Configuration respectively.

...

The first section of an appConfiguration.json file - ConnectionConfig, instructs the app how to listen for radar discovery data for the Radar Discovery section. For example:

DiscoveryIPAddress: The multicast address from which to expect the messages.

...

For example, a launcher used on a PC with a network IP address of 10.77.3.59the (auto generated) default config file:

Code Block
 "ConnectionConfig": {
    "DiscoveryIPAddress": "239.69.69.69",
    "DiscoveryInterface": "100.770.30.590",
    "DiscoveryPublishPeriod": 5000,
    "Port": 6317
  }

...

Mutually exclusive parameter groups ensure that only one of these modes can be selected for a given instance. Within the configuration file, they are treated as a separate list to ParameterGroups:.

...


When viewed in the UI, mutually exclusive groups are represented by a drop-down menu:

...

Once a group is selected, its constituent parameters are displayed.:

...

Special Treatment of Ipaddress and Port Parameters

Above the App Parameters panel in Trebuchet is the Connection Details panel, which contains the Hostname Use fixed address for all apps option, IP Address and Port fields. These The fields have some special characteristics unique to themselves.

If an app takes in parameters named ipaddress/ip_address and port as either global parameters (i.e. a blank group name) or as part of a Radar Group, then they will be translated to Hostname IP Address and Port in the radar. In other words, the values of Hostname IP Address and Port will always represent the radar’s connection details.

If you enter ipaddress and port as global options and do not see those options appear in the side panel, you should check to see if Hostname IP Address and Port are enabled in the connection panel. If the app cannot find these parameters in the config under the blank or Radar Group names, then these options will be greyed out.

...

Code Block
{
    "ConnectionConfig": {
      "DiscoveryIPAddress": "239.69.69.69",
      "DiscoveryInterface": "0.0.0.0",
      "DiscoveryPublishPeriod": 5000,
      "Port": 6317
    },
    "TrebuchetApps": [
      {
        "Name": "Radar Utilities",
        "Description": "CLIManage to manage radars and onboard trackers",
        "LaunchCommand": "",
        "ExePath": "C:\\Local\\Tools\\RadarUtilities-1.2.0.88\\RadarUtilities.exe",
        "ParameterGroups": [
          {
            "GroupName": "radar",
            "Parameters": [
              {
                "ShortForm": "i",
                "LongForm": "ipaddress",
                "Required": true,
                "HasArguments": true,
                "DefaultValue": "192.168.0.180"
              }
            ]
          }
        ],
        "MutualExclusiveGroups": [
          {
            "GroupName": "versioninfo",
            "Parameters": [
              {
                "ShortForm": null,
                "LongForm": "versioninfo",
                "Required": true,
                "HasArguments": false,
                "DefaultValue": ""
              }
            ]
          },
          {
            "GroupName": "reboot",
            "Parameters": [
              {
                "ShortForm": null,
                "LongForm": "reboot",
                "Required": true,
                "HasArguments": false,
                "DefaultValue": ""
              }
            ]
          }
        ],
        "ExecutionEnv": null
      },
      {
        "Name": "Radar Utilities 2",
        "Description": "CLI to manageManage radars and onboard trackers",
        "LaunchCommand": "",
        "ExePath": "C:\\Local\\Tools\\RadarUtilities-1.2.0.88\\RadarUtilities.exe",
        "ParameterGroups": [
          {
            "GroupName": "radar",
            "Parameters": [
              {
                "ShortForm": "i",
                "LongForm": "ipaddress",
                "Required": true,
                "HasArguments": true,
                "DefaultValue": "10.77.5.233"
              }
            ]
          }
        ],
        "MutualExclusiveGroups": [
          {
            "GroupName": "versioninfo",
            "Parameters": [
              {
                "ShortForm": null,
                "LongForm": "versioninfo",
                "Required": true,
                "HasArguments": false,
                "DefaultValue": ""
              }
            ]
          },
          {
            "GroupName": "reboot",
            "Parameters": [
              {
                "ShortForm": null,
                "LongForm": "reboot",
                "Required": true,
                "HasArguments": false,
                "DefaultValue": ""
              }
            ]
          }
        ],
        "ExecutionEnv": null
      }
    ]
  }

...