DCS protocol v1
DCS protocol v1
modeled after RESTful principles and Open Smart Grid Protocol
courtesy of Yulia Zulkarneeva, Quinta Plus Technologies LLC
I. TOPIC: <site_uid> / <protocol> / <version> / <method> / <Process_Variable_URI>
topic example: BNLSTAR / DCS / 1 / GET / Conditions / fps / fee
II. MESSAGE contents: request body, encoded as JSON/txt or MsgPack/bin formats
a) message example: {
"uid": "<client-uid>",
"header": [ <column_name_A>, <column_name_B> ],
"values": {
"<offset_0>" : [ <value_for_A>,<value_for_B> ]
"<offset_N>" : [ <value_for_A>,<value_for_B> ]
}
}
..or..
b) message: {
"uid": "<client-uid>",
"values": {
"<column_name_A>.<offset_A>" : 3,
"<column_name_B>.<offset_B>.<offset_B_at_bit_level>" : 1
}
}
example: BNLSTAR / DCS / 1.0 / GET / Conditions / fps / fee
message: { "uid": "unique-identifier-of-the-client", "ts": 12345678 }
example: BNLSTAR / DCS / 1.0 / SET / Conditions / fps / fee
message: { "uid": "<client-uid>", "header": [A,B], "values": { "0" : [1,2] } }
message: { "uid": "<client-uid>", "values": { "A.0" : 1, "B.0" : 2 } }
III. METHODS
METHOD |
DESCRIPTION |
NOTES |
standard methods |
GET |
get latest entry => either storage or sensor may reply via personal REPLY |
|
PUT |
store new entry |
|
POST |
sensor entry change update |
|
DELETE |
delete [latest] entry |
|
HEAD |
request schema descriptor only, without data |
|
PATCH |
modify schema descriptor properties |
|
OPTIONS |
get supported methods |
|
extra methods |
REPLY |
personal reply address in REQUEST / RESPONSE pattern. Ex. topic: DCS / REPLY / <CLIENT_UID>. Example: COMMAND acknowledgements, GET replies |
|
COMMAND |
commands from control system: ON / OFF / REBOOT / POWEROFF |
|
STATUS |
retrieve status of the device: ON / OFF / REBOOT / POWEROFF / BUSY |
|