Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCT Serve realtime subscriptions should manage which channels are sent to each client <Cubesat Issue> #357

Closed
mudinthewater opened this issue Aug 5, 2021 · 1 comment · Fixed by #426
Assignees

Comments

@mudinthewater
Copy link

The MCT adaptation for AIT-Core should manage connected clients with a dictionary of subscribed channels to minimize data throughput. This will allow one data source (the MCT server adapter) to receive all telemetry, but send minimal telemetry to each client, minimizing network usage.

@nttoole
Copy link
Contributor

nttoole commented Mar 24, 2022

Refactored plugin now maintains set of subscribed telemetry points
This set is used to filter telemetry from AIT so that only subscribed telem is sent to the respective web-socket

For this test, we used the ait_simulate (from AIT-GUI) to add 1553_HS_Packet to the server.
Per the debug below, the plugin receives the packet with all fields, and then broadcasts to all-websockets.
Each web-socket subsets the telemetry to only include subscribe telem.
In this case, the OpenMCT client was displaying the Voltage_A telem:

image

Browser web-socket messages (indicates telem flowing from AIT OpenMct adaptation, note it contains a single field for the packet):
image

Plugin Debug (note incoming telem - which are broadcast to sessions - has all packet fields, but outgoing telem for specific socket is subset to subscribed fields only):

2022-03-24T11:45:55.589 | INFO     | AitOpenMctPlugin: Polling Telemetry queue...
2022-03-24T11:45:56.592 | INFO     | AitOpenMctPlugin: Broadcasting {'packet': '1553_HS_Packet', 'data': {'Voltage_A': 1, 'Voltage_B': 1, 'Voltage_C': 1, 'Voltage_D': 1, 'Current_A': -0.0008103727714748784}} to managed web-sockets...
2022-03-24T11:45:56.594 | INFO     | AitOpenMctPlugin: Sending realtime telemetry web-socket msg to websocket 2/140390135607024: {"packet": "1553_HS_Packet", "data": {"Voltage_A": 1}}

2022-03-24T11:45:56.595 | INFO     | AitOpenMctPlugin: Polling Telemetry queue...
2022-03-24T11:45:57.594 | INFO     | AitOpenMctPlugin: Broadcasting {'packet': '1553_HS_Packet', 'data': {'Voltage_A': 2, 'Voltage_B': 2, 'Voltage_C': 2, 'Voltage_D': 2, 'Current_A': 0.0}} to managed web-sockets...
2022-03-24T11:45:57.595 | INFO     | AitOpenMctPlugin: Sending realtime telemetry web-socket msg to websocket 2/140390135607024: {"packet": "1553_HS_Packet", "data": {"Voltage_A": 2}}

2022-03-24T11:45:57.596 | INFO     | AitOpenMctPlugin: Polling Telemetry queue...
2022-03-24T11:45:58.598 | INFO     | AitOpenMctPlugin: Broadcasting {'packet': '1553_HS_Packet', 'data': {'Voltage_A': 3, 'Voltage_B': 3, 'Voltage_C': 3, 'Voltage_D': 3, 'Current_A': 0.0008103727714748784}} to managed web-sockets...
2022-03-24T11:45:58.599 | INFO     | AitOpenMctPlugin: Sending realtime telemetry web-socket msg to websocket 2/140390135607024: {"packet": "1553_HS_Packet", "data": {"Voltage_A": 3}}

2022-03-24T11:45:58.600 | INFO     | AitOpenMctPlugin: Polling Telemetry queue...
2022-03-24T11:45:59.602 | INFO     | AitOpenMctPlugin: Broadcasting {'packet': '1553_HS_Packet', 'data': {'Voltage_A': 4, 'Voltage_B': 4, 'Voltage_C': 4, 'Voltage_D': 4, 'Current_A': 0.0016207455429497568}} to managed web-sockets...
2022-03-24T11:45:59.603 | INFO     | AitOpenMctPlugin: Sending realtime telemetry web-socket msg to websocket 2/140390135607024: {"packet": "1553_HS_Packet", "data": {"Voltage_A": 4}}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants