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