Skip to main content
. 2023 Oct 6;23(19):8282. doi: 10.3390/s23198282
Algorithm 2: iterateOverSchemaList

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
INPUT: profile, platform
schemaIdList ← getSchemaIdList();
while schemaIdList.hasNext() do
  schemaId ← schemaIdList.next();
  schema ← getSchemaJsonById();
  proxy ← schema.get(“iot-platform”).get(“proxy”);
  platform ← schema.get(“iot-platform”).get(“platform”);
  deviceList ← schema.get(“iot-platform”).get(“device-list”);
  while deviceList.hasNext() do
    device ← deviceList.next();
    profile.set(“uri”, device);
    doAsynchronousRequest() {
        uri ← ”http://localhost:” + proxy + ”/dp/” + platform;
        payload ← profile;
        request to uri with payload;
    }
  end
end