KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
AcousticEmitterSystem.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: AcousticEmitterSystem
32  created: 06/01/2009
33  author: Karl Jones
34 
35  purpose: Contains information about a particular Underwater Acoustic emitter.
36  size: 32 bits / 4 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
42 
43 namespace KDIS {
44 namespace DATA_TYPE {
45 
47 {
48 protected:
49 
51 
53 
55 
56 public:
57 
58  static const KUINT16 ACOUSTIC_EMITTER_SYSTEM_SIZE = 4;
59 
61 
62  AcousticEmitterSystem( KDataStream & stream ) throw( KException );
63 
65 
66  virtual ~AcousticEmitterSystem();
67 
68  //************************************
69  // FullName: KDIS::DATA_TYPE::AcousticEmitterSystem::SetName
70  // KDIS::DATA_TYPE::AcousticEmitterSystem::GetName
71  //!Description: Specifies the system for the particular emitter
72  // Parameter: AcousticSystemName ASN, void
73  //************************************
76 
77  //************************************
78  // FullName: KDIS::DATA_TYPE::AcousticEmitterSystem::SetFunction
79  // KDIS::DATA_TYPE::AcousticEmitterSystem::GetFunction
80  //!Description: Specifies the function of the emitter system
81  // Parameter: AcousticSystemFunction ASF, void
82  //************************************
83  void SetFunction( KDIS::DATA_TYPE::ENUMS::AcousticSystemFunction ASF );
85 
86  //************************************
87  // FullName: KDIS::DATA_TYPE::AcousticEmitterSystem::SetEmitterID
88  // KDIS::DATA_TYPE::AcousticEmitterSystem::GetEmitterID
89  //!Description: ID of the emitter. Used for identifying multiple emitters on a
90  //! single entity. Numbering of systems shall begin with 1.
91  // Parameter: KUINT8 ID, void
92  //************************************
93  void SetEmitterID( KUINT8 ID );
94  KUINT8 GetEmitterID() const;
95 
96  //************************************
97  // FullName: KDIS::DATA_TYPE::AcousticEmitterSystem::GetAsString
98  //!Description: Returns a string representation
99  //************************************
100  virtual KString GetAsString() const;
101 
102  //************************************
103  // FullName: KDIS::DATA_TYPE::AcousticEmitterSystem::Decode
104  //!Description: Convert From Network Data.
105  // Parameter: KDataStream & stream
106  //************************************
107  virtual void Decode( KDataStream & stream ) throw( KException );
108 
109  //************************************
110  // FullName: KDIS::DATA_TYPE::AcousticEmitterSystem::Encode
111  //!Description: Convert To Network Data.
112  // Parameter: KDataStream & stream
113  //************************************
114  virtual KDataStream Encode() const;
115  virtual void Encode( KDataStream & stream ) const;
116 
117  KBOOL operator == ( const AcousticEmitterSystem & Value ) const;
118  KBOOL operator != ( const AcousticEmitterSystem & Value ) const;
119 };
120 
121 } // END namespace DATA_TYPES
122 } // END namespace KDIS
123 
KUINT8 m_ui8Function
Definition: AcousticEmitterSystem.h:52
AcousticSystemName
Definition: EnumEmitter.h:1422
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
Definition: AcousticEmitterSystem.h:46
bool KBOOL
Definition: KDefines.h:119
AcousticSystemFunction
Definition: EnumEmitter.h:1448
KUINT16 m_ui16EmitterName
Definition: AcousticEmitterSystem.h:50
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
KUINT8 m_ui8EmitterIDNumber
Definition: AcousticEmitterSystem.h:54