Virtual Device

Virtual Device Driver is a Device Driver used to create and manage virtual devices, i.e. ones that are not associated with any real hardware but are interpreted by Iotellect as such. Every virtual device is represented by a Device Context and provides a number of settings (the variables of this context), operations (the functions and actions of this context), and events. A virtual device is very useful during testing, debugging, and learning about the system, as it behaves similarly to any real hardware device connected to the system.

Driver Information

Driver Plugin ID:

com.tibbo.linkserver.plugin.device.virtual

Global Settings

None defined.

User Level Settings

None defined.

Device Account Properties

Connection Properties

Property

Description

Extended

Virtual devices with this property enabled provide access to an extended set of device variables.

Performance Testing

Defines how variables related to system performance testing are created.

Property

Description

Test Variable Count

Defines how many performance testing variables will be created in a virtual device. Each variable contains three fields: a randomly generated floating point data value, the value's timestamp, and a randomly generated integer value emulating quality of the data value.

Asynchronous Update Period

Defines how often each performance testing variable will be updated by the virtual device's initiative. Zero value disables asynchronous updates, still allowing the system core to poll performance variables.

Device Assets

Assets are not supported by the driver.

Device Settings

The virtual device provides different types of settings to help with testing Alerts, Reports, Widgets, and other system features. Here is a list of available settings ( variables of device Context):

Basic Properties

Setting (Variable) Name

Comments

normal

Standard string setting.

readonly

Read-only string setting.

selvals

String setting with selection values.

eselvals

String setting with extensible selection values.

nullable

Nullable string setting.

Settings of Different Types

Setting (Variable) Name

Comments

string

String setting.

int

Integer setting

boolean

Boolean setting.

float

Floating point setting.

date

Date setting.

table

Tabular setting with two fields (Integer and String) and an unlimited number of records.

Location

Setting (Variable) Name

Comments

track

GPS track in GPX format. This track will be "replayed" by the device, meaning that a new waypoint (taken from the first track found in the file) will be written into the Location setting upon every synchronization.

location

Simulated location of the device (latitude and longitude). The location is undefined if the GPS track was not loaded or its "replay" was ended.

Wave Settings

Read-write settings in this group define how different read-only values in the Waves group are generated (period, amplitude, etc.).

Setting (Variable) Name

Comments

sawtoothSettings

Sawtooth wave generator settings.

triangleSettings

Triangle wave generator settings.

squareSettings

Square wave generator settings.

sineSettings

Sine wave generator settings.

randomSettings

Random value generator settings.

Waves

Setting (Variable) Name

Comments

sawtooth

Sawtooth wave generator.

triangle

Triangle wave generator.

square

Square wave generator.

sine

Sine wave generator.

random

Random value generator.

Error Generators

Setting (Variable) Name

Comments

shouldGenerateError

Should Generate Error. This setting defines whether errors occur while reading/writing the Error Generator setting.

errorGenerator

Error Generator. Read/write operations on this setting may fail depending on the value of the Should Generate Error setting.

Editors/Renderers

Variables in this group demonstrate available Data Table field value editors and renderers.

Device Operations

Generate Event

Virtual device context has generateEvent function and corresponding Generate Event Call Function action that calls this function. The format of this function has five fields:

  • String type field

  • Integer level field

  • String string field

  • Integer int field

  • Date date field

This function just generates the event with the name specified by the type field (Event 1 or Event 2, see below). Values of fields in event data are taken from the input parameters of the function.

Calculate

calculate function and corresponding Calculate Call Function action provide a test environment for performing simple operations (addition, subtraction, multiplication, or division) over two arguments. The format of this function has three fields:

  • Float leftOperand field

  • Float rightOperand field

  • String operation field

This function returns a Data Table with a single record and Float result field.

Generate Performance Variable History

Available only when Extended property is enabled.

The generateHistory function and corresponding Generate Performance Variable History Call Function action generate simulated historical data for the performance testing variables defined by the Performance Testing properties. It creates a history of random values for each variable, with the number of values determined by the Count (count) parameter. The Period (period) parameter specifies the time interval between each generated data point's timestamp. The Last Change Timestamp (endDate) parameter sets the timestamp of the most recent generated value, with earlier values' timestamps calculated retrospectively based on the specified period. The format of this function has three fields:

  • Long count field

  • Long period field

  • Date endDate field

Device Events

The virtual device context has two events called event1 (its description is Device Event #1) and event2 (Device Event #2). The format of these events has three fields:

  • String str field

  • Integer int field

  • Date date field

These events and generateEvent function may be used together to test device operations and events.

Connection Handling

A virtual device is always deemed Online.

Was this page helpful?