Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_main_telescope
-
Labels:
-
Story Points:4
-
Epic Link:
-
Team:Telescope and Site
-
Urgent?:No
Description
This is a very low-priority ticket.
After working on the ticket DM-34086 we noticed TcpServer can be refactored to avoid TcpServerCmd.processPacket.vi sending the "unknown" packet received to the Component directly. Instead, this packet has to be received by the TcpServer class. In TcpServerCmd.processPacket.vi the commands, events, and unknown messages are received from the TCP client, processed, and sent to the Component through the "user event" technique. To improve this we can:
1.- Modify TcpServer.getClientStatus.vi to receive the unknown message that will be sent by TcpServerCmd.processPacket.vi. To do this, we can replace the user event with the notifier. This needs to be evaluated.
2.- Create a new process in TcpServer.runServer.vi to receive the user event (or notifier) with commands/events received from the TCP client in the TcpServerCmd.processPacket.vi. The use of user events or notifiers needs to be evaluated.
3.- TcpServerCmd.processPacket.vi is only one of the VIs that need to modify. There are others that handle the errors, for instance, TcpServerBase.clearErrorAndSendExplnation.vi.
With modification #1 we will avoid the user using the areClientConnected boolean and the connStatusMsg string to get the clients' change of status.
Help to check this PR:
https://github.com/lsst-ts/ts_labview_tcp_json/pull/40
Thanks.