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

Add a TCP/IP client class to ts_tcpip

    XMLWordPrintable

    Details

    • Story Points:
      4
    • Sprint:
      TSSW Sprint - Jan 02 - Jan 16
    • Team:
      Telescope and Site
    • Urgent?:
      No

      Description

      Add a TCP/IP client class to ts_tcpip, modeled after OneClientServer and update at least one other package to use it, to prove that the API is useable.

      Also improve OneClientServer:

      • Allow async connected_callback functions and deprecate synchronous ones.
      • Replace the optional family constructor argument with **kwargs (for more flexibility).
      • Add optional monitor_connection_interval constructor argument, specify 0 to disable monitoring.
      • Make the name constructor argument optional.

      Also add constants LOCALHOST_IPV4 and LOCALHOST_IPV6 and deprecate LOCAL_HOST.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment - - edited

            Pull requests:

            Note that unit tests for the release versions of ts_mthexapod and ts_mtrotator pass (on my computer) using these two branches.

            Show
            rowen Russell Owen added a comment - - edited Pull requests: https://github.com/lsst-ts/ts_tcpip/pull/20 https://github.com/lsst-ts/ts_hexrotcomm/pull/62 Note that unit tests for the release versions of ts_mthexapod and ts_mtrotator pass (on my computer) using these two branches.
            Hide
            ttsai Te-Wei Tsai added a comment -

            Reviewed in GitHub.

            Show
            ttsai Te-Wei Tsai added a comment - Reviewed in GitHub.
            Hide
            rowen Russell Owen added a comment -

            Based on the review I decided to add wrapper methods for reading and writing. This avoids the need to check if the connection is open first, and in the case of read methods, avoids any need to notify the Client or OneClientServer if the other end has hung up – the read methods detect this internally. Please have another look, since these are rather extensive changes. And thank you for pushing for this. I think it does improve the API (though it adds a fair amount of code and more tests).

            Show
            rowen Russell Owen added a comment - Based on the review I decided to add wrapper methods for reading and writing. This avoids the need to check if the connection is open first, and in the case of read methods, avoids any need to notify the Client or OneClientServer if the other end has hung up – the read methods detect this internally. Please have another look, since these are rather extensive changes. And thank you for pushing for this. I think it does improve the API (though it adds a fair amount of code and more tests).
            Hide
            rowen Russell Owen added a comment -

            Reviewed again on github.

            Show
            rowen Russell Owen added a comment - Reviewed again on github.
            Hide
            rowen Russell Owen added a comment - - edited

            Based on reviewer comments I improved the documentation, then merged. Tagged ts_tcpip v1.0.0 and ts_hexrotcomm v0.31.0.

            Show
            rowen Russell Owen added a comment - - edited Based on reviewer comments I improved the documentation, then merged. Tagged ts_tcpip v1.0.0 and ts_hexrotcomm v0.31.0.

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Te-Wei Tsai
              Watchers:
              Russell Owen, Te-Wei Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.