DDS 1.5 RTF Avatar
  1. OMG Issue

DDS15 — Proper interpretation of Duration_t for negative values

  • Key: DDS15-331
  • Status: open  
  • Source: Real-Time Innovations ( Dr. Gerardo Pardo-Castellote, Ph.D.)
  • Summary:

    The specification does not fully define the meaning of a Duration_t when the second part is negative.

    struct Duration_t {
        long sec;
        unsigned long nanosec;
    };
    

    What is he interpretation of a value when sec <0?
    Does the nanosec part get interpreted to have the same sign?
    If so, then the number between 0 < x < -1 cannot be represented

    So the most logical way to interpret a negative value for the sec field appears to be:

    value = sec + nanosec 
    

    where sec can be positive or negative but nanosec is always positive.
    So the value of negative 1ms would be represented as:

    sec = -1
    nanosec = 999,000,000
    

    The specification should define the proper interpretation.

  • Reported: DDS 1.4 — Mon, 20 Nov 2023 21:13 GMT
  • Updated: Mon, 20 Nov 2023 21:13 GMT