KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GED_BasicFixedWingAircraft.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_BasicFixedWingAircraft
32  created: 21:06:2009
33  author: Karl Jones
34 
35  purpose: Contains entity state information about an individual entity
36  within a group of basic fixed wing aircraft.
37  size: 160 bits / 20 octets
38 *********************************************************************/
39 
40 #pragma once
41 
43 
44 namespace KDIS {
45 namespace DATA_TYPE {
46 
48 {
49 protected:
50 
52 
54 
56 
57 public:
58 
59  static const KUINT16 GED_BASIC_FIXED_WING_AIRCRAFT_SIZE = 20;
60 
62 
64 
65  GED_BasicFixedWingAircraft( KUINT16 ID, KINT16 XOffset, KINT16 YOffset, KINT16 ZOffset, const EntityAppearance & EA, KINT8 Psi, KINT8 Theta,
66  KINT8 Phi, KUINT8 FuelStatus, KINT8 HorizontalDeviation, KINT8 VerticalDeviation, KINT8 Speed );
67 
68  virtual ~GED_BasicFixedWingAircraft();
69 
70  //************************************
71  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::GetGroupedEntityCategory
72  //!Description: Identifies the derived GED class.
73  //! Not part of the DIS PDU.
74  //************************************
75  virtual KDIS::DATA_TYPE::ENUMS::GroupedEntityCategory GetGroupedEntityCategory() const;
76 
77  //************************************
78  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::GetLength
79  //!Description: Returns size of the GED in octets.
80  //! Not part of the DIS PDU.
81  //************************************
82  virtual KUINT8 GetLength() const;
83 
84  //************************************
85  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::SetFuelStatus
86  // KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::GetFuelStatus
87  //!Description: Represents the amount of primary fuel remaining.
88  //! Specified in natural units of the specified system.
89  // Parameter: KUINT8 F, void
90  //************************************
91  void SetFuelStatus( KUINT8 F );
92  KUINT8 GetFuelStatus() const;
93 
94  //************************************
95  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::SetMovementDirection
96  // KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::SetMovementDirectionHorizontal
97  // KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::SetMovementDirectionVertical
98  // KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::GetMovementDirectionHorizontal
99  // KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::GetMovementDirectionVertical
100  //!Description: Movement Direction is specified as a horizontal and a vertical deviation from
101  //! the Entity Orientation.
102  //! Each deviation is specified in 25 milliradian increments.
103  // Parameter: KINT8 Horizontal, KINT8 H, KINT8 V, void
104  // Parameter: KINT8 Vertical, void
105  //************************************
106  void SetMovementDirection( KINT8 Horizontal, KINT8 Vertical );
107  void SetMovementDirectionHorizontal( KINT8 H );
108  void SetMovementDirectionVertical( KINT8 V );
109  KINT8 GetMovementDirectionHorizontal() const;
110  KINT8 GetMovementDirectionVertical() const;
111 
112  //************************************
113  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::GetAsString
114  //!Description: Returns a string representation
115  //************************************
116  virtual KString GetAsString() const;
117 
118  //************************************
119  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::Decode
120  //!Description: Convert From Network Data.
121  // Parameter: KDataStream & stream
122  //************************************
123  virtual void Decode( KDataStream & stream ) throw( KException );
124 
125  //************************************
126  // FullName: KDIS::DATA_TYPE::GED_BasicFixedWingAircraft::Encode
127  //!Description: Convert To Network Data.
128  // Parameter: KDataStream & stream
129  //************************************
130  virtual KDataStream Encode() const;
131  virtual void Encode( KDataStream & stream ) const;
132 
133  KBOOL operator == ( const GED_BasicFixedWingAircraft & Value ) const;
134  KBOOL operator != ( const GED_BasicFixedWingAircraft & Value ) const;
135 };
136 
137 } // END namespace DATA_TYPES
138 } // END namespace KDIS
139 
short int KINT16
Definition: KDefines.h:102
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT8 m_ui8FuelStatus
Definition: GED_BasicFixedWingAircraft.h:51
Definition: GED_BasicFixedWingAircraft.h:47
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
Definition: GED_GroundLogisticsVehicle.h:48
KINT8 m_i8VertDevi
Definition: GED_BasicFixedWingAircraft.h:55
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
GroupedEntityCategory
Definition: EnumEntityManagement.h:118
KINT8 m_i8HoriDevi
Definition: GED_BasicFixedWingAircraft.h:53