Event Channels
Event Channels exist outside of the Domain since they are a part of the underlying network infrastructure. However in the context of rest-python, we maintain the nod that event channel data often contains the domain of origin. So, we maintain that in this API.
/ redhawk / rest / events
SUBSCRIBE to specific event channels using the channel name, called a topic
in websocket parlance, and the Domain ID (name) by writing the above JSON structure to the socket.
UNSUBSCRIBE from a specific event channel by changing the command
to REMOVE
and specifying the topic
.
/ redhawk / rest / events
These structures are exclusively defined as one would find on the ODM and IDM channels in a REDHAWK system since those structures are simply converted into dictionaries and lists, as appropriate, but using JSON for syntax.
NOTE: The provided enumeration value for the affected fields was arbitrarily chosen as the index within the defining list so that the structure provided here is similar to Properties.
ODM Events
The sourceIOR
and other object reference types are stripped since they’re of little use on the other side of the socket. Instead you will see the key name, like sourceIOR
, but the value will be a string indicating it does not represent what the real value was in any way. NOTE: The presence of the sourceIOR
key indicates the entity was added to the Domain.
IDM Events
/ redhawk / rest / events
At present the best way to get Messages and property change events out of rest-python is to attach the associated port (in REDHAWK) to a named event channel. Then subscribe to that channel name as your topic to read those messages and property events as they happen.
Messages
Messages are encapsulated as they appear on the event channel which is similar to struct
Properties. The notable difference is the lack metadata (type
, scaType
, etc.).
propEvent
The properties
is a list of objects formatted like Messages, above, meaning each lacks any metadata usually associated with Properties.
/ redhawk / rest / events
That would be really awesome. Thank you for volunteering to add that feature. :-)
At this time we do not have a way to inject Messages back into an event channel. If you would like to write the handlers for this, please do so and submit a pull request. Otherwise, just know it’s on our To Do list.