FileStorageDeviceRegistry

Last modified: Jul 5, 2019 @ 06:43

This class uses a JSON file named deviceregistry.json, located in the AppIoT_HOME root folder. This file stores the following device information:

  • endpoint – Unique identifier of the device.
  • name – The name given to the device in DDM.
  • isInternal – If true, this device represents the gateway itself, if false it is a device registered to the gateway.
  • resourceLinks – A list of resource links registered to the device.
  • settingCategories – A list of setting categories and settings assigned to the device from DDM.

Example of JSON file:

{
  "6d2610a5-43a6-4a48-9f73-0f4ed5cdd317": 
  {
    "endpoint": "6d2610a5-43a6-4a48-9f73-0f4ed5cdd317",
    "name": "MyDevice",
    "isInternal": false,
    "resourceLinks": [
    {
      "Url": "/3303/0/5701",
      "Attributes": []
    },
    {
      "Url": "/3303/0/5700",
      "Attributes": []
     }
    ],
   "settingCategories": [
   {
      "Name": "My Setting Category",
      "Settings": [
      {
        "Key": "My setting parameter",
        "Value": "My setting value",
        "DataType": "String"
      }
      ]
    }
    ]
  }
}