Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-36016

Refactor TcpServer to avoid child classes sending data to Component directly in Phase 2

    XMLWordPrintable

Details

    • Story
    • Status: Done
    • Resolution: Done
    • None
    • ts_main_telescope

    Description

      This is a very low-priority ticket.

      This ticket continue after DM-34139 to evaluate a simple way to avoid using an enum with elements: (1) unknown, (2) connected, and (3) unconnected to let Component know about  TCP servers status. I'm going to find a simple way to put areClientsConnected back to boolean if it is possible.

      Attachments

        Issue Links

          Activity

            After this evaluation I found the following tasks to do in this ticket:

            • Modify GenRead user event data type replacing the enum with the boolean.
            • Create a new vi to check if the string input (TCP packet) is not an empty string. This will be used in TcpServerCmd.processPacket.vi, TcpServerBase.clearErrorAndSendExplanation.vi, and every needed instance.
            • Get rid of the text inside of the string event data sent to the Component Simulator in TcpServer.getClientStatuts.vi.
            • Replace the connStatusMsg string name of TcpServerBase.connStatusCluster.ctl with "genMsg" or just "message".
            • Document these changes in the user manual to let user knows how to use this GenRead user event on his side.
            pcortes Patricio Cortes added a comment - After this evaluation I found the following tasks to do in this ticket: Modify GenRead user event data type replacing the enum with the boolean. Create a new vi to check if the string input (TCP packet) is not an empty string. This will be used in TcpServerCmd.processPacket.vi , TcpServerBase.clearErrorAndSendExplanation.vi , and every needed instance. Get rid of the text inside of the string event data sent to the Component Simulator in TcpServer.getClientStatuts.vi . Replace the connStatusMsg string name of TcpServerBase.connStatusCluster.ctl with "genMsg" or just "message". Document these changes in the user manual to let user knows how to use this GenRead user event on his side.
            ttsai Te-Wei Tsai added a comment -

            If the user notices the "genMsg" (or "message") is an empty string, he/she knows the boolean value can be used to know the connection status. Otherwise, the boolean value should not be used.

            ttsai Te-Wei Tsai added a comment - If the user notices the "genMsg" (or "message") is an empty string, he/she knows the boolean value can be used to know the connection status. Otherwise, the boolean value should not be used.

            Please help to check this PR:

            https://github.com/lsst-ts/ts_labview_tcp_json/pull/42

            I noticed in the project properties that the "Separate compiled code from new project items" box was unchecked. I put the check mark on it and I noticed that these VIs were modified: TcpServerTel.destroyQueueTcpClientFromDds.vitestTelToClient.vi, and testTcpServerTel.vi. This will solve the bug when tcpip submodule is used in ts_mtm2_cell code.

            pcortes Patricio Cortes added a comment - Please help to check this PR: https://github.com/lsst-ts/ts_labview_tcp_json/pull/42 I noticed in the project properties that the "Separate compiled code from new project items" box was unchecked. I put the check mark on it and I noticed that these VIs were modified:  TcpServerTel.destroyQueueTcpClientFromDds.vi ,  testTelToClient.vi , and  testTcpServerTel.vi . This will solve the bug when  tcpip  submodule is used in  ts_mtm2_cell  code.
            ttsai Te-Wei Tsai added a comment -

            Reviewed in GitHub.

            ttsai Te-Wei Tsai added a comment - Reviewed in GitHub.

            People

              pcortes Patricio Cortes
              pcortes Patricio Cortes
              Te-Wei Tsai
              Patricio Cortes, Te-Wei Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.