open-dis-cpp
BeamAntennaPattern.h
1 #pragma once
2 
3 #include <dis6/Orientation.h>
4 #include <dis6/utils/DataStream.h>
5 #include <dis6/opendis6_export.h>
6 
7 
8 namespace DIS
9 {
10 // Section 5.2.4.2. Used when the antenna pattern type field has a value of 1. Specifies the direction, patter, and polarization of radiation from an antenna.
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS6_EXPORT BeamAntennaPattern
17 {
18 protected:
21 
22  float _azimuthBeamwidth;
23 
24  float _referenceSystem;
25 
26  short _padding1;
27 
28  char _padding2;
29 
31  float _ez;
32 
34  float _ex;
35 
37  float _phase;
38 
39 
40  public:
42  virtual ~BeamAntennaPattern();
43 
44  virtual void marshal(DataStream& dataStream) const;
45  virtual void unmarshal(DataStream& dataStream);
46 
47  Orientation& getBeamDirection();
48  const Orientation& getBeamDirection() const;
49  void setBeamDirection(const Orientation &pX);
50 
51  float getAzimuthBeamwidth() const;
52  void setAzimuthBeamwidth(float pX);
53 
54  float getReferenceSystem() const;
55  void setReferenceSystem(float pX);
56 
57  short getPadding1() const;
58  void setPadding1(short pX);
59 
60  char getPadding2() const;
61  void setPadding2(char pX);
62 
63  float getEz() const;
64  void setEz(float pX);
65 
66  float getEx() const;
67  void setEx(float pX);
68 
69  float getPhase() const;
70  void setPhase(float pX);
71 
72 
73 virtual int getMarshalledSize() const;
74 
75  bool operator ==(const BeamAntennaPattern& rhs) const;
76 };
77 }
78 
79 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
80 // Redistribution and use in source and binary forms, with or without
81 // modification, are permitted provided that the following conditions
82 // are met:
83 //
84 // * Redistributions of source code must retain the above copyright
85 // notice, this list of conditions and the following disclaimer.
86 // * Redistributions in binary form must reproduce the above copyright
87 // notice, this list of conditions and the following disclaimer
88 // in the documentation and/or other materials provided with the
89 // distribution.
90 // * Neither the names of the Naval Postgraduate School (NPS)
91 // Modeling Virtual Environments and Simulation (MOVES) Institute
92 // (http://www.nps.edu and http://www.MovesInstitute.org)
93 // nor the names of its contributors may be used to endorse or
94 // promote products derived from this software without specific
95 // prior written permission.
96 //
97 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
98 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
99 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
100 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
101 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
102 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
103 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
104 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
105 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
106 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
107 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
108 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
float _ez
Magnigute of the z-component in beam coordinates at some arbitrary single point in the mainbeam and i...
Definition: BeamAntennaPattern.h:31
Definition: Orientation.h:15
float _phase
THe phase angle between Ez and Ex in radians.
Definition: BeamAntennaPattern.h:37
Definition: BeamAntennaPattern.h:16
float _ex
Magnigute of the x-component in beam coordinates at some arbitrary single point in the mainbeam and i...
Definition: BeamAntennaPattern.h:34
Orientation _beamDirection
The rotation that transformst he reference coordinate sytem into the beam coordinate system...
Definition: BeamAntennaPattern.h:20