Menu

#64 PDU Detonation KO in DIS 7 with ExpendableDescriptor

3.0.0
pending
nobody
None
5
2019-03-08
2016-12-06
Anonymous
No

In DIS 7, Detonation PDU with ExpendableDescriptor doesn't work.
It misses 64 bits of padding in the message.
Need to create a specific class (see attached) and remove #typedef from Descriptor.h

2 Attachments

Discussion

  • Karl  Jones

    Karl Jones - 2016-12-07
    • status: open --> pending
     
  • Anonymous

    Anonymous - 2019-03-07

    Funny. I ran into this yesterday and wasn't smart enough to come looking for a bug report before developing the same solution. I used a single "m_ui64Padding" instead of four sequential "m_padding#"; and in the "==" operator, I did not require that the padding match, but otherwise came to exactly the same solution. Essentially, I copied the ExplosionDescriptor class and replaced the extra parameters with padding.

    In addition to creating the new ExpendableDescriptor class as you described, (and adding some comments indicating that the Descriptor "base" class is really only half of the 128 bit record, with the other half being appended by the child type (Munition, Expendable, or Explosion),) and removing the following from Descriptor.h,

    #if DIS_VERSION > 6 
    //typedef Descriptor ExpendableDescriptor;
    #endif
    

    I also removed the following from Detonation_PDU.cpp (don't worry, I'll get it back in the next step):

    #if DIS_VERSION > 6
    #include "./../../DataTypes/ExplosionDescriptor.h"
    #endif
    

    And I added the following to Detonation_PDU.h:

    #if DIS_VERSION > 6
    #include "./../../DataTypes/ExplosionDescriptor.h"
    #include "./../../DataTypes/ExpendableDescriptor.h"
    #endif
    

    Likewise, a similar fix is needed in Fire_PDU.h. I just added:

    #include "./../../DataTypes/ExpendableDescriptor.h"
    

    under the MunitionDescriptor.h include.

    I'd just post the whole thing, but mine is significantly different from having replaced reference counters (KRef_PTR<type>) with plain-old pointers a long time ago -- it would just muddy the water.</type>

    --Jim

     
  • Karl  Jones

    Karl Jones - 2019-03-08

    Thanks ill take a look

     

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo