KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Fire_PDU Class Reference

#include <Fire_PDU.h>

Inheritance diagram for Fire_PDU:
Collaboration diagram for Fire_PDU:

Public Member Functions

virtual void Decode (KDataStream &stream, bool ignoreHeader=false) throw ( KException )
 Description: Convert From Network Data. More...
 
virtual KDataStream Encode () const
 Description: Convert To Network Data. More...
 
virtual void Encode (KDataStream &stream) const
 
 Fire_PDU ()
 
 Fire_PDU (KDataStream &stream) throw ( KException )
 
 Fire_PDU (const Header &H, KDataStream &stream) throw ( KException )
 
 Fire_PDU (const Warfare_Header &WarfareHeader, KUINT32 FireMissionIndex, const KDIS::DATA_TYPE::WorldCoordinates &Location, KDIS::DATA_TYPE::DescPtr Desc, const KDIS::DATA_TYPE::Vector &Velocity, KFLOAT32 Range)
 
 Fire_PDU (const KDIS::DATA_TYPE::EntityIdentifier &FiringEntID, const KDIS::DATA_TYPE::EntityIdentifier &TargetEntID, const KDIS::DATA_TYPE::EntityIdentifier &MunitionID, const KDIS::DATA_TYPE::EntityIdentifier &EventID, KUINT32 FireMissionIndex, const KDIS::DATA_TYPE::WorldCoordinates &Location, KDIS::DATA_TYPE::DescPtr Desc, const KDIS::DATA_TYPE::Vector &Velocity, KFLOAT32 Range)
 
virtual KString GetAsString () const
 Description: Returns a string representation of the PDU. More...
 
const KDIS::DATA_TYPE::DescPtr GetDescriptor () const
 
KDIS::DATA_TYPE::DescPtr GetDescriptor ()
 
KUINT32 GetFireMissionIndex () const
 
const
KDIS::DATA_TYPE::WorldCoordinates
GetLocation () const
 
KDIS::DATA_TYPE::WorldCoordinatesGetLocation ()
 
KDIS::DATA_TYPE::ENUMS::FireType GetPDUStatusFireType () const
 
KFLOAT32 GetRange () const
 
const KDIS::DATA_TYPE::VectorGetVelocity () const
 
KDIS::DATA_TYPE::VectorGetVelocity ()
 
KBOOL operator!= (const Fire_PDU &Value) const
 
KBOOL operator== (const Fire_PDU &Value) const
 
void SetDescriptor (KDIS::DATA_TYPE::DescPtr D)
 
void SetFireMissionIndex (KUINT32 FMI)
 
void SetLocation (const KDIS::DATA_TYPE::WorldCoordinates &L)
 
void SetPDUStatusFireType (KDIS::DATA_TYPE::ENUMS::FireType FT)
 Description: Indicates the descriptor type used. FTI. More...
 
void SetRange (KFLOAT32 R)
 
void SetVelocity (const KDIS::DATA_TYPE::Vector &V)
 Description: Velocity of fire munition. More...
 
virtual ~Fire_PDU ()
 
- Public Member Functions inherited from Warfare_Header
const
KDIS::DATA_TYPE::EntityIdentifier
GetEventID () const
 
KDIS::DATA_TYPE::EntityIdentifierGetEventID ()
 
const
KDIS::DATA_TYPE::EntityIdentifier
GetFiringEntityID () const
 
KDIS::DATA_TYPE::EntityIdentifierGetFiringEntityID ()
 
const
KDIS::DATA_TYPE::EntityIdentifier
GetMunitionID () const
 
KDIS::DATA_TYPE::EntityIdentifierGetMunitionID ()
 
const
KDIS::DATA_TYPE::EntityIdentifier
GetTargetEntityID () const
 
KDIS::DATA_TYPE::EntityIdentifierGetTargetEntityID ()
 
KBOOL operator!= (const Warfare_Header &Value) const
 
KBOOL operator== (const Warfare_Header &Value) const
 
void SetEventID (const KDIS::DATA_TYPE::EntityIdentifier &ID)
 
void SetFiringEntityID (const KDIS::DATA_TYPE::EntityIdentifier &ID)
 Description: Firing Entity. More...
 
void SetMunitionID (const KDIS::DATA_TYPE::EntityIdentifier &ID)
 
void SetTargetEntityID (const KDIS::DATA_TYPE::EntityIdentifier &ID)
 
 Warfare_Header ()
 
 Warfare_Header (const Header &H)
 
 Warfare_Header (const KDIS::DATA_TYPE::EntityIdentifier &FiringEntID, const KDIS::DATA_TYPE::EntityIdentifier &TargetEntID, const KDIS::DATA_TYPE::EntityIdentifier &MunitionID, const KDIS::DATA_TYPE::EntityIdentifier &EventID)
 
virtual ~Warfare_Header ()
 
- Public Member Functions inherited from Header7
KUINT8 GetPDUStatus () const
 
KBOOL GetPDUStatusCEI () const
 
KDIS::DATA_TYPE::ENUMS::DetonationType GetPDUStatusDTI () const
 
KBOOL GetPDUStatusFTI () const
 
KDIS::DATA_TYPE::ENUMS::AttachedIndicator GetPDUStatusIAI () const
 
KDIS::DATA_TYPE::ENUMS::LVCIndicator GetPDUStatusLVC () const
 
KDIS::DATA_TYPE::ENUMS::AttachedIndicator GetPDUStatusRAI () const
 
KBOOL GetPDUStatusSM () const
 
KBOOL GetPDUStatusTEI () const
 
 Header7 ()
 
 Header7 (KDataStream &stream) throw ( KException )
 
 Header7 (KDIS::DATA_TYPE::ENUMS::ProtocolVersion PV, KUINT8 ExerciseID, KDIS::DATA_TYPE::ENUMS::PDUType PT, KDIS::DATA_TYPE::ENUMS::ProtocolFamily PF, const KDIS::DATA_TYPE::TimeStamp &TS, KUINT16 PDULength)
 
KBOOL operator!= (const Header7 &Value) const
 
KBOOL operator== (const Header7 &Value) const
 
void SetPDUStatus (KUINT8 S)
 Description: The entire PDU status field. More...
 
void SetPDUStatusCEI (KBOOL CEI)
 
void SetPDUStatusDTI (KDIS::DATA_TYPE::ENUMS::DetonationType DTI)
 
void SetPDUStatusFTI (KBOOL FTI)
 
void SetPDUStatusIAI (KDIS::DATA_TYPE::ENUMS::AttachedIndicator RAI)
 
void SetPDUStatusLVC (KDIS::DATA_TYPE::ENUMS::LVCIndicator LVC)
 
void SetPDUStatusRAI (KDIS::DATA_TYPE::ENUMS::AttachedIndicator RAI)
 
void SetPDUStatusSM (KBOOL SM)
 
void SetPDUStatusTEI (KBOOL TEI)
 PDU: See Header7 description to see which PDU's use this field. More...
 
virtual ~Header7 ()
 
- Public Member Functions inherited from Header6
KUINT8 GetExerciseID () const
 
KUINT16 GetPDULength () const
 
KDIS::DATA_TYPE::ENUMS::PDUType GetPDUType () const
 
KDIS::DATA_TYPE::ENUMS::ProtocolFamily GetProtocolFamily () const
 
KDIS::DATA_TYPE::ENUMS::ProtocolVersion GetProtocolVersion () const
 
const KDIS::DATA_TYPE::TimeStampGetTimeStamp () const
 
KDIS::DATA_TYPE::TimeStampGetTimeStamp ()
 
 Header6 ()
 
 Header6 (KDataStream &stream) throw ( KException )
 
 Header6 (KDIS::DATA_TYPE::ENUMS::ProtocolVersion PV, KUINT8 ExerciseID, KDIS::DATA_TYPE::ENUMS::PDUType PT, KDIS::DATA_TYPE::ENUMS::ProtocolFamily PF, const KDIS::DATA_TYPE::TimeStamp &TS, KUINT16 PDULength)
 
KBOOL operator!= (const Header6 &Value) const
 
KBOOL operator== (const Header6 &Value) const
 
void SetExerciseID (KUINT8 EID)
 
void SetPDULength (KUINT16 PDUL)
 
void SetPDUType (KDIS::DATA_TYPE::ENUMS::PDUType Type)
 
void SetProtocolFamily (KDIS::DATA_TYPE::ENUMS::ProtocolFamily PF)
 
void SetProtocolVersion (KDIS::DATA_TYPE::ENUMS::ProtocolVersion PV)
 to the mimimum version of DIS required to support the current PDU. More...
 
void SetTimeStamp (const KDIS::DATA_TYPE::TimeStamp &TS)
 
virtual ~Header6 ()
 

Static Public Attributes

static const KUINT16 FIRE_PDU_SIZE = 96
 
- Static Public Attributes inherited from Warfare_Header
static const KUINT16 WARFARE_HEADER_SIZE = 36
 
- Static Public Attributes inherited from Header6
static const KUINT16 HEADER6_PDU_SIZE = 12
 

Protected Attributes

KFLOAT32 m_f32Range
 
KDIS::DATA_TYPE::WorldCoordinates m_Location
 
KDIS::DATA_TYPE::DescPtr m_pDescriptor
 
KUINT32 m_ui32FireMissionIndex
 
KDIS::DATA_TYPE::Vector m_Velocity
 
- Protected Attributes inherited from Warfare_Header
KDIS::DATA_TYPE::EntityIdentifier m_EventID
 
KDIS::DATA_TYPE::EntityIdentifier m_FiringEntityID
 
KDIS::DATA_TYPE::EntityIdentifier m_MunitionID
 
KDIS::DATA_TYPE::EntityIdentifier m_TargetEntityID
 
- Protected Attributes inherited from Header7
union {
   struct {
      union {
         struct {
            KUINT8   m_ui8PDUStatusBit5: 1
 
            KUINT8   m_ui8PDUStatusFTI: 1
 
         } 
 
         KUINT8   m_ui8PDUStatusDTI_RAI_IAI: 2
 
      } 
 
      KUINT8   m_ui8PDUStatusBit6: 1
 
      KUINT8   m_ui8PDUStatusCEI: 1
 
      KUINT8   m_ui8PDUStatusLVC: 2
 
      KUINT8   m_ui8PDUStatusSM: 1
 
      KUINT8   m_ui8PDUStatusTEI: 1
 
   } 
 
   KUINT8   m_ui8PDUStatus
 
m_PDUStatusUnion
 
- Protected Attributes inherited from Header6
KDIS::DATA_TYPE::TimeStamp m_TimeStamp
 
KUINT16 m_ui16PDULength
 
KUINT8 m_ui8ExerciseID
 
KUINT8 m_ui8Padding1
 
KUINT8 m_ui8Padding2
 
KUINT8 m_ui8PDUType
 
KUINT8 m_ui8ProtocolFamily
 
KUINT8 m_ui8ProtocolVersion
 

Constructor & Destructor Documentation

Fire_PDU ( )
Fire_PDU ( KDataStream stream)
throw (KException
)
Fire_PDU ( const Header H,
KDataStream stream 
)
throw (KException
)
Fire_PDU ( const Warfare_Header WarfareHeader,
KUINT32  FireMissionIndex,
const KDIS::DATA_TYPE::WorldCoordinates Location,
KDIS::DATA_TYPE::DescPtr  Desc,
const KDIS::DATA_TYPE::Vector Velocity,
KFLOAT32  Range 
)
Fire_PDU ( const KDIS::DATA_TYPE::EntityIdentifier FiringEntID,
const KDIS::DATA_TYPE::EntityIdentifier TargetEntID,
const KDIS::DATA_TYPE::EntityIdentifier MunitionID,
const KDIS::DATA_TYPE::EntityIdentifier EventID,
KUINT32  FireMissionIndex,
const KDIS::DATA_TYPE::WorldCoordinates Location,
KDIS::DATA_TYPE::DescPtr  Desc,
const KDIS::DATA_TYPE::Vector Velocity,
KFLOAT32  Range 
)
virtual ~Fire_PDU ( )
virtual

Member Function Documentation

void SetPDUStatusFireType ( KDIS::DATA_TYPE::ENUMS::FireType  FT)

Description: Indicates the descriptor type used. FTI.

KDIS::DATA_TYPE::ENUMS::FireType GetPDUStatusFireType ( ) const
void SetFireMissionIndex ( KUINT32  FMI)

Description: Identifies the fire mission. If unknown value will be symbolic value: NO_FIRE_MISSION

KUINT32 GetFireMissionIndex ( ) const
void SetLocation ( const KDIS::DATA_TYPE::WorldCoordinates L)

Description: Location of fire event in world coordinates.

const KDIS::DATA_TYPE::WorldCoordinates& GetLocation ( ) const
void SetDescriptor ( KDIS::DATA_TYPE::DescPtr  D)

Description: Descriptor, describes type of munition. Pre DIS 7 this will always be a MunitionDescriptor. In DIS 7 a Fire PDU can send a Munition Descriptor or an Expendable Descriptor. Setting this in DIS 7 will automatically set the FTI (PDUStatusFireType) field and will cause the protocol version to change to 7 if the type is Expendable. I leave it as default if the type is Munition. Note: By default this value will be a MunitionDescriptor, it is not null by default. Example usage in DIS 7: SetDescriptor( DescPtr( new ExplosionDescriptor() ) );

const KDIS::DATA_TYPE::DescPtr GetDescriptor ( ) const
KDIS::DATA_TYPE::DescPtr GetDescriptor ( )
void SetVelocity ( const KDIS::DATA_TYPE::Vector V)

Description: Velocity of fire munition.

const KDIS::DATA_TYPE::Vector& GetVelocity ( ) const
KDIS::DATA_TYPE::Vector& GetVelocity ( )
void SetRange ( KFLOAT32  R)

Description: Range. Range that firing entity has calculated target to be.

KFLOAT32 GetRange ( ) const
virtual KString GetAsString ( ) const
virtual

Description: Returns a string representation of the PDU.

Reimplemented from Warfare_Header.

virtual void Decode ( KDataStream stream,
bool  ignoreHeader = false 
)
throw (KException
)
virtual

Description: Convert From Network Data.

Reimplemented from Warfare_Header.

virtual KDataStream Encode ( ) const
virtual

Description: Convert To Network Data.

Reimplemented from Warfare_Header.

virtual void Encode ( KDataStream stream) const
virtual

Reimplemented from Warfare_Header.

KBOOL operator== ( const Fire_PDU Value) const
KBOOL operator!= ( const Fire_PDU Value) const

Member Data Documentation

KUINT32 m_ui32FireMissionIndex
protected
KDIS::DATA_TYPE::WorldCoordinates m_Location
protected
KDIS::DATA_TYPE::DescPtr m_pDescriptor
protected
KDIS::DATA_TYPE::Vector m_Velocity
protected
KFLOAT32 m_f32Range
protected
const KUINT16 FIRE_PDU_SIZE = 96
static

The documentation for this class was generated from the following file: