Skip to main content

DoEvent

note

This page has been automatically translated and has not been reviewed in detail yet. Therefore, the translation might not be completely accurate.

A component in production can send these packets to the service for forwarding to neuroomNet as component events. Before forwarding, the service checks whether it is an event registered by the component and whether the parameters correspond to the specifications defined.

{
"command": "DoEvent",
"id": "security",
"parameters": [
{
"id": "p1",
"value": "test"
},
{
"id": "p2",
"value": 12
}
]
}

Encoding String: DoEvent<TAB>security<TAB>p1<TAB>"test"<TAB>p2<TAB>12

Note: The order of the parameters does not matter; optional parameters can also be omitted entirely. Elementary data types are always transmitted in their JSON notation, i.e. 42, 3.14159, true, "Text", ... In particular, character strings are always encapsulated with double apostrophes. If an optional parameter is not omitted, it can become empty (undefined) - an empty string, on the other hand, would be "". Experimentally, the JSON notation is also retained for field parameters, i.e. [1,2,3,4] as a value would be the field with the numbers 1, 2, 3 and 4.

Please also note that in order to simplify the protocol, field names were not specified here, in contrast to all other package encodings.

The unique identifier id of the action must always be specified, parameters is optional.