KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
UnderwaterAcousticEmitterBeam.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: UnderwaterAcousticEmitterBeam
32  created: 2009/01/15
33  author: Karl Jones
34 
35  purpose: Contains information about a underwater acoustic emitter beam
36  size: 192 bits / 24 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
43 
44 namespace KDIS {
45 namespace DATA_TYPE {
46 
48 {
49 protected:
50 
52 
54 
56 
58 
59 public:
60 
61  static const KUINT16 UNDERWATER_ACOUSTIC_EMITTER_BEAM_SIZE = 24;
62 
64 
66 
68 
70 
71  //************************************
72  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::GetSystemDataLength
73  //!Description: Length of the emission system in 32 bit words.
74  //! E.G 1 = 32 bits 4 octets. Calculated automatically.
75  //************************************
76  KUINT8 GetBeamDataLength() const;
77 
78  //************************************
79  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::SetUnderwaterAcousticEmitterBeamIDNumber
80  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::GetUnderwaterAcousticEmitterBeamIDNumber
81  //!Description: Unique ID for emitter beam, Once established for an exercise
82  //! no other beam may use this ID.
83  // Parameter: KUINT8 ID, void
84  //************************************
85  void SetUnderwaterAcousticEmitterBeamIDNumber( KUINT8 ID );
86  KUINT8 GetUnderwaterAcousticEmitterBeamIDNumber() const;
87 
88  //************************************
89  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::SetSSetUnderwaterAcousticFundamentalParameterDataystemType
90  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::GetUnderwaterAcousticFundamentalParameterData
91  //!Description: System Type
92  // Parameter: UnderwaterAcousticFundamentalParameterData AEFPD, void
93  //************************************
94  void SetUnderwaterAcousticFundamentalParameterData( const UnderwaterAcousticFundamentalParameterData & UAFPD );
95  const UnderwaterAcousticFundamentalParameterData & GetUnderwaterAcousticFundamentalParameterData() const;
96  UnderwaterAcousticFundamentalParameterData & GetUnderwaterAcousticFundamentalParameterData();
97 
98  //************************************
99  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::GetAsString
100  //!Description: Returns a string representation
101  //************************************
102  virtual KString GetAsString() const;
103 
104  //************************************
105  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::Decode
106  //!Description: Convert From Network Data.
107  // Parameter: KDataStream & stream
108  //************************************
109  virtual void Decode( KDataStream & stream ) throw( KException );
110 
111  //************************************
112  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterBeam::Encode
113  //!Description: Convert To Network Data.
114  // Parameter: KDataStream & stream
115  //************************************
116  virtual KDataStream Encode() const;
117  virtual void Encode( KDataStream & stream ) const;
118 
119  KBOOL operator == ( const UnderwaterAcousticEmitterBeam & Value ) const;
120  KBOOL operator != ( const UnderwaterAcousticEmitterBeam & Value ) const;
121 };
122 
123 } // END namespace DATA_TYPES
124 } // END namespace KDIS
Definition: UnderwaterAcousticFundamentalParameterData.h:47
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: KDefines.h:182
UnderwaterAcousticFundamentalParameterData m_UAFPD
Definition: UnderwaterAcousticEmitterBeam.h:57
KUINT16 m_ui16Padding1
Definition: UnderwaterAcousticEmitterBeam.h:55
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
Definition: UnderwaterAcousticEmitterBeam.h:47
KUINT8 m_ui8BeamDataLength
Definition: UnderwaterAcousticEmitterBeam.h:51
#define KDIS_EXPORT
Definition: KDefines.h:82
KUINT8 m_ui8BeamIDNumber
Definition: UnderwaterAcousticEmitterBeam.h:53