KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GED_EnhancedFixedWingAircraft.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: GED_EnhancedFixedWingAircraft
32  created: 24:06:2009
33  author: Karl Jones
34 
35  purpose: Contains entity state information about an individual entity
36  within a group of enhanced fixed wing aircraft.
37  size: 192 bits / 24 octets
38 *********************************************************************/
39 
40 #pragma once
41 
43 
44 namespace KDIS {
45 namespace DATA_TYPE {
46 
48 {
49 protected:
50 
52 
54 
56 
58 
59 public:
60 
61  static const KUINT16 GED_ENHANCED_FIXED_WING_AIRCRAFT_SIZE = 24;
62 
64 
66 
67  GED_EnhancedFixedWingAircraft( KUINT16 ID, KINT16 XOffset, KINT16 YOffset, KINT16 ZOffset, const EntityAppearance & EA, KINT8 Psi, KINT8 Theta, KINT8 Phi,
68  KUINT8 FuelStatus, KINT8 HorizontalDeviation, KINT8 VerticalDeviation, KINT8 Speed, KUINT8 SupFuelStatus,
69  KUINT8 AirMaintenanceStatus, KUINT8 PrimaryAmmunition, KUINT8 SecondaryAmmunition );
70 
71  GED_EnhancedFixedWingAircraft( const GED_BasicFixedWingAircraft & BFWA, KUINT8 SupFuelStatus, KUINT8 AirMaintenanceStatus, KUINT8 PrimaryAmmunition, KUINT8 SecondaryAmmunition );
72 
74 
75  //************************************
76  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetGroupedEntityCategory
77  //!Description: Identifies the derived GED class.
78  //! Not part of the DIS PDU.
79  //************************************
80  virtual KDIS::DATA_TYPE::ENUMS::GroupedEntityCategory GetGroupedEntityCategory() const;
81 
82  //************************************
83  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetLength
84  //!Description: Returns size of the GED in octets.
85  //! Not part of the DIS PDU.
86  //************************************
87  virtual KUINT8 GetLength() const;
88 
89  //************************************
90  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::SetSupplementalFuelStatus
91  // KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetSupplementalFuelStatus
92  //!Description: Represents the amount of supplemental fuel remaining.
93  //! Specified in natural units.
94  // Parameter: KUINT8 F, void
95  //************************************
96  void SetSupplementalFuelStatus( KUINT8 F );
97  KUINT8 GetSupplementalFuelStatus() const;
98 
99  //************************************
100  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::SetAirMaintenanceStatus
101  // KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetAirMaintenanceStatus
102  //!Description: Time spent since last maintenance in hours.
103  // Parameter: KUINT8 A, void
104  //************************************
105  void SetAirMaintenanceStatus( KUINT8 A );
106  KUINT8 GetAirMaintenanceStatus() const;
107 
108  //************************************
109  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::SetPrimaryAmmunition
110  // KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetPrimaryAmmunition
111  //!Description: Amount of primary ammunition remaining.
112  //! Specified in natural ammunition units for the primary weapon system.
113  // Parameter: KUINT8 P, void
114  //************************************
115  void SetPrimaryAmmunition( KUINT8 P );
116  KUINT8 GetPrimaryAmmunition() const;
117 
118  //************************************
119  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::SetSecondaryAmmunition
120  // KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetSecondaryAmmunition
121  //!Description: Amount of secondary ammunition remaining.
122  //! Specified in natural ammunition units for the secondary weapon system.
123  // Parameter: KUINT8 S, void
124  //************************************
125  void SetSecondaryAmmunition( KUINT8 S );
126  KUINT8 GetSecondaryAmmunition() const;
127 
128  //************************************
129  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::GetAsString
130  //!Description: Returns a string representation
131  //************************************
132  virtual KString GetAsString() const;
133 
134  //************************************
135  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::Decode
136  //!Description: Convert From Network Data.
137  // Parameter: KDataStream & stream
138  //************************************
139  virtual void Decode( KDataStream & stream ) throw( KException );
140 
141  //************************************
142  // FullName: KDIS::DATA_TYPE::GED_EnhancedFixedWingAircraft::Encode
143  //!Description: Convert To Network Data.
144  // Parameter: KDataStream & stream
145  //************************************
146  virtual KDataStream Encode() const;
147  virtual void Encode( KDataStream & stream ) const;
148 
149  KBOOL operator == ( const GED_EnhancedFixedWingAircraft & Value ) const;
150  KBOOL operator != ( const GED_EnhancedFixedWingAircraft & Value ) const;
151 };
152 
153 } // END namespace DATA_TYPES
154 } // END namespace KDIS
155 
short int KINT16
Definition: KDefines.h:102
KUINT8 m_ui8SecAmmun
Definition: GED_EnhancedFixedWingAircraft.h:57
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: GED_BasicFixedWingAircraft.h:47
Definition: KDefines.h:182
Definition: KDataStream.h:48
KUINT8 m_ui8AirMaintStatus
Definition: GED_EnhancedFixedWingAircraft.h:53
Definition: GED_EnhancedFixedWingAircraft.h:47
Definition: EntityAppearance.h:58
char KINT8
Definition: KDefines.h:100
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
KUINT8 m_ui8PriAmmun
Definition: GED_EnhancedFixedWingAircraft.h:55
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
KUINT8 m_ui8SupFuelStatus
Definition: GED_EnhancedFixedWingAircraft.h:51
GroupedEntityCategory
Definition: EnumEntityManagement.h:118