open-dis-cpp
TransmitterPdu.h
1 #pragma once
2 
3 #include <dis6/RadioEntityType.h>
4 #include <dis6/Vector3Double.h>
5 #include <dis6/Vector3Float.h>
6 #include <dis6/ModulationType.h>
7 #include <dis6/Vector3Float.h>
8 #include <dis6/Vector3Float.h>
9 #include <vector>
10 #include <dis6/RadioCommunicationsFamilyPdu.h>
11 #include <dis6/utils/DataStream.h>
12 #include <dis6/opendis6_export.h>
13 
14 
15 namespace DIS
16 {
17 // Section 5.3.8.1. Detailed information about a radio transmitter. This PDU requires manually written code to complete, since the modulation parameters are of variable length. UNFINISHED
18 
19 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
20 //
21 // @author DMcG, jkg
22 
23 class OPENDIS6_EXPORT TransmitterPdu : public RadioCommunicationsFamilyPdu
24 {
25 protected:
28 
30  unsigned char _transmitState;
31 
33  unsigned char _inputSource;
34 
36  unsigned short _padding1;
37 
40 
43 
45  unsigned short _antennaPatternType;
46 
48  unsigned short _antennaPatternCount;
49 
51  unsigned long long _frequency;
52 
55 
57  float _power;
58 
61 
63  unsigned short _cryptoSystem;
64 
66  unsigned short _cryptoKeyId;
67 
69  unsigned char _modulationParameterCount;
70 
72  unsigned short _padding2;
73 
75  unsigned char _padding3;
76 
78  std::vector<Vector3Float> _modulationParametersList;
79 
81  std::vector<Vector3Float> _antennaPatternList;
82 
83 
84  public:
86  virtual ~TransmitterPdu();
87 
88  virtual void marshal(DataStream& dataStream) const;
89  virtual void unmarshal(DataStream& dataStream);
90 
91  RadioEntityType& getRadioEntityType();
92  const RadioEntityType& getRadioEntityType() const;
93  void setRadioEntityType(const RadioEntityType &pX);
94 
95  unsigned char getTransmitState() const;
96  void setTransmitState(unsigned char pX);
97 
98  unsigned char getInputSource() const;
99  void setInputSource(unsigned char pX);
100 
101  unsigned short getPadding1() const;
102  void setPadding1(unsigned short pX);
103 
104  Vector3Double& getAntennaLocation();
105  const Vector3Double& getAntennaLocation() const;
106  void setAntennaLocation(const Vector3Double &pX);
107 
108  Vector3Float& getRelativeAntennaLocation();
109  const Vector3Float& getRelativeAntennaLocation() const;
110  void setRelativeAntennaLocation(const Vector3Float &pX);
111 
112  unsigned short getAntennaPatternType() const;
113  void setAntennaPatternType(unsigned short pX);
114 
115  unsigned short getAntennaPatternCount() const;
116 
117  unsigned long long getFrequency() const;
118  void setFrequency(unsigned long long pX);
119 
120  float getTransmitFrequencyBandwidth() const;
121  void setTransmitFrequencyBandwidth(float pX);
122 
123  float getPower() const;
124  void setPower(float pX);
125 
126  ModulationType& getModulationType();
127  const ModulationType& getModulationType() const;
128  void setModulationType(const ModulationType &pX);
129 
130  unsigned short getCryptoSystem() const;
131  void setCryptoSystem(unsigned short pX);
132 
133  unsigned short getCryptoKeyId() const;
134  void setCryptoKeyId(unsigned short pX);
135 
136  unsigned char getModulationParameterCount() const;
137 
138  unsigned short getPadding2() const;
139  void setPadding2(unsigned short pX);
140 
141  unsigned char getPadding3() const;
142  void setPadding3(unsigned char pX);
143 
144  std::vector<Vector3Float>& getModulationParametersList();
145  const std::vector<Vector3Float>& getModulationParametersList() const;
146  void setModulationParametersList(const std::vector<Vector3Float>& pX);
147 
148  std::vector<Vector3Float>& getAntennaPatternList();
149  const std::vector<Vector3Float>& getAntennaPatternList() const;
150  void setAntennaPatternList(const std::vector<Vector3Float>& pX);
151 
152 
153 virtual int getMarshalledSize() const;
154 
155  bool operator ==(const TransmitterPdu& rhs) const;
156 };
157 }
158 
159 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
160 // Redistribution and use in source and binary forms, with or without
161 // modification, are permitted provided that the following conditions
162 // are met:
163 //
164 // * Redistributions of source code must retain the above copyright
165 // notice, this list of conditions and the following disclaimer.
166 // * Redistributions in binary form must reproduce the above copyright
167 // notice, this list of conditions and the following disclaimer
168 // in the documentation and/or other materials provided with the
169 // distribution.
170 // * Neither the names of the Naval Postgraduate School (NPS)
171 // Modeling Virtual Environments and Simulation (MOVES) Institute
172 // (http://www.nps.edu and http://www.MovesInstitute.org)
173 // nor the names of its contributors may be used to endorse or
174 // promote products derived from this software without specific
175 // prior written permission.
176 //
177 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
178 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
179 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
180 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
181 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
182 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
183 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
184 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
185 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
186 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
187 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
188 // POSSIBILITY OF SUCH DAMAGE.
std::vector< Vector3Float > _modulationParametersList
variable length list of modulation parameters
Definition: TransmitterPdu.h:78
Definition: RadioEntityType.h:15
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
float _power
transmission power
Definition: TransmitterPdu.h:57
std::vector< Vector3Float > _antennaPatternList
variable length list of antenna pattern records
Definition: TransmitterPdu.h:81
Definition: RadioCommunicationsFamilyPdu.h:17
unsigned char _modulationParameterCount
how many modulation parameters we have
Definition: TransmitterPdu.h:69
ModulationType _modulationType
modulation
Definition: TransmitterPdu.h:60
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned long long _frequency
frequency
Definition: TransmitterPdu.h:51
Vector3Double _antennaLocation
Location of antenna.
Definition: TransmitterPdu.h:39
Vector3Float _relativeAntennaLocation
relative location of antenna
Definition: TransmitterPdu.h:42
RadioEntityType _radioEntityType
linear accelleration of entity
Definition: TransmitterPdu.h:27
float _transmitFrequencyBandwidth
transmit frequency Bandwidth
Definition: TransmitterPdu.h:54
unsigned short _padding2
padding2
Definition: TransmitterPdu.h:72
unsigned char _transmitState
transmit state
Definition: TransmitterPdu.h:30
Definition: Vector3Float.h:15
Definition: Vector3Double.h:15
Definition: TransmitterPdu.h:23
unsigned short _cryptoKeyId
crypto system key identifer
Definition: TransmitterPdu.h:66
unsigned short _padding1
padding
Definition: TransmitterPdu.h:36
unsigned short _antennaPatternType
antenna pattern type
Definition: TransmitterPdu.h:45
unsigned short _cryptoSystem
crypto system enumeration
Definition: TransmitterPdu.h:63
unsigned char _inputSource
input source
Definition: TransmitterPdu.h:33
unsigned short _antennaPatternCount
atenna pattern length
Definition: TransmitterPdu.h:48
unsigned char _padding3
padding3
Definition: TransmitterPdu.h:75
Definition: ModulationType.h:15