(Get)ComponentInfo
This page has been automatically translated and has not been reviewed in detail yet. Therefore, the translation might not be completely accurate.
Using this pair of packages, the neuroomNet Software API Server requests a description from a component during the registration phase and in return expects this as the next package.
Component description request
{
"apiVersion": "1.0",
"command": "GetComponentInfo"
}
Encoding String: GetComponentInfo<TAB>apiVersion<TAB>1.0
The apiVersion describes which protocol version of the Software API is supported by the service. Since this is always kept backwards compatible, a component generally does not need to do anything with an older version. However, if the component was developed based on a newer version, it should adapt the communication with the service accordingly.
Report component description
{
"apiVersion": "1.0",
"command": "ComponentInfo",
"displayName": "People Counter",
"id": "perscounter.1",
"status": "OK",
"type": "counter"
}
Encoding String: ComponentInfo<TAB>apiVersion<TAB>1.0<TAB>displayName<TAB>People Counter<TAB>id<TAB>perscounter.1<TAB>status<TAB>OK<TAB>type<TAB> counter
Note: the order of the fields does not matter; optional fields can be omitted. A correct string encoding would therefore also be: ComponentInfo<TAB>type<TAB>count<TAB>status<TAB>OK<TAB>apiVersion<TAB>1.0
With the apiVersion the behavior is as described above, only here the service has to adapt to older components. For newer components, it is expected that the component will adapt accordingly, as the service has no chance of doing so.
displayName and id are optional - in the current version 1.0 the display name is completely ignored. How to handle the unique identifier is explained in the general concept description.
For status only the values OK, FAIL and OFFLINE are permitted and describe the initial state of the component. This can be updated at any time with a Status package.
type is a free value and denotes the type of component. This value is also currently ignored, but must be specified and cannot be empty.