Skip to main content

Communication protocol

note

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

After establishing a connection, the Software API Server carries out a well-defined communication with a component via the exchange of packets. This protocol must be strictly adhered to during the registration phase. During subsequent productive operation, packets are generally transmitted spontaneously.

A component known in neuroomNet has the component state OFFLINE as long as the registration process is not completed. When a component is registered for the first time, it remains invisible in neuroomNet until the registration is completely completed.

Registration of a component

The service sends a GetComponentInfo packet, which the component must respond with a ComponentInfo packet. In this process, the versions of the software API protocol used and the unique identifier are exchanged - in the current version the protocol version is of secondary importance, but in the future the component and service will have to adapt to one another. A lot is already said about the use of the unique identifier in the general concept description.

After the service has gotten to know the component in this way, it is requested with a GetActions package to execute all offered neuroomNet component actions using [DeclareAction](../declare-actionevent-and- endoflist/index.md) packages. When all actions have been submitted in this way, the component completes the process with an EndOfList package - it is perfectly acceptable not to declare any actions beforehand. No two actions may be registered with the same identifier (case-sensitive).

The whole process is then repeated analogously for neuroomNet events - GetEvents, DeclareEvent and [EndOfList] (../declare-actionevent-and-endoflist/index.md). Here too, registration is optional; a component does not have to provide any actions or events. As with actions, the event identifier must be unique.

The following sequence diagram illustrates this workflow of registering a component:

Sequence diagram for registering a component

State of the component

After registration, a component can send a Status package with the current status at any time. Regardless, the service will request such a message at a certain time interval (currently 30 seconds) via a GetStatus package. If no status message is received over a certain period of time (not implemented in the current version), the component is noted as faulty.

Execute actions

Once the component has completed the registration protocol, upon receipt of a neuroomNet component action, the service can request the component to perform an action defined in the registration phase via a DoAction package. The service has already ensured in advance that the action of the component is actually known. In addition, all parameters were checked according to the specifications of the component and found to be valid.

In the current version 1.0 of the Software API, no response is expected from the component when an action is executed.

Triggering events

As soon as the component has switched to productive operation, it can transmit a DoEvent package to the service at any time. The service checks whether this is an event reported by the component during the logon phase and checks all parameters according to the associated specifications. If these are all valid, a corresponding neuroomNet component event is triggered.

The current version 1.0 of the software API does not provide for the service to confirm receipt, forwarding or even evaluation of the event.