Simulator

Simulator

This Datastream module enable to register datastreams with a constant value or a random value between two numbers specified by parameters.

To access source code click here.

Dependencies

This module have no dependencies

Configuration

To configure ADC Datastream module, a file named es.amplia.oda.datastreams.simulator.cfg must be created with the next parameters for each input channel that you want to register:

In case of want to register a constant value:

  • datastreamId: Required parameter. Identifier of the datastream.
  • deviceId: void string ("") by default. Identifier of the device that contents this datastream.
  • feed: null by default. Identifier of the feed used in the datastreams generated.
  • dataType: Required data. Allowed values are: string, int, integer, float, double, number. Is th data-type of the datastream.
  • constantValue: Required data. Value that always will return this datastream.

In case of want a random numeric integer value:

  • datastreamId: Required parameter. Identifier of the datastream.
  • deviceId: void string ("") by default. Identifier of the device that contents this datastream.
  • feed: null by default. Identifier of the feed used in the datastreams generated.
  • minValue: Required data. Minimum value that the datastream can returns.
  • maxValue: Required data. Maximum value that the datastream can returns.
  • maxDiff: Required data. Percentage of the range that the value can change compared to the last. 100 if it doesn’t matter how much changes

es.amplia.oda.datastreams.simulator.cfg will have a similar format to:

constantValue;testDevice;testFeed=string,this is a test value
randomValue=0,100,10