The Device Simulator view, shown in Figure 8, is the default view of the Sedona Device Simulator tool. Use this view to manage the Device Simulator SVM. In the view, you can select an app file to run in the simulated device, as well as choose the simulation platform you wish to use. Once a simulation is running, the view provides device simulator SVM output that is useful for debugging purposes. The view also logs data on the provisioning process and any provisioning errors that occur.
The Device Simulator view consists of the four areas described below:
Files area
Located at the top portion of the view, in this area you will specify the parameters for running the Device Simulator:
Simulator App File - Use this field to select the app file you wish to run in simulation mode. The starting location in this
field is: !/sedona
. The file can be in either SAB or SAX format, the tool will convert as necessary. To the right of the field are associated
buttons for accessing the File Chooser and viewing the Text File Editor.
You cannot choose a file that is part of the platform archive, as this would corrupt the simulator bootstrap file. The tool
prevents you from doing this, displaying the following warning: “You cannot provision the Device Simulator with a bootstrap
app. Choose an app that is not part of the device simulator database.
Simulator Platform - Use this field to select the device simulator platform that the simulator app runs on. After selecting a Simulator App File, the Sedona platform database is examined and any device simulator archives found that are valid for the selected app file are displayed here. If only one simulator platform is detected, the field is populated with that platform. If multiple simulator platforms are detected this field displays a drop-down option list. In that case, select the simulator platform that represents the device type you intend to simulate.
SVM Output area
Located just below the files area, the SVM Output area displays the Device Simulator output, just as though you had connected to the debug port of an actual Sedona device running the app.
Logs area
Located in the bottom half of the view, the Logs area contains two tabs that provide additional information logged about the Device Simulator:
Provisioning Log tab - In order to run the selected Simulator App File, the simulator first bootstraps (loads) a default app for that platform, and then uses the Sedona provisioning tools to push the selected app to the platform. The progress of this provisioning process is displayed in this log.
Simulator Error Log tab - This log displays any errors that occur with the Device Simulator process during the bootstrapping or provisioning processes.
Buttons
Located to the left of the logs area, are the control buttons:
- Loads the Simulator App File onto the platform. This process first bootstraps the Device Simulator with the default app and scode available in the platform archive, and then re-provisions the platform with your selected Simulator App File.
The app functions will not affect your Niagara installation. The Simulator is run in a “sandbox” folder called “
sedonaDeviceSim
” which is created under your user folder: <niagara-release>/users/<username>/sedonaDeviceSim
). The SVM, scode, and app files are copied to this folder and run from this location. Also, the provisioning process writes
files to this location.
sandbox location. Stopping the SVM in this manner will not affect the Simulator App File in the original location.
- Stops running the SVM. Kill invokes the Sedona App’s “Quit” command which first saves the app in theIf you attempt to resume the simulation by clicking at this point, the app file in the sandbox will be overwritten. The app in the sandbox is overwritten at the start of every
process.
- Stops running the SVM and saves the Simulator App file running in the sandbox location to a file.
When you click Figure 9. The default filename is the original Simulator App filename that you began with.
, a File Chooser dialog box displays prompting you to choose a location to save the app file, and you can modify the filename, as shown inIf the filename you are saving is the same as an existing file, a prompt displays asking if you wish to overwrite the file.
If you click , the File Chooser displays again. If you click , the file is overwritten with the revised app saved from the simulator's sandbox.
Additionally, the SVM Output area shows that the Device Simulator has stopped, shows the filename and the location where the app file is saved, as shown in Figure 10.
Copyright © 2000-2014 Tridium Inc. All rights reserved.