If feederv3 is started with the CLI parameter -h the following is presented:
usage: print [-h|--help] [-m|--mapfile "<value>"] [-s|--scldatafile "<value>"]
[-t|--tripdatafile "<value>"] [--logfile] [--loglevel
(trace|debug|info|warn|error|fatal|panic)] [-i|--simsource
(vssjson|internal)] [-d|--statestorage
(sqlite|redis|memcache|none)] [-f|--dbfile "<value>"]
Data feeder template version 3
Arguments:
-h --help Print help information
-m --mapfile VSS-Vehicle mapping data filename. Default:
VssVehicle.cvt
-s --scldatafile VSS-Vehicle scaling data filename. Default:
VssVehicleScaling.json
-t --tripdatafile Filename for simulated trip data. Default: tripdata.json
--logfile outputs to logfile in ./logs folder
--loglevel changes log output level. Default: info
-i --simsource Simulator source must be either vssjson, or internal.
Default: internal
-d --statestorage Statestorage must be either sqlite, redis, memcache, or
none. Default: redis
-f --dbfile statestorage database filename. Default:
../../server/vissv2server/serviceMgr/statestorage.db
Default is redis. The server must be CLI configured for the same database. The database must be installed on the computer. If SQLite is seleted then the database must be preconfigured. See VISSR Data Storage for more information.
When the feederv3 is configured to replay simulated trip data the format of this file must be as described here. The feeder reads the JSON formatted file at startup and then it starts to read the first sample for all the signals represented in the file and write them into the statestorage. It then waits for one scond before it reads the second sample of all the signals and write them. This pattern is repeated until the last sample after which the feeder start from the begining again to replay the first samples.
The data associated to a sample is a path, a value, and a timestamp.
The conversion information in a map file is not used with trip data simulations so the path must be present in a binary tree that the server is configured with or else it cannot be read by a client.
The value must be in string format and the content of the string must be compatibe with the datatype that is associated with the signal in a tree that the server manages.
The timestamp is currently not used so it can be set to an empty string. However, it may be that coming improvements o the feeder simulation capability starts to use it, so to be ‘future proof’ it is recommended to set it to a relevant time.
The example file tripdata.json in the feederv3 directory is shown below.
[
{ "path": "Vehicle.TraveledDistance", "dp": [ { "ts": "2020-04-15T13:37:00Z", "value": "1000.0" }, { "ts": "2020-04-15T13:37:05Z", "value": "1000.0" }, { "ts": "2020-04-15T13:37:10Z", "value": "1001.0" }, { "ts": "2020-04-15T13:37:15Z", "value": "1001.0" } ]},
{ "path": "Vehicle.CurrentLocation.Longitude", "dp": [ { "ts": "2020-04-15T13:37:00Z", "value": "56.02024719364729" }, { "ts": "2020-04-15T13:37:00Z", "value": "56.02233748493814" }, { "ts": "2020-04-15T13:37:00Z", "value": "56.02565421151008" }, { "ts": "2020-04-15T13:37:05Z", "value": "56.02823595803967" } ]},
{ "path": "Vehicle.CurrentLocation.Latitude", "dp": [ { "ts": "2020-04-15T13:37:00Z", "value": "12.599927977070497" }, { "ts": "2020-04-15T13:37:00Z", "value": "12.601058355542794" }, { "ts": "2020-04-15T13:37:00Z", "value": "12.602554268256588" }, { "ts": "2020-04-15T13:37:05Z", "value": "12.603616368784676" } ]}
]
The number of samples for each signal must be the same, so for signals that do not change every second their value must be repeated. Boolean values must be represented as ’true’ or ‘false’.
For signals written to the server, if the value is of either integer or float datatypes, then the feederv3 will simulate that it takes some time for the underlying vehicle system to change the state to this new value. The server will in 10 steps linearly update the signal value starting from the value zero. After each step it waits one second so the final value is reached after 10 seconds.