Raw Protocol
realm
create
Outgoing
[
{
"act": "cre",
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"lab": "label A",
"typ": "rea"
}
]
Incoming
[
{
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"res": "suc"
}
]
change label
Outgoing
[
{
"act": "upd",
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"lab": "label B",
"typ": "rea"
}
]
Incoming
[
{
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"res": "suc"
}
]
add data
Outgoing
[
{
"act": "upd",
"dat": {
"key": "value A"
},
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"typ": "rea"
}
]
Incoming
[
{
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"res": "suc"
}
]
update data
Outgoing
[
{
"act": "upd",
"dat": {
"key": "value B"
},
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"typ": "rea"
}
]
Incoming
[
{
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"res": "suc"
}
]
delete
Outgoing
[
{
"act": "del",
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"typ": "rea"
}
]
Incoming
[
{
"id": "realm-a-vrml2qcl79-oueaqpcgino",
"res": "suc"
}
]
object
create
Outgoing
{
"typ": "obj", // type = object
"act": "cre", // action = create
"rea": "realmId", // realmId
"id": "objId", // object id
"loc": { // location
"lon": 12.5, // longitude in degree
"lat": 22.4, // latitude in degree
"spe": 55, // OPTIONAL speed in m/s
"hea": 25, // OPTIONAL heading in degree
"alt": 200, // OPTIONAL altitude in m above nn
"tim": 1666987521939 // OPTIONAL time in millisecond since 1.1.1970
},
"dat": { // arbitrary data
"some": "data" // OPTIONAL
}
}
Incoming
{"id": "objId","res": "suc"} // success
{"id": "objId","res": "err", "err":"error reason message"} // error
read
Outgoing
{
"typ": "obj", // type = object
"act": "rea", // action = read
"id": "object-a-ukBsqp_EFjVFlQU1ZrEvb", // object id
"rea": "realm-a-Y3kbqdtLdz6pyAU7ofUQF", // realm id
"cid": "GXKHqOHM7uNXggJW-d-6D" // OPTIONAL correlation id for this request
}
Incoming
{
"id": "object-a-ukBsqp_EFjVFlQU1ZrEvb", // object id
"cid": "GXKHqOHM7uNXggJW-d-6D", // OPTIONAL correlation id
"res": "suc", // result = success
"dat": { // data
"lab": "Object A Label", // label
"loc": { // location
"gcs": "", // geo coordinate space (empty for now)
"lon": 13.404954, // longitude in degree
"lat": 52.520008, // latitude in degree
"acc": 0, // accuraracy in meters
"spe": 0, // speed in meter/second
"hea": 0, // heading in degree
"alt": 0, // altitude in m above N/N
"alc": 0, // altitude accuracy in m
"tim": "2022-11-07T17:41:05.9238658+01:00"
},
"dat": { // data
"charge": 0.5 // some arbitrary data
},
"cst": "dis" // connection status = disconnected
}
}
update
Outgoing
[
{
"act": "upd",
"dat": {
"charge": 0.6
},
"id": "object-a-ukBsqp_EFjVFlQU1ZrEvb",
"rea": "realm-a-vrml2qcl79-oueaqpcgino",
"typ": "obj"
}
]
Incoming
[
{
"id": "object-a-ukBsqp_EFjVFlQU1ZrEvb",
"res": "suc"
}
]
list
Outgoing
[
{
"act": "lis",
"rea": "realm-a-vrml2qcl79-oueaqpcgino",
"typ": "obj"
}
]
Incoming
[
{
"dat": {
"obj-a-seq87dcaopg-37cnkuv2hk": {
"cst": "dis",
"id": "obj-a-seq87dcaopg-37cnkuv2hk",
"lab": "Test Object"
},
"obj-b-4bsj3c99da8-kqp9eep5gb8": {
"cst": "dis",
"id": "obj-b-4bsj3c99da8-kqp9eep5gb8"
}
},
"res": "suc"
}
]
list with fields
Outgoing
[
{
"act": "lis",
"dat": {
"fie": [
"firstname",
"lastname"
]
},
"rea": "realm-a-03v0jd1faig-ulgffn601v",
"typ": "obj"
}
]
Incoming
[
{
"dat": {
"obj-a-89md2rv4lfg-h843oug8gao": {
"cst": "dis",
"dat": {
"firstname": "Homer",
"lastname": "Simpson"
},
"id": "obj-a-89md2rv4lfg-h843oug8gao",
"lab": "Character A"
},
"obj-b-fl4tmqiqkj8-euvhu0ft0t8": {
"cst": "dis",
"dat": {
"firstname": "Montgomery",
"lastname": "Burns"
},
"id": "obj-b-fl4tmqiqkj8-euvhu0ft0t8",
"lab": "Character B"
},
"obj-c-770b0pjcsb8-ok67i5n7sa": {
"cst": "dis",
"dat": {
"firstname": "Seymour"
},
"id": "obj-c-770b0pjcsb8-ok67i5n7sa",
"lab": "Character C"
}
},
"res": "suc"
}
]
list the options in a spatial region
Outgoing
[
{
"act": "lis",
"dat": {
"sha": {
"cx": 15.5,
"cy": 54.5,
"r": 107078
}
},
"rea": "realm-a-q35lu4an9s-fqmn7v6nba",
"typ": "obj"
}
]
Incoming
[
{
"dat": {
"obj_15_54_-6bj6ue8057o-heu7b3vejr": {
"cst": "dis",
"id": "obj_15_54_-6bj6ue8057o-heu7b3vejr",
"lab": "Grid Object"
},
"obj_15_55_-6bj6ue8057o-heu7b3vejr": {
"cst": "dis",
"id": "obj_15_55_-6bj6ue8057o-heu7b3vejr",
"lab": "Grid Object"
},
"obj_16_54_-6bj6ue8057o-heu7b3vejr": {
"cst": "dis",
"id": "obj_16_54_-6bj6ue8057o-heu7b3vejr",
"lab": "Grid Object"
},
"obj_16_55_-6bj6ue8057o-heu7b3vejr": {
"cst": "dis",
"id": "obj_16_55_-6bj6ue8057o-heu7b3vejr",
"lab": "Grid Object"
}
},
"res": "suc"
}
]
list the objects in a region with an attribute filter
Outgoing
[
{
"act": "lis",
"dat": {
"atr": [
"type=\"A\""
],
"sha": {
"x1": 13.5,
"x2": 15.5,
"y1": 52.5,
"y2": 55.5
}
},
"rea": "realm-a-q35lu4an9s-fqmn7v6nba",
"typ": "obj"
}
]
Incoming
[
{
"dat": {
"obj_14_54_-6bj6ue8057o-heu7b3vejr": {
"cst": "dis",
"id": "obj_14_54_-6bj6ue8057o-heu7b3vejr",
"lab": "Grid Object"
},
"obj_15_54_-6bj6ue8057o-heu7b3vejr": {
"cst": "dis",
"id": "obj_15_54_-6bj6ue8057o-heu7b3vejr",
"lab": "Grid Object"
}
},
"res": "suc"
}
]
delete
Outgoing
[
{
"act": "del",
"id": "obj-a-seq87dcaopg-37cnkuv2hk",
"rea": "realm-a-vrml2qcl79-oueaqpcgino",
"typ": "obj"
}
]
Incoming
[
{
"id": "obj-a-seq87dcaopg-37cnkuv2hk",
"res": "suc"
}
]
set (multiple objects example)
Outgoing
[
{
"act": "set",
"id": "obj-c-a3nf7c378j-gp3r79orab8",
"loc": {
"lat": 22.4,
"lon": 12.5
},
"rea": "realm-a-8di3cekm9i-gt9mcoch1k",
"typ": "obj"
},
{
"act": "set",
"id": "obj-d-ijrkt15spf-9j5cdf7kcn",
"loc": {
"lat": 22.4,
"lon": 12.5
},
"rea": "realm-a-8di3cekm9i-gt9mcoch1k",
"typ": "obj"
}
]
Incoming
[]
Incoming
[]
Area
create
Outgoing
[
{
"act": "cre",
"dat": {
"age": 42
},
"id": "area-a-evj0r1n252-e91i5t946ug",
"rea": "realm-a-peg76hn411g-fsrj1k411n",
"sha": {
"x1": 5,
"x2": 10,
"y1": 4,
"y2": 8
},
"sty": "rec",
"typ": "are"
}
]
Incoming
[
{
"id": "area-a-evj0r1n252-e91i5t946ug",
"res": "suc"
}
]
create (bad rectangle)
Outgoing
[
{
"act": "cre",
"id": "area-3ng181404e-tq48b2d7bq8",
"rea": "realm-a-q1hsu0ti76o-4mjj354l4d8",
"sha": {
"x1": 5,
"x2": 4,
"y1": 4,
"y2": 8
},
"sty": "rec",
"typ": "are"
}
]
Incoming
[
{
"erc": 400,
"err": "rectangle x1 must be smaller than x2",
"id": "area-3ng181404e-tq48b2d7bq8",
"res": "err"
}
]
create (bad circle)
Outgoing
[
{
"act": "cre",
"id": "area-ktg653tb22o-6mkhr0rg69g",
"rea": "realm-a-q1hsu0ti76o-4mjj354l4d8",
"sha": {
"lat": 22,
"lon": 2.4,
"r": -6
},
"sty": "cir",
"typ": "are"
}
]
Incoming
[
{
"erc": 400,
"err": "circle radius must be greater than 0",
"id": "area-ktg653tb22o-6mkhr0rg69g",
"res": "err"
}
]
create (bad polygon)
Outgoing
[
{
"act": "cre",
"id": "area-de61rskaasg-bsu800hjbro",
"rea": "realm-a-q1hsu0ti76o-4mjj354l4d8",
"sha": {
"points": []
},
"sty": "pol",
"typ": "are"
}
]
Incoming
[
{
"erc": 400,
"err": "polygons must have at least 3 points",
"id": "area-de61rskaasg-bsu800hjbro",
"res": "err"
}
]
read
Outgoing
[
{
"act": "rea",
"id": "area-a-evj0r1n252-e91i5t946ug",
"rea": "realm-a-peg76hn411g-fsrj1k411n",
"typ": "are"
}
]
Incoming
[
{
"dat": {
"dat": {
"age": 42
},
"sha": {
"x1": 5,
"x2": 10,
"y1": 4,
"y2": 8
},
"sty": "rec"
},
"id": "area-a-evj0r1n252-e91i5t946ug",
"res": "suc"
}
]
update (rectangular area)
Outgoing
[
{
"act": "upd",
"cid": "area-a-update",
"id": "area-a-evj0r1n252-e91i5t946ug",
"rea": "realm-a-peg76hn411g-fsrj1k411n",
"sha": {
"x1": 3,
"x2": 7,
"y1": 1,
"y2": 9
},
"typ": "are"
}
]
Incoming
[
{
"cid": "area-a-update",
"id": "area-a-evj0r1n252-e91i5t946ug",
"res": "suc"
}
]
update (circular area)
Outgoing
[
{
"act": "upd",
"cid": "area-a-update",
"dat": {
"firstname": "Wolfram"
},
"id": "area-a-evj0r1n252-e91i5t946ug",
"rea": "realm-a-peg76hn411g-fsrj1k411n",
"sha": {
"cx": 5,
"cy": 3,
"r": 17
},
"sty": "cir",
"typ": "are"
}
]
Incoming
[
{
"cid": "area-a-update",
"id": "area-a-evj0r1n252-e91i5t946ug",
"res": "suc"
}
]
delete
Outgoing
[
{
"act": "del",
"id": "area-a-evj0r1n252-e91i5t946ug",
"rea": "realm-a-peg76hn411g-fsrj1k411n",
"typ": "are"
}
]
Incoming
[
{
"id": "area-a-evj0r1n252-e91i5t946ug",
"res": "suc"
}
]
Instruction
create
Outgoing
[
{
"act": "cre",
"dat": {
"some": "value"
},
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"ins": "when\n object(charge\u003c0.2)\n .setVar(\"lowChargeObj\")\nthen\n getVar(\"lowChargeObj\")\n .notify(goto(\"west\"))",
"lab": "Label A",
"rea": "realm-a-a40cdh0r6h-m4aunfllpvg",
"typ": "ins"
}
]
Incoming
[
{
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"res": "suc"
}
]
update
Outgoing
[
{
"act": "upd",
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"ins": "when object(members\u003e3, visitors!=7.42).count().isGreaterThan(2.54).isLesserThan(4) then notify(\"yeah\")",
"rea": "realm-a-a40cdh0r6h-m4aunfllpvg",
"typ": "ins"
}
]
Incoming
[
{
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"res": "suc"
}
]
list
Outgoing
[
{
"act": "lis",
"rea": "realm-a-a40cdh0r6h-m4aunfllpvg",
"typ": "ins"
}
]
Incoming
[
{
"dat": {
"inst-a-ii1glq9cltg-9sa4pl85fr8": {
"dat": {
"some": "value"
},
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"lab": "Label A"
},
"inst-b-njjruhsi4e8-mqknk96n1c8": {
"id": "inst-b-njjruhsi4e8-mqknk96n1c8"
}
},
"res": "suc"
}
]
delete
Outgoing
[
{
"act": "del",
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"rea": "realm-a-a40cdh0r6h-m4aunfllpvg",
"typ": "ins"
}
]
Incoming
[
{
"id": "inst-a-ii1glq9cltg-9sa4pl85fr8",
"res": "suc"
}
]
Subscription
create
Outgoing
[
{
"act": "cre",
"dat": {
"sid": "realm-a-b99bu94mjpo-11722o88kt8",
"sty": "rea",
"typ": "obj"
},
"id": "sub-a-7lvru1ccnho-0dnc49sudgg",
"rea": "realm-a-b99bu94mjpo-11722o88kt8",
"typ": "sub"
}
]
Incoming
[
{
"id": "sub-a-7lvru1ccnho-0dnc49sudgg",
"res": "suc"
}
]
...later
Incoming
[
{
"id": "sub-a-7lvru1ccnho-0dnc49sudgg",
"obj": {
"cre": {
"obj-a-i9jvr07mim8-5nf46rvfklo": {
"cst": "dis",
"dat": {
"charge": 0.5
},
"loc": {
"acc": 0,
"alc": 0,
"alt": 0,
"gcs": "",
"hea": 0,
"lat": 22.4,
"lon": 12.5,
"spe": 0,
"tim": "2023-06-11T21:51:00.028606291+01:00"
}
}
}
},
"seq": 1,
"typ": "sub",
"uty": "dta"
}
]
create (with geofence that moves with an object but excluding the object itself)
Outgoing
[
{
"act": "cre",
"dat": {
"atr": [
"$id!=\"obj-a-426ndeule4-2fd9vpoubn\""
],
"sta": {
"id": "obj-a-426ndeule4-2fd9vpoubn",
"r": 50
},
"sty": "tar",
"typ": "obj"
},
"id": "sub-a-dkkt755hs68-slfdr8m6bao",
"rea": "realm-a-nmvke8gb67o-o3cbf71lefg",
"typ": "sub"
}
]
Incoming
[
{
"id": "sub-a-dkkt755hs68-slfdr8m6bao",
"res": "suc"
}
]
...later
Incoming
[
{
"id": "sub-a-dkkt755hs68-slfdr8m6bao",
"obj": {
"cre": {
"obj-b-vpikj6j5eb8-b4a3iqan6fg": {
"cst": "dis",
"loc": {
"acc": 0,
"alc": 0,
"alt": 0,
"gcs": "",
"hea": 0,
"lat": 52.536648801,
"lon": 13.39249854,
"spe": 0,
"tim": "2023-06-11T21:52:55.465429832+01:00"
}
}
}
},
"seq": 1,
"typ": "sub",
"uty": "ful"
}
]
list
Outgoing
[
{
"act": "lis",
"rea": "realm-a-hiqf24ukus-g00u19o51so",
"typ": "sub"
}
]
Incoming
[
{
"dat": {
"sub-a-eamtftvebpg-r754k2r1qu8": {
"id": "sub-a-eamtftvebpg-r754k2r1qu8"
},
"sub-b-d5kdn10u4vo-fe2pn5iekig": {
"id": "sub-b-d5kdn10u4vo-fe2pn5iekig"
}
},
"res": "suc"
}
]
delete
Outgoing
[
{
"act": "del",
"id": "sub-a-eamtftvebpg-r754k2r1qu8",
"rea": "realm-a-hiqf24ukus-g00u19o51so",
"typ": "sub"
}
]
Incoming
[
{
"id": "sub-a-eamtftvebpg-r754k2r1qu8",
"res": "suc"
}
]
create realm subscription
Outgoing
[
{
"act": "cre",
"dat": {
"sid": "realm-a-gam2mb6kvj-qibjp8upj4o",
"sty": "rea",
"typ": "sys"
},
"id": "sub-a-s0vljb8pmc8-4fee8jfpip",
"rea": "sys",
"typ": "sub"
}
]
Incoming
[
{
"id": "sub-a-s0vljb8pmc8-4fee8jfpip",
"res": "suc"
}
]
... later we create a realm
Incoming
[
{
"dat": {
"act": "cre",
"cas": false,
"cid": "",
"dat": null,
"id": "realm-a-gam2mb6kvj-qibjp8upj4o",
"lab": "",
"rea": "realm-a-gam2mb6kvj-qibjp8upj4o",
"typ": "rea"
},
"id": "sub-a-s0vljb8pmc8-4fee8jfpip",
"seq": 1,
"typ": "sub",
"uty": "ful"
}
]
create a log subscription
Outgoing
[
{
"act": "cre",
"dat": {
"sid": "realm-a-ond8p3qi58g-3rd70fp6fro",
"sty": "rea",
"typ": "log"
},
"id": "sub-a-jsb1f9fqjq-63d8gp7qg78",
"rea": "realm-a-ond8p3qi58g-3rd70fp6fro",
"typ": "sub"
}
]
Incoming
[
{
"id": "sub-a-jsb1f9fqjq-63d8gp7qg78",
"res": "suc"
}
]
... later an instruction calls debug("here comes a new object")
Incoming
[
{
"id": "sub-a-jsb1f9fqjq-63d8gp7qg78",
"log": [
{
"dat": [
"here comes a new object",
[
{
"cst": "dis",
"dat": {
"charge": 0.5
},
"id": "obj-a-glq3hf79ac8-c6n4jt00j4",
"loc": {
"acc": 0,
"alc": 0,
"alt": 0,
"gcs": "",
"hea": 0,
"lat": 22.4,
"lon": 12.5,
"spe": 0,
"tim": "2023-06-11T22:02:19.149480379+01:00"
}
}
]
],
"id": "ins-a-gfp1om3tl3g-vp7fh6mcd8g",
"lab": "DebugFn",
"lvl": "debug",
"typ": "ins"
}
],
"seq": 1,
"typ": "sub",
"uty": "ful"
}
]