Skip to main content

Program Editor

The Program Editor app is where users can directly create, edit, or delete SaviScript programs.

Each site has their own branch of the "main" set of programs, and site-specific programs can be written or adjusted. Robots connected and synced to the site's token are able to read and execute these programs. While each site will have different programs, all sites will have the same features listed below within the Program Editor.

note

In order to use this app, you will need authorization enabled on the Cloud Portal. If you cannot see Program Editor and believe you should have access, contact your administrator.

Features

Within the Program Editor app, there are three main features:

Example of the Program Viewer interface

Program Viewer

On the left panel of the app, the Program Viewer features a namespace-sorted list of currently existing programs as well as a search bar to find a specific program. Clicking on the dropdown expand button for each namespace shows all of the programs within that space. Selecting any of these programs will update the center column's Code Editor to show that program's code.

At the bottom of the Program Viewer, there are Delete Program and Add Program buttons.

Delete Program

Delete Program button

Select a program from the Program Viewer's list, and the Delete Program button will change from grey to green. Click the Delete Program button. Navigation to other programs will be locked, and a dialog prompt will populate at the bottom of the Viewer to confirm deletion. Type in "Testing" in the input box, then click Remove.

Add Program

Add Program button

Click the Add Program button. Program navigation will be locked, and the Code Editor will be cleared out to create a new program. In order to save a new program, the program must have:

  • a valid Program Name
  • a new or existing Namespace
  • a Program Icon
  • at least one line of code

The next section details more specifics about the Code Editor.

Code Editor

Code Editor screenshot

The Code Editor is the main feature of the Program Editor and occupies the app's center column. Here, new and existing programs can be editted and saved. There are four sections of the Code Editor:

  • Program Name Field: Title of the program. Name references are case sensitive and must be unique within the same namespace.
  • Namespace Field: Similar to a sub-folder or category, namespaces are declarative regions that provide a scope for programs within it. Case sensitive.
  • Code: Where the program's code is displayed. This section is editable, showing code line numbers and syntax highlighting.
  • Save Submission: Field to describe code changes (change history not currently viewable through the app) and to save edits. Program Name, Namespace, and Icon must be filled out alongside the code for changes to be saved.

Asset Viewer

Example of the Program Viewer interface

The Asset Viewer is located on the right sidebar of the Program Editor app. Assets are listed here, sorted by the "icons", "places", and "sounds" categories. Clicking on the dropdown icon to the left of the category names will expand and display all assets in that category. The search bar can also be used to find specific assets by name.

These assets can be used in SaviScript programs alongside commands to display icons, navigate to identified locations, play sounds, and much more. Some assets may be site-specific, such as places (location names on one site will not necessarily work on other sites). Some are universal, such as icons and sounds (these are available to all robots and sites on RelayCore). This Asset Viewer is helpful for viewing all available options while creating custom programs to fit each site's needs.

note

Some assets are listed with their file extension, i.e. ".svg". When using these assets in SaviScript code, do not include the extension, only use the file name!

Behavior

Keyword Suggestions

Currently, editing code through the Program Editor is supported with syntax highlighting and dropdown typing suggestions for keywords. However, suggestions are not narrowed down based on input data. For example, the SLEEP command only has one argument type - a time value in seconds. The Code Editor will suggest potential keywords when typing:

Add Program button

The Editor makes suggestions based on the 3 input, but these are not valid inputs, as it suggests .svg image assets in this example. Currently, all assets and keywords will populate as potential suggestions. Later updates may implement command-specific, syntax-specific, or site-specific assets, arguments, and/or keyword sorting.