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