User Tools

Site Tools


setting_the_initial_value_for_vids_in_a_digital_twin

Setting the Initial Value for VIDs in a Digital Twin

After building a host in TransSecs, you should be able to find the digital twin directory in the project directory, called <YourHostName>DigitalTwin. Within that directory, there is a generated executable that will run a simple digital twin matching the variables from your host, but by default the VIDs will be 0 or empty. In some cases, we might want to set initial values to help with testing.

The Host Model JSON file

Inside the digital twin directory, you should see a GeneratedJars directory. Inside that directory there is a json file with the name “<YourHostName>Model.json”. This is the file that defines the structure and contents of your host VIDs. For example:

{
  "ceidSecsFormat": 54,
  "vidSecsFormat": 54,
  "dataIdSecsFormat": 54,
  "alidSecsFormat": 54,
  "rptidSecsFormat": 54,
  "tridSecsFormat": 54,
  "totsmpSecsFormat": 54,
  "enableAllEvents": false,
  "vids": [
    {
      "vidType": 2,
      "valueType": 54,
      "name": "VID0",
      "id": 1
    }
  ]
}

Each VID in the “vids” array defines a variable. By default, the have no initial value. However, one can be set by defining “currentValue”; for example:

{
  "vidType": 2,
  "valueType": 54,
  "name": "VID0",
  "id": 1,
  "currentValue": "12"
}

The “currentValue” must be set as a string.

setting_the_initial_value_for_vids_in_a_digital_twin.txt · Last modified: by colinr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki