SRT Gauge App

The technical details on this page are for the SRT Gauge App. The SRT Gauge App is designed visually demonstrate receipt of CAN data generated by the CAN Simulator and passed to the app through the Kona sensor interface.

The source code as well as the diagrams shown on this page are available in the Emulator & Simulator section of the Developer Software page. If you make any improvements please send them to FCA so we can provide a better tool for everyone to use.

You can send improved source code to mark.schweiger@external.fcagroup.com or andrew.hoin@fcagroup.com.

Contents:

SRT Gauge App Overview
Sequence Diagram

SRT Gauge App Overview

 

  1. The CAN Simulator generates CAN signal data for the signals defined in the sensor properties file at a frequency and set to values that represent an actual vehicle CAN bus.
  2. The Sensor Container acting as the interface for the xlet or app capturing the changing CAN signal data and sending it to the Kona Emulator.
  3. The Kona Emulator provides an emulated radio implementation of the Kona interface for a Windows PC. The emulator interacts with the Sensor Container either getting sensor values or being notified of sensor values that have changed.
  4. The SRT Gauge App uses the Kona interface to retrieve sensor data and also to be notified of sensor data that has changed. The app then using the JamaicaCAR Emulator displays the sensor data in the form of a gauge.

Top
Back to Technical Details


Sequence Diagram

 

This sequence diagram represents sensor data retrieval events for the SRT Gauge App. The sequence diagram has been abstracted to a high level view to facilitate understanding of the concept.

  1. new, an xlet requests a new BatteryGauge. The BatteryGauge is responsible for the graphical display of the battery gauge.
  2. getInstance, establish a new BatterySensor from which to get the current battery voltage.
  3. open, request a SensorConnection from the Connector class.
  4. Get Sensor Connection, abstracted method that will retrieve a sensor connetion.
  5. Socket Connect, abstracted method which will connect to the CAN simulator.
  6. SensorConnection, the returned sensor connection.
  7. getData, is a priming read for the current simulated value of the battery voltage sensor. The BatterySensor is responsible to maintain the current battery voltage for the BatteryGauge.
  8. Get Value, is an abstracted method requesting the current sensor value.
  9. Read Sensor, is an abstracted method where the container requests the current sensor values from the CAN Simulator.
  10. Sensor Value, the current value associated with the requested sensor.
  11. setBatteryVoltage, adds the retrieved battery voltage to the BatterSensor instance.
  12. setBatteryVoltageListener, after getting the current sensor value the BatterGauge registers a listener so it will be notified every time the battery voltage changes.
  13. new, DataListener is created and data retrieval logic is added. As the
  14. setDataListener, registers the newly created listener.
  15. Add Data Listener, is an abstracted method showing a listener being added to the container.
  16. Add Listener, is an abstracted method showing a listener being added to the CAN Simulator.
  17. Update, is an abstracted method called by the simulator when the simulated CAN data has changed.
  18. Update, is an abstracted method called by the containerb when the simulated CAN data has changed.
  19. dataReceived, is the method created in the DataListener used to retrieve that changed sensor data.
  20. Get Data Type, is an abstracted method showing that before data can be retrieved it's type must be known.
  21. Get Value, is an abstracted method showing data retrieval based on the data type.
  22. setBatteryVoltage, sets the retrieved voltage to the BatterySensor.
  1. animate, is called by Codename One to repaint the battery gauge with an updated needle position.
  2. getBatteryVoltage, retrieves the current battery voltage from the model. It is assumed that the model keeps the voltage current.
  3. BatteryVoltage, is returned by the model.

Top
Back to Technical Details

Updated: 03/13/2017