open-dis-cpp
DesignatorPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EntityID.h>
5 #include <dis6/Vector3Float.h>
6 #include <dis6/Vector3Double.h>
7 #include <dis6/Vector3Float.h>
8 #include <dis6/DistributedEmissionsFamilyPdu.h>
9 #include <dis6/utils/DataStream.h>
10 #include <dis6/opendis6_export.h>
11 
12 
13 namespace DIS
14 {
15 // Section 5.3.7.2. Handles designating operations. COMPLETE
16 
17 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
18 //
19 // @author DMcG, jkg
20 
21 class OPENDIS6_EXPORT DesignatorPdu : public DistributedEmissionsFamilyPdu
22 {
23 protected:
26 
28  unsigned short _codeName;
29 
32 
34  unsigned short _designatorCode;
35 
38 
41 
44 
47 
50 
52  unsigned short _padding1;
53 
55  char _padding2;
56 
59 
60 
61  public:
62  DesignatorPdu();
63  virtual ~DesignatorPdu();
64 
65  virtual void marshal(DataStream& dataStream) const;
66  virtual void unmarshal(DataStream& dataStream);
67 
68  EntityID& getDesignatingEntityID();
69  const EntityID& getDesignatingEntityID() const;
70  void setDesignatingEntityID(const EntityID &pX);
71 
72  unsigned short getCodeName() const;
73  void setCodeName(unsigned short pX);
74 
75  EntityID& getDesignatedEntityID();
76  const EntityID& getDesignatedEntityID() const;
77  void setDesignatedEntityID(const EntityID &pX);
78 
79  unsigned short getDesignatorCode() const;
80  void setDesignatorCode(unsigned short pX);
81 
82  float getDesignatorPower() const;
83  void setDesignatorPower(float pX);
84 
85  float getDesignatorWavelength() const;
86  void setDesignatorWavelength(float pX);
87 
88  Vector3Float& getDesignatorSpotWrtDesignated();
89  const Vector3Float& getDesignatorSpotWrtDesignated() const;
90  void setDesignatorSpotWrtDesignated(const Vector3Float &pX);
91 
92  Vector3Double& getDesignatorSpotLocation();
93  const Vector3Double& getDesignatorSpotLocation() const;
94  void setDesignatorSpotLocation(const Vector3Double &pX);
95 
96  char getDeadReckoningAlgorithm() const;
97  void setDeadReckoningAlgorithm(char pX);
98 
99  unsigned short getPadding1() const;
100  void setPadding1(unsigned short pX);
101 
102  char getPadding2() const;
103  void setPadding2(char pX);
104 
105  Vector3Float& getEntityLinearAcceleration();
106  const Vector3Float& getEntityLinearAcceleration() const;
107  void setEntityLinearAcceleration(const Vector3Float &pX);
108 
109 
110 virtual int getMarshalledSize() const;
111 
112  bool operator ==(const DesignatorPdu& rhs) const;
113 };
114 }
115 
116 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
117 // Redistribution and use in source and binary forms, with or without
118 // modification, are permitted provided that the following conditions
119 // are met:
120 //
121 // * Redistributions of source code must retain the above copyright
122 // notice, this list of conditions and the following disclaimer.
123 // * Redistributions in binary form must reproduce the above copyright
124 // notice, this list of conditions and the following disclaimer
125 // in the documentation and/or other materials provided with the
126 // distribution.
127 // * Neither the names of the Naval Postgraduate School (NPS)
128 // Modeling Virtual Environments and Simulation (MOVES) Institute
129 // (http://www.nps.edu and http://www.MovesInstitute.org)
130 // nor the names of its contributors may be used to endorse or
131 // promote products derived from this software without specific
132 // prior written permission.
133 //
134 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
137 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
138 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
139 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
140 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
141 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
142 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
143 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
144 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
145 // POSSIBILITY OF SUCH DAMAGE.
unsigned short _codeName
This field shall specify a unique emitter database number assigned to differentiate between otherwise...
Definition: DesignatorPdu.h:28
Vector3Float _designatorSpotWrtDesignated
designtor spot wrt the designated entity
Definition: DesignatorPdu.h:43
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
Vector3Double _designatorSpotLocation
designtor spot wrt the designated entity
Definition: DesignatorPdu.h:46
Vector3Float _entityLinearAcceleration
linear accelleration of entity
Definition: DesignatorPdu.h:58
unsigned short _padding1
padding
Definition: DesignatorPdu.h:52
EntityID _designatedEntityID
ID of the entity being designated.
Definition: DesignatorPdu.h:31
float _designatorWavelength
This field shall identify the designator wavelength in units of microns.
Definition: DesignatorPdu.h:40
Definition: Vector3Float.h:15
Definition: EntityID.h:15
Definition: Vector3Double.h:15
char _deadReckoningAlgorithm
Dead reckoning algorithm.
Definition: DesignatorPdu.h:49
unsigned short _designatorCode
This field shall identify the designator code being used by the designating entity.
Definition: DesignatorPdu.h:34
float _designatorPower
This field shall identify the designator output power in watts.
Definition: DesignatorPdu.h:37
Definition: DistributedEmissionsFamilyPdu.h:16
Definition: DesignatorPdu.h:21
char _padding2
padding
Definition: DesignatorPdu.h:55
EntityID _designatingEntityID
ID of the entity designating.
Definition: DesignatorPdu.h:25