Install and Test the Sensor Simulator

The Sensor Simulator allows you to call on the sensor APIs found in Kona while running your Xlet in the emulator. The Sensor Simulator is a J2SE application which simulates the QNX PPS file system, which is used on the radio for CAN sensor communication. The Sensor Simulator presents a GUI that allows you to view/change the sensor values. The Sensor Simulator loads a sensor_properties.xml file which contains the description of the sensors available on the target device.

Installing the Sensor Simulator

Download the FCAUconnectSimulator.jar and sensor_properties.xml for kona versions less than 1.1.126 or a sensor_properties.json file for versions 1.1.126 and greater from Downloads. Put the downloaded files under the root of your Xlet's Eclipse project. You start the simulator by executing the FCAUconnectSimulator.jar (java -jar FCAUconnectSimulator.jar) from a DOS prompt. At this point, you should have a GUI window open displaying the sensors. Next, launch your Xlet from Eclipse using the Xlet Emulator.

The simulator will read either the sensor_properties.xml or sensor_properties.json. Which ever is in the directory.

Testing the Sensor Simulator

  1. Create a new Jamaica project. Call it SensorSimulatorTest.
  2. Create a new package called simulator.
  3. Download SimulatorTestXlet.java from Downloads
  4. Copy SimulatorTestXlet.java to the new package, simulator.
  5. Set-up your build path like 'Properties for SensorSimulatorTest' below. You will also have to download a CAN service overide jar and place it prior to the kona-fiat-impl.jar using the Order and Export tab.

    Get kona-fiat-impl.jar and the CanServiceOverride.jar from Downloads.

     

  6. Start the simulator from a DOS prompt (java -jar ChryslerSimulator.jar).
  7. Run the xlet using a run configuration like 'Run Configurations'.

     

  8. The simulator test program will write the Battery sensor values to the console each time the slider on the simulator is moved. Your results should be similar to the 'Simulator Run Console' results below.