Telematics SDK - User Guide  v1.43.0
Using SDK APIs in simulation mode

Certain APIs in the SDK can be used in simulation mode, on any Linux based platform. This enables developers to develop and test their SDK applications on desktop environments, thus providing a simpler and faster development experience. This is achieved using the run time simulation libraries of the SDK.

This section has instructions to build the simulations of SDK APIs using CAF repository.

You need to have the following in order to proceed:

  • Linux Ubuntu 14.04, Linux Ubuntu 20.04
  • GCC (version > 9.3)

Get Started

  • Sync the CAF build

    repo init and sync the sources

    1 $ repo init -q -u git://codeaurora.org/quic/le/le/manifest.git -b release
    2  -m <caf_ insert label here. xml>
    3 $ repo sync -j 32

    For example: Using AU label
    repo init -q -u git://codeaurora.org/quic/le/le/manifest.git -b release -m caf_AU_LINUX_EMBEDDED_LE.UM.4.1.1_RB1_TARGET_ALL.01.147.055.xml
    or using CRM build-id label
    repo init -q -u git://codeaurora.org/quic/le/le/manifest.git -b release -m LE.UM.4.1.1-05510-sa515m.xml

    NOTE: AU_LINUX_EMBEDDED_LE.UM.4.1.1_RB1_TARGET_ALL.01.147.055 should be replaced to the AU tag corresponding to the desired device build. "caf_" needs to be prefixed to the AU label.

    The tags are listed here - https://source.codeaurora.org/quic/le/le/manifest/refs/tags

  • The following sections describe the way to compile these simulations for the respective libraries/APIs. All the simulation related source is located under "telux/public/simulation/" directory. Simulation is not available for all the SDK APIs and it is work in progress.

Location Simulation

The "telux/public/simulation/loc" folder contains the simulation implementation of Location Telematics SDK APIs.

The following simulations have been compiled and tested with GCC and G++ version 9.3.0 and Ubuntu versions 14.04, 20.04

  • Navigate into the simulation folder of telux git project.
    1 $ cd telux/public/simulation/
  • The following instructions build and install the location simulation libraries.

    Run below instructions in telux/public/include folder

    1 $ cmake .
    2 $ cmake --build .
    3 $ sudo make install

    Run below instructions in telux/public/simulation

    1 $ cmake .
    2 $ cmake --build .
    3 $ sudo make install
  • Check where the libraries are installed and ensure that it is included in the library path of the system environment.
    Note: Modify CMakeLists.txt in snaptel-sdk/apps folder to include only tests/location_test/app subdirectory Run below instructions in telux/public/apps
    1 $ cmake .
    2 $ cmake --build .
    3 $ sudo make install
  • After successful compilation, the location_test_app is installed into the system's default directory and is ready to be launched.

Configuration options

The location simulation is designed to be configurable as per the needs of the developer to allow various testing scenarios. The simulation reports can be generated using one of the two methods: Fixed canned data - which are pre-defined as default values in some headers, pre-recorded location data taken from a file such as PRE-RECORDED_LOCATION_DATA.csv. Simulation libraries also allow the developers to configure the subsystem readiness and callback delays from a config file. The motivation for allowing such flexibility is to allow developers to run various test case scenarios even without the hardware access. The following are the three important files that have configuration and default values of the location simulation libraries.

  • 1) StubConfig : Allows users to configure delays and other aspects of simulation libraries.
  • 2) CommonDef.hpp : Defines default values for the some of the fields in location reports.
  • 3) StubDefines.hpp: Defines default values for the subsytem readiness and callback delays.