KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GED_EnhancedGroundCombatSoldier.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_EnhancedGroundCombatSoldier
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 enhanced ground combat soldiers.
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_GROUND_COMBAT_SOLDIER_SIZE = 24;
62 
64 
66 
67  GED_EnhancedGroundCombatSoldier( KUINT16 ID, KINT16 XOffset, KINT16 YOffset, KINT16 ZOffset, const EntityAppearance & EA,
68  KINT8 Psi, KINT8 Theta, KINT8 Phi, KINT8 Speed, KINT8 HeadAzimuth, KINT8 HeadElevation,
69  KINT8 HeadScanRate, KINT8 HeadElevationRate, KUINT8 WaterStatus, KDIS::DATA_TYPE::ENUMS::RestStatus R,
70  KUINT8 PrimaryAmmunition, KUINT8 SecondaryAmmunition );
71 
73  KUINT8 PrimaryAmmunition, KUINT8 SecondaryAmmunition );
74 
76 
77  //************************************
78  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetGroupedEntityCategory
79  //!Description: Identifies the derived GED class.
80  //! Not part of the DIS PDU.
81  //************************************
82  virtual KDIS::DATA_TYPE::ENUMS::GroupedEntityCategory GetGroupedEntityCategory() const;
83 
84  //************************************
85  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetLength
86  //!Description: Returns size of the GED in octets.
87  //! Not part of the DIS PDU.
88  //************************************
89  virtual KUINT8 GetLength() const;
90 
91  //************************************
92  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::SetWaterStatus
93  // KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetWaterStatus
94  //!Description: Represents the amount of water on hand.
95  //! Specified in one ounce increments.
96  // Parameter: KUINT8 W
97  //************************************
98  void SetWaterStatus( KUINT8 W );
99  KUINT8 GetWaterStatus() const;
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::SetRestStatus
103  // KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetRestStatus
104  //!Description: How rested is the soldier. Number of hours slept on average.
105  // Parameter: RestStatus R
106  //************************************
107  void SetRestStatus( KDIS::DATA_TYPE::ENUMS::RestStatus R );
108  KDIS::DATA_TYPE::ENUMS::RestStatus GetRestStatus() const;
109 
110  //************************************
111  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::SetPrimaryAmmunition
112  // KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetPrimaryAmmunition
113  //!Description: Amount of primary ammunition remaining.
114  //! Specified in natural ammunition units for the primary weapon system.
115  // Parameter: KUINT8 P
116  //************************************
117  void SetPrimaryAmmunition( KUINT8 P );
118  KUINT8 GetPrimaryAmmunition() const;
119 
120  //************************************
121  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::SetSecondaryAmmunition
122  // KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetSecondaryAmmunition
123  //!Description: Amount of secondary ammunition remaining.
124  //! Specified in natural ammunition units for the secondary weapon system.
125  // Parameter: KUINT8 S
126  //************************************
127  void SetSecondaryAmmunition( KUINT8 S );
128  KUINT8 GetSecondaryAmmunition() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::GetAsString
132  //!Description: Returns a string representation
133  //************************************
134  virtual KString GetAsString() const;
135 
136  //************************************
137  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::Decode
138  //!Description: Convert From Network Data.
139  // Parameter: KDataStream & stream
140  //************************************
141  virtual void Decode( KDataStream & stream ) throw( KException );
142 
143  //************************************
144  // FullName: KDIS::DATA_TYPE::GED_EnhancedGroundCombatSoldier::Encode
145  //!Description: Convert To Network Data.
146  // Parameter: KDataStream & stream
147  //************************************
148  virtual KDataStream Encode() const;
149  virtual void Encode( KDataStream & stream ) const;
150 
151  KBOOL operator == ( const GED_EnhancedGroundCombatSoldier & Value ) const;
152  KBOOL operator != ( const GED_EnhancedGroundCombatSoldier & Value ) const;
153 };
154 
155 } // END namespace DATA_TYPES
156 } // END namespace KDIS
157 
Definition: GED_BasicGroundCombatSoldier.h:48
short int KINT16
Definition: KDefines.h:102
unsigned short int KUINT16
Definition: KDefines.h:101
RestStatus
Definition: EnumEntityManagement.h:592
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: EntityAppearance.h:58
Definition: GED_EnhancedGroundCombatSoldier.h:47
char KINT8
Definition: KDefines.h:100
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
KUINT8 m_ui8SecAmmun
Definition: GED_EnhancedGroundCombatSoldier.h:57
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
GroupedEntityCategory
Definition: EnumEntityManagement.h:118
KUINT8 m_ui8WaterStatus
Definition: GED_EnhancedGroundCombatSoldier.h:51
KUINT8 m_ui8RestStatus
Definition: GED_EnhancedGroundCombatSoldier.h:53
KUINT8 m_ui8PriAmmun
Definition: GED_EnhancedGroundCombatSoldier.h:55