Test Scripts...

This panel provides a miniature IDE for building test script programs on the real-time host. A test script runs during the second sub-cycle ( after inputs have been processes) of the simulation test cycle. See Test Script.

scripts.png 

Corner Controls

There are no Apply and Cancel buttons. Actions taken in this form take place on the real-time host immediately. It is essentially a remote-control for the compiler on the real-time host.

Expand All expandall.png

Expands the hierarchy tree showing script files on the real time host.

Collapse All collapseall.png

Collapses the hierarchy tree showing script files on the real time host to only show the immediate children of the Script Files node.

Demonstrate helpvideo00004.png

Opens a short video clip that demonstrates the basic workflow of this form.

Help help00005.png

Opens this section of the manual.

Script Files Tab

Script Files Tree

Shows the script source files present on the real time host. Double clicking on a file will open it in the editor.

Createscripts_create.png

Creates a folder on the real-time host under the selected folder in the Script Files tree. Select the type of folder to create from the drop down menu, enter a name for the folder in the text box, select what group it is to be a member of (see Group Table), then press the Create button. The types of folders are:

C Script

Folder initialized with a template for writing a script in the C language.

SWs Script:

Folder initialized with a template for writing a script in the SWs scripting language.

Python Script

Folder initialized with a template for writing a script in the Python scripting language.

Folder

Empty folder. Top level folders belong to a group.

Group

Selects the resource group the new script or top-level directory will belong to.

See Writing Scripts.

Group

Changes the group the selected script belongs to. See Group Table. This combo box is the one located directly above the Edit and Make buttons, not to be confused with the Group combo box above the Create button.

Edit

Opens the file selected in the Script Files tree in the Editor tab. The editor will download the file from the real-time host to allow the user to edit it, then upload it back to the host when it is saved.

Makemake.png

Runs the make command on the real-time host in the folder selected in the Script Files tree. Selecting a file in a folder suffices to select the folder for this command. Output from the remote make command will be displayed in the Make Output tab.

Deletedelete00006.png

Deletes the file or folder selected in the Script Files tree.

Upload Tab

File browser for uploading local files to the real-time host. The destination folder is the folder selected in the Script Files tree on the Script Files tab.

upload.png 

Edit Tab

Basic text editor with syntax coloring for some languages.

scripts-edit_tab.png 

New

Creates a new empty file. Use Save As... to give it a name.

Save

Saves the current file to the real-time host. This button is active only if the file in the editor has a name and has been modified.

Save As...

Saves the current file with a new name on the real-time host. This button is active only if the file in the editor has been modified.

Cut

Cuts the selected text from the file and puts it in the paste buffer.

Copy

Copies the selected text from the file into the paste buffer.

Paste

Pastes previously cut or copied text from the paste buffer to the current insertion point.

Undo

Undoes the previous change.

Redo

Redoes an undone change.

Save & Make

Saves the current file and runs the make command in the directory selected in the Script Files tree on the real-time host.

Make

Runs the make command in the directory selected in the Script Files tree on the real-time host.

Completion (Ctrl-space)

Type the beginning of a SimWB API call or keyword and hit Ctrl-Space. A popup window will appear will all the SimWB API functions that match the sequence of characters in front of the cursor. You can navigate the documentation from then on or select the function you are interested in and hit enter.

completion.png 

Clicking on a function name once will open the manual to that function. Hitting the enter key will insert the function into the source file being edited at the current cursor position.

The above tool bar buttons are also accessible through the menu bar or by right clicking in the editor pane to bring up a context menu.

Current Languagelanguage.png

Selects the language for syntax coloring. This is the unlabeled drop down menu in the lower left corner of the editor. The choice of language is normally automatic based on the filename extension. This control may be used to override the default, or to specify the language for a new file that hasn’t been given a filename yet.

Searchsearch.png

Searches for the previous or next occurrence of the text in the search box when the up or down arrows, respectively, are clicked on.

Make Output Tab

Displays output from the make command running on the real-time host.

make_output.png 

Scripts Tab

Displays a list of all the script programs built on the real-time host.

scripts_tab.png