open-dis-cpp
PointObjectStatePdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EntityID.h>
5 #include <dis6/ObjectType.h>
6 #include <dis6/Vector3Double.h>
7 #include <dis6/Orientation.h>
8 #include <dis6/SimulationAddress.h>
9 #include <dis6/SimulationAddress.h>
10 #include <dis6/SyntheticEnvironmentFamilyPdu.h>
11 #include <dis6/utils/DataStream.h>
12 #include <dis6/opendis6_export.h>
13 
14 
15 namespace DIS
16 {
17 // Section 5.3.11.3: Inormation abut the addition or modification of a synthecic enviroment object that is anchored to the terrain with a single point. COMPLETE
18 
19 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
20 //
21 // @author DMcG, jkg
22 
23 class OPENDIS6_EXPORT PointObjectStatePdu : public SyntheticEnvironmentFamilyPdu
24 {
25 protected:
28 
31 
33  unsigned short _updateNumber;
34 
36  unsigned char _forceID;
37 
39  unsigned char _modifications;
40 
43 
46 
49 
52 
55 
58 
60  unsigned int _pad2;
61 
62 
63  public:
65  virtual ~PointObjectStatePdu();
66 
67  virtual void marshal(DataStream& dataStream) const;
68  virtual void unmarshal(DataStream& dataStream);
69 
70  EntityID& getObjectID();
71  const EntityID& getObjectID() const;
72  void setObjectID(const EntityID &pX);
73 
74  EntityID& getReferencedObjectID();
75  const EntityID& getReferencedObjectID() const;
76  void setReferencedObjectID(const EntityID &pX);
77 
78  unsigned short getUpdateNumber() const;
79  void setUpdateNumber(unsigned short pX);
80 
81  unsigned char getForceID() const;
82  void setForceID(unsigned char pX);
83 
84  unsigned char getModifications() const;
85  void setModifications(unsigned char pX);
86 
87  ObjectType& getObjectType();
88  const ObjectType& getObjectType() const;
89  void setObjectType(const ObjectType &pX);
90 
91  Vector3Double& getObjectLocation();
92  const Vector3Double& getObjectLocation() const;
93  void setObjectLocation(const Vector3Double &pX);
94 
95  Orientation& getObjectOrientation();
96  const Orientation& getObjectOrientation() const;
97  void setObjectOrientation(const Orientation &pX);
98 
99  double getObjectAppearance() const;
100  void setObjectAppearance(double pX);
101 
102  SimulationAddress& getRequesterID();
103  const SimulationAddress& getRequesterID() const;
104  void setRequesterID(const SimulationAddress &pX);
105 
106  SimulationAddress& getReceivingID();
107  const SimulationAddress& getReceivingID() const;
108  void setReceivingID(const SimulationAddress &pX);
109 
110  unsigned int getPad2() const;
111  void setPad2(unsigned int pX);
112 
113 
114 virtual int getMarshalledSize() const;
115 
116  bool operator ==(const PointObjectStatePdu& rhs) const;
117 };
118 }
119 
120 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
121 // Redistribution and use in source and binary forms, with or without
122 // modification, are permitted provided that the following conditions
123 // are met:
124 //
125 // * Redistributions of source code must retain the above copyright
126 // notice, this list of conditions and the following disclaimer.
127 // * Redistributions in binary form must reproduce the above copyright
128 // notice, this list of conditions and the following disclaimer
129 // in the documentation and/or other materials provided with the
130 // distribution.
131 // * Neither the names of the Naval Postgraduate School (NPS)
132 // Modeling Virtual Environments and Simulation (MOVES) Institute
133 // (http://www.nps.edu and http://www.MovesInstitute.org)
134 // nor the names of its contributors may be used to endorse or
135 // promote products derived from this software without specific
136 // prior written permission.
137 //
138 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
139 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
140 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
141 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
142 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
143 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
144 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
145 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
146 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
147 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
148 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
149 // POSSIBILITY OF SUCH DAMAGE.
Orientation _objectOrientation
Object orientation.
Definition: PointObjectStatePdu.h:48
Definition: SimulationAddress.h:15
unsigned char _forceID
force ID
Definition: PointObjectStatePdu.h:36
unsigned short _updateNumber
unique update number of each state transition of an object
Definition: PointObjectStatePdu.h:33
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
EntityID _referencedObjectID
Object with which this point object is associated.
Definition: PointObjectStatePdu.h:30
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned int _pad2
padding
Definition: PointObjectStatePdu.h:60
ObjectType _objectType
Object type.
Definition: PointObjectStatePdu.h:42
EntityID _objectID
Object in synthetic environment.
Definition: PointObjectStatePdu.h:27
SimulationAddress _receivingID
receiver ID
Definition: PointObjectStatePdu.h:57
SimulationAddress _requesterID
requesterID
Definition: PointObjectStatePdu.h:54
Definition: ObjectType.h:15
Definition: EntityID.h:15
Definition: Vector3Double.h:15
Definition: Orientation.h:15
unsigned char _modifications
modifications
Definition: PointObjectStatePdu.h:39
Definition: PointObjectStatePdu.h:23
Definition: SyntheticEnvironmentFamilyPdu.h:16
double _objectAppearance
Object apperance.
Definition: PointObjectStatePdu.h:51
Vector3Double _objectLocation
Object location.
Definition: PointObjectStatePdu.h:45