KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GED_BasicRotorWingAircraft.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_BasicRotorWingAircraft
32  created: 07:06:2009
33  author: Karl Jones
34 
35  purpose: Contains entity state information about an individual entity
36  within a group of basic rotor wing aircrafts.
37  size: 192 bits / 24 octets
38 *********************************************************************/
39 
40 #pragma once
41 
43 #include "./EntityAppearance.h"
44 
45 namespace KDIS {
46 namespace DATA_TYPE {
47 
49 {
50 protected:
51 
53 
55 
57 
59 
60 public:
61 
62  static const KUINT16 GED_BASIC_ROTOR_WING_AIRCRAFT_SIZE = 24;
63 
65 
67 
68  GED_BasicRotorWingAircraft( KUINT16 ID, KINT16 XOffset, KINT16 YOffset, KINT16 ZOffset, const EntityAppearance & EA, KINT8 Psi,
69  KINT8 Theta, KINT8 Phi, KUINT8 FuelStatus, KINT8 HorizontalDeviation, KINT8 VerticalDeviation,
70  KINT8 Speed, KINT8 TurretAzimuth, KINT8 GunElevation, KINT8 TurretSlewRate, KINT8 GunElevationRate );
71 
72  virtual ~GED_BasicRotorWingAircraft();
73 
74  //************************************
75  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetGroupedEntityCategory
76  //!Description: Identifies the derived GED class.
77  //! Not part of the DIS PDU.
78  //************************************
79  virtual KDIS::DATA_TYPE::ENUMS::GroupedEntityCategory GetGroupedEntityCategory() const;
80 
81  //************************************
82  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetLength
83  //!Description: Returns size of the GED in octets.
84  //! Not part of the DIS PDU.
85  //************************************
86  virtual KUINT8 GetLength() const;
87 
88  //************************************
89  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::SetTurretAzimuth
90  // KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetTurretAzimuth
91  //!Description: Turret azimuth specified in 25 milliradian increments.
92  // Parameter: KINT8 T, void
93  //************************************
94  void SetTurretAzimuth( KINT8 T );
95  KINT8 GetTurretAzimuth() const;
96 
97  //************************************
98  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::SetGunElevation
99  // KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetGunElevation
100  //!Description: Gun elevation specified in 25 milliradian increments.
101  // Parameter: KINT8 G, void
102  //************************************
103  void SetGunElevation( KINT8 G );
104  KINT8 GetGunElevation() const;
105 
106  //************************************
107  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::SetTurretSlewRate
108  // KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetTurretSlewRate
109  //!Description: Turret slew rate specified in 25 milliradian per secound increments.
110  // Parameter: KINT8 T, void
111  //************************************
112  void SetTurretSlewRate( KINT8 T );
113  KINT8 GetTurretSlewRate() const;
114 
115  //************************************
116  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::SetGunElevationRate
117  // KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetGunElevationRate
118  //!Description: Gun elevation rate specified in 25 milliradian per secound increments.
119  // Parameter: KINT8 G, void
120  //************************************
121  void SetGunElevationRate( KINT8 G );
122  KINT8 GetGunElevationRate() const;
123 
124  //************************************
125  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::GetAsString
126  //!Description: Returns a string representation
127  //************************************
128  virtual KString GetAsString() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::Decode
132  //!Description: Convert From Network Data.
133  // Parameter: KDataStream & stream
134  //************************************
135  virtual void Decode( KDataStream & stream ) throw( KException );
136 
137  //************************************
138  // FullName: KDIS::DATA_TYPE::GED_BasicRotorWingAircraft::Encode
139  //!Description: Convert To Network Data.
140  // Parameter: KDataStream & stream
141  //************************************
142  virtual KDataStream Encode() const;
143  virtual void Encode( KDataStream & stream ) const;
144 
145  KBOOL operator == ( const GED_BasicRotorWingAircraft & Value ) const;
146  KBOOL operator != ( const GED_BasicRotorWingAircraft & Value ) const;
147 };
148 
149 } // END namespace DATA_TYPES
150 } // END namespace KDIS
151 
short int KINT16
Definition: KDefines.h:102
unsigned short int KUINT16
Definition: KDefines.h:101
KINT8 m_i8TrrtSlwRt
Definition: GED_BasicRotorWingAircraft.h:56
Definition: GED_BasicFixedWingAircraft.h:47
KINT8 m_i8GnElvRt
Definition: GED_BasicRotorWingAircraft.h:58
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: EntityAppearance.h:58
char KINT8
Definition: KDefines.h:100
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
KINT8 m_i8GnElv
Definition: GED_BasicRotorWingAircraft.h:54
KINT8 m_i8TrrtAz
Definition: GED_BasicRotorWingAircraft.h:52
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
GroupedEntityCategory
Definition: EnumEntityManagement.h:118
Definition: GED_BasicRotorWingAircraft.h:48