KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
UnderwaterAcousticEmitterSystem.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: UnderwaterAcousticEmitterSystem
32  created: 2009/01/06
33  author: Karl Jones
34 
35  purpose: Contains infomation about a particular Underwater Acoustic emitter
36  size: 160 bits / 20 octets - min size
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
43 #include "./Vector.h"
45 
46 namespace KDIS {
47 namespace DATA_TYPE {
48 
50 {
51 protected:
52 
54 
56 
58 
60 
62 
63  std::vector<UnderwaterAcousticEmitterBeam> m_vUAEB;
64 
65 public:
66 
67  static const KUINT16 UNDERWATER_ACOUSTIC_EMITTER_SYSTEM_SIZE = 20; // Min Size
68 
70 
72 
74 
75  //************************************
76  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::GetEmitterSystemDataLength
77  //!Description: Length of the emitter system in 32 bits words.
78  //************************************
79  KUINT8 GetEmitterSystemDataLength() const;
80 
81  //************************************
82  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::GetNumberOfBeams
83  //!Description: Returns number of beams for the current system
84  //************************************
85  KUINT8 GetNumberOfBeams() const;
86 
87  //************************************
88  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::SetAcousticEmitterSystem
89  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::GetAcousticEmitterSystem
90  //!Description: Holds infomation about a particular Underwater Acoustic emitter.
91  // Parameter: const AcousticEmitterSystem & AES
92  //************************************
93  void SetAcousticEmitterSystem( const AcousticEmitterSystem & AES );
94  const AcousticEmitterSystem & GetAcousticEmitterSystem() const;
95  AcousticEmitterSystem & GetAcousticEmitterSystem();
96 
97  //************************************
98  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::SetLocation
99  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::GetLocation
100  //!Description: Location of the acoustic source with respect to emitting
101  //! entity coordinate system. Represented as Entity Coordinate Vector.
102  // Parameter: const Vector & L
103  //************************************
104  void SetLocation( const Vector & L );
105  const Vector & GetLocation() const;
106  Vector & GetLocation();
107 
108  //************************************
109  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::AddUnderwaterAcousticEmitterBeam
110  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::SetUnderwaterAcousticEmitterBeam
111  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::GetUnderwaterAcousticEmitterBeam
112  // KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::ClearUnderwaterAcousticEmitterBeams
113  //!Description: Add a articulation parameter / Get vector or params
114  //! Adding will update the Number Of Variable Params
115  //! field.
116  // Parameter: const UnderwaterAcousticEmitterBeam & UAEB
117  //************************************
118  void AddUnderwaterAcousticEmitterBeam( const UnderwaterAcousticEmitterBeam & UAEB );
119  void SetUnderwaterAcousticEmitterBeams( const std::vector<UnderwaterAcousticEmitterBeam> & UAEB );
120  const std::vector<UnderwaterAcousticEmitterBeam> & GetUnderwaterAcousticEmitterBeam() const;
121  void ClearUnderwaterAcousticEmitterBeams();
122 
123  //************************************
124  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::GetAsString
125  //!Description: Returns a string representation
126  //************************************
127  virtual KString GetAsString() const;
128 
129  //************************************
130  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::Decode
131  //!Description: Convert From Network Data.
132  // Parameter: KDataStream & stream
133  //************************************
134  virtual void Decode( KDataStream & stream ) throw( KException );
135 
136  //************************************
137  // FullName: KDIS::DATA_TYPE::UnderwaterAcousticEmitterSystem::Encode
138  //!Description: Convert To Network Data.
139  // Parameter: KDataStream & stream
140  //************************************
141  virtual KDataStream Encode() const;
142  virtual void Encode( KDataStream & stream ) const;
143 
144  KBOOL operator == ( const UnderwaterAcousticEmitterSystem & Value ) const;
145  KBOOL operator != ( const UnderwaterAcousticEmitterSystem & Value ) const;
146 };
147 
148 } // END namespace DATA_TYPES
149 } // END namespace KDIS
150 
KUINT16 m_ui16Padding1
Definition: UnderwaterAcousticEmitterSystem.h:57
Vector m_Location
Definition: UnderwaterAcousticEmitterSystem.h:61
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT8 m_ui8NumBeams
Definition: UnderwaterAcousticEmitterSystem.h:55
AcousticEmitterSystem m_AES
Definition: UnderwaterAcousticEmitterSystem.h:59
Definition: UnderwaterAcousticEmitterSystem.h:49
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
std::vector< UnderwaterAcousticEmitterBeam > m_vUAEB
Definition: UnderwaterAcousticEmitterSystem.h:63
Definition: DataTypeBase.h:49
Definition: AcousticEmitterSystem.h:46
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_ui8EmitterSystemDataLength
Definition: UnderwaterAcousticEmitterSystem.h:53
#define KDIS_EXPORT
Definition: KDefines.h:82