open-dis-cpp
AcousticEmitterSystemData.h
1 #pragma once
2 
3 #include <dis6/AcousticEmitterSystem.h>
4 #include <dis6/Vector3Float.h>
5 #include <dis6/AcousticBeamData.h>
6 #include <vector>
7 #include <dis6/utils/DataStream.h>
8 #include <dis6/opendis6_export.h>
9 
10 
11 namespace DIS
12 {
13 // Used in the UA pdu; ties together an emmitter and a location. This requires manual cleanup; the beam data should not be attached to each emitter system.
14 
15 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
16 //
17 // @author DMcG, jkg
18 
19 class OPENDIS6_EXPORT AcousticEmitterSystemData
20 {
21 protected:
23  unsigned char _emitterSystemDataLength;
24 
26  unsigned char _numberOfBeams;
27 
29  unsigned short _pad2;
30 
33 
36 
38  std::vector<AcousticBeamData> _beamRecords;
39 
40 
41  public:
43  virtual ~AcousticEmitterSystemData();
44 
45  virtual void marshal(DataStream& dataStream) const;
46  virtual void unmarshal(DataStream& dataStream);
47 
48  unsigned char getEmitterSystemDataLength() const;
49  void setEmitterSystemDataLength(unsigned char pX);
50 
51  unsigned char getNumberOfBeams() const;
52 
53  unsigned short getPad2() const;
54  void setPad2(unsigned short pX);
55 
56  AcousticEmitterSystem& getAcousticEmitterSystem();
57  const AcousticEmitterSystem& getAcousticEmitterSystem() const;
58  void setAcousticEmitterSystem(const AcousticEmitterSystem &pX);
59 
60  Vector3Float& getEmitterLocation();
61  const Vector3Float& getEmitterLocation() const;
62  void setEmitterLocation(const Vector3Float &pX);
63 
64  std::vector<AcousticBeamData>& getBeamRecords();
65  const std::vector<AcousticBeamData>& getBeamRecords() const;
66  void setBeamRecords(const std::vector<AcousticBeamData>& pX);
67 
68 
69 virtual int getMarshalledSize() const;
70 
71  bool operator ==(const AcousticEmitterSystemData& rhs) const;
72 };
73 }
74 
75 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
76 // Redistribution and use in source and binary forms, with or without
77 // modification, are permitted provided that the following conditions
78 // are met:
79 //
80 // * Redistributions of source code must retain the above copyright
81 // notice, this list of conditions and the following disclaimer.
82 // * Redistributions in binary form must reproduce the above copyright
83 // notice, this list of conditions and the following disclaimer
84 // in the documentation and/or other materials provided with the
85 // distribution.
86 // * Neither the names of the Naval Postgraduate School (NPS)
87 // Modeling Virtual Environments and Simulation (MOVES) Institute
88 // (http://www.nps.edu and http://www.MovesInstitute.org)
89 // nor the names of its contributors may be used to endorse or
90 // promote products derived from this software without specific
91 // prior written permission.
92 //
93 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
94 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
95 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
96 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
97 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
98 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
99 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
100 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
101 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
102 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
103 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
104 // POSSIBILITY OF SUCH DAMAGE.
unsigned char _emitterSystemDataLength
Length of emitter system data.
Definition: AcousticEmitterSystemData.h:23
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
Vector3Float _emitterLocation
Represents the location wrt the entity.
Definition: AcousticEmitterSystemData.h:35
a class to support managing a network buffer.
Definition: DataStream.h:28
AcousticEmitterSystem _acousticEmitterSystem
This field shall specify the system for a particular UA emitter.
Definition: AcousticEmitterSystemData.h:32
Definition: AcousticEmitterSystemData.h:19
unsigned short _pad2
padding
Definition: AcousticEmitterSystemData.h:29
Definition: Vector3Float.h:15
unsigned char _numberOfBeams
Number of beams.
Definition: AcousticEmitterSystemData.h:26
Definition: AcousticEmitterSystem.h:15
std::vector< AcousticBeamData > _beamRecords
For each beam in numberOfBeams, an emitter system.
Definition: AcousticEmitterSystemData.h:38