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

The new type attribute of Enumeration does not work for ATWhiteLight

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ts_middleware
    • Labels:
    • Story Points:
      0.5
    • Sprint:
      TSSW Sprint - Apr 25 - May 09
    • Team:
      Telescope and Site
    • Urgent?:
      No

      Description

      The fix in DM-34005 does not work for me, in the one case I tried (the case that lead to filing that ticket).

      If you look at DM-34557 and https://github.com/lsst-ts/ts_xml/pull/576 you can see that I used

        <Enumeration type="unsigned int">
          ChillerL22Alarms_EXTERNAL_RTD_SENSOR_OPEN = 0x1,
          ...
          ChillerL22Alarms_FRONT_LEFT_FAN_OPEN = 0x40000000,
          ChillerL22Alarms_FRONT_RIGHT_FAN_OPEN = 0x80000000
        </Enumeration>
      

      in ATWhiteLight_Events.xml. ts_sal builds this, but the resulting IDL file uses type "long" for all of the values for that enumeration, rather than "unsigned int". This is using ts_sal develop 5bd54f8b dated April 6, 2002.

        Attachments

          Issue Links

            Activity

            No builds found.
            rowen Russell Owen created issue -
            rowen Russell Owen made changes -
            Field Original Value New Value
            Link This issue is triggered by DM-34005 [ DM-34005 ]
            rowen Russell Owen made changes -
            Team Telescope and Site [ 13500 ]
            rowen Russell Owen made changes -
            Link This issue blocks DM-34557 [ DM-34557 ]
            rowen Russell Owen made changes -
            Description The fix in DM-34005 does not work for me, in the one case I tried (the case that lead to filing that ticket).

            If you look at https://github.com/lsst-ts/ts_xml/pull/576 you can see that I used
            {code}
              <Enumeration type="unsigned int">
                ChillerL22Alarms_EXTERNAL_RTD_SENSOR_OPEN = 0x1,
                ...
                ChillerL22Alarms_FRONT_LEFT_FAN_OPEN = 0x40000000,
                ChillerL22Alarms_FRONT_RIGHT_FAN_OPEN = 0x80000000
              </Enumeration>
            {code}
            in ATWhiteLight_Events.xml. ts_sal builds this, but the resulting IDL file uses type "long" for all of the values for that enumeration, rather than "unsigned int".
            The fix in DM-34005 does not work for me, in the one case I tried (the case that lead to filing that ticket).

            If you look at DM-34557 and https://github.com/lsst-ts/ts_xml/pull/576 you can see that I used
            {code}
              <Enumeration type="unsigned int">
                ChillerL22Alarms_EXTERNAL_RTD_SENSOR_OPEN = 0x1,
                ...
                ChillerL22Alarms_FRONT_LEFT_FAN_OPEN = 0x40000000,
                ChillerL22Alarms_FRONT_RIGHT_FAN_OPEN = 0x80000000
              </Enumeration>
            {code}
            in ATWhiteLight_Events.xml. ts_sal builds this, but the resulting IDL file uses type "long" for all of the values for that enumeration, rather than "unsigned int".
            rowen Russell Owen made changes -
            Description The fix in DM-34005 does not work for me, in the one case I tried (the case that lead to filing that ticket).

            If you look at DM-34557 and https://github.com/lsst-ts/ts_xml/pull/576 you can see that I used
            {code}
              <Enumeration type="unsigned int">
                ChillerL22Alarms_EXTERNAL_RTD_SENSOR_OPEN = 0x1,
                ...
                ChillerL22Alarms_FRONT_LEFT_FAN_OPEN = 0x40000000,
                ChillerL22Alarms_FRONT_RIGHT_FAN_OPEN = 0x80000000
              </Enumeration>
            {code}
            in ATWhiteLight_Events.xml. ts_sal builds this, but the resulting IDL file uses type "long" for all of the values for that enumeration, rather than "unsigned int".
            The fix in DM-34005 does not work for me, in the one case I tried (the case that lead to filing that ticket).

            If you look at DM-34557 and https://github.com/lsst-ts/ts_xml/pull/576 you can see that I used
            {code}
              <Enumeration type="unsigned int">
                ChillerL22Alarms_EXTERNAL_RTD_SENSOR_OPEN = 0x1,
                ...
                ChillerL22Alarms_FRONT_LEFT_FAN_OPEN = 0x40000000,
                ChillerL22Alarms_FRONT_RIGHT_FAN_OPEN = 0x80000000
              </Enumeration>
            {code}
            in ATWhiteLight_Events.xml. ts_sal builds this, but the resulting IDL file uses type "long" for all of the values for that enumeration, rather than "unsigned int". This is using ts_sal develop 5bd54f8b dated April 6, 2002.
            Hide
            rowen Russell Owen added a comment - - edited

            We talked at standup and agreed that the simplest solution is to change all enum value types to "long long" and remove the "type" attribute from Enumeration.

            This means bitmasks can be up to 63 bits. We have not even come close to needing that. Our largest current bitmask is 32 bits – the one that triggered DM-34005 and this ticket.

            Show
            rowen Russell Owen added a comment - - edited We talked at standup and agreed that the simplest solution is to change all enum value types to "long long" and remove the "type" attribute from Enumeration. This means bitmasks can be up to 63 bits. We have not even come close to needing that. Our largest current bitmask is 32 bits – the one that triggered DM-34005 and this ticket.
            dmills Dave Mills made changes -
            Sprint TSSW Sprint - Apr 25 - May 09 [ 1163 ]
            dmills Dave Mills made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            dmills Dave Mills made changes -
            Story Points 0.5
            dmills Dave Mills made changes -
            Epic Link DM-31041 [ 561710 ]
            aclements Andy Clements made changes -
            Epic Link DM-31041 [ 561710 ] DM-27719 [ 442124 ]
            Hide
            rowen Russell Owen added a comment -

            I tested the change in ts_sal ffd5a8f2 and it all works. Thank you for the improvement.

            Specifically here is what I did:

            • Uncommented the ATWhiteLight enum that did not fit in "long" (DM-34557).
            • Used ts_sal to build the IDL file, which worked.
            • Examined the IDL file and found that indeed all enumeration values have type "long long".
            • Ran ts_atwhitelight unit tests, which all pass.
            Show
            rowen Russell Owen added a comment - I tested the change in ts_sal ffd5a8f2 and it all works. Thank you for the improvement. Specifically here is what I did: Uncommented the ATWhiteLight enum that did not fit in "long" ( DM-34557 ). Used ts_sal to build the IDL file, which worked. Examined the IDL file and found that indeed all enumeration values have type "long long". Ran ts_atwhitelight unit tests, which all pass.
            Hide
            dmills Dave Mills added a comment -

            SAL Enum = long long mod

            Show
            dmills Dave Mills added a comment - SAL Enum = long long mod
            dmills Dave Mills made changes -
            Reviewers Rob Bovill [ rbovill ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            Hide
            rowen Russell Owen added a comment -

            The changes look reasonable and it works.

            Show
            rowen Russell Owen added a comment - The changes look reasonable and it works.
            rowen Russell Owen made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            dmills Dave Mills made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]
            mareuter Michael Reuter made changes -
            Link This issue relates to CAP-878 [ CAP-878 ]

              People

              Assignee:
              dmills Dave Mills
              Reporter:
              rowen Russell Owen
              Reviewers:
              Rob Bovill
              Watchers:
              Dave Mills, Rob Bovill, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.