open-dis-cpp
SeparationVP.h
1 #pragma once
2 
3 #include <dis7/EntityID.h>
4 #include <dis7/utils/DataStream.h>
5 #include <dis7/opendis7_export.h>
6 
7 
8 namespace DIS
9 {
10 // Physical separation of an entity from another entity. Section 6.2.93.6
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS7_EXPORT SeparationVP
17 {
18 protected:
20  unsigned char _recordType;
21 
23  unsigned char _reasonForSeparation;
24 
26  unsigned char _preEntityIndicator;
27 
29  unsigned char _padding1;
30 
33 
35  unsigned short _padding2;
36 
38  unsigned int _stationLocation;
39 
40 
41  public:
42  SeparationVP();
43  virtual ~SeparationVP();
44 
45  virtual void marshal(DataStream& dataStream) const;
46  virtual void unmarshal(DataStream& dataStream);
47 
48  unsigned char getRecordType() const;
49  void setRecordType(unsigned char pX);
50 
51  unsigned char getReasonForSeparation() const;
52  void setReasonForSeparation(unsigned char pX);
53 
54  unsigned char getPreEntityIndicator() const;
55  void setPreEntityIndicator(unsigned char pX);
56 
57  unsigned char getPadding1() const;
58  void setPadding1(unsigned char pX);
59 
60  EntityID& getParentEntityID();
61  const EntityID& getParentEntityID() const;
62  void setParentEntityID(const EntityID &pX);
63 
64  unsigned short getPadding2() const;
65  void setPadding2(unsigned short pX);
66 
67  unsigned int getStationLocation() const;
68  void setStationLocation(unsigned int pX);
69 
70 
71 virtual int getMarshalledSize() const;
72 
73  bool operator ==(const SeparationVP& rhs) const;
74 };
75 }
76 
77 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
78 // Redistribution and use in source and binary forms, with or without
79 // modification, are permitted provided that the following conditions
80 // are met:
81 //
82 // * Redistributions of source code must retain the above copyright
83 // notice, this list of conditions and the following disclaimer.
84 // * Redistributions in binary form must reproduce the above copyright
85 // notice, this list of conditions and the following disclaimer
86 // in the documentation and/or other materials provided with the
87 // distribution.
88 // * Neither the names of the Naval Postgraduate School (NPS)
89 // Modeling Virtual Environments and Simulation (MOVES) Institute
90 // (http://www.nps.edu and http://www.MovesInstitute.org)
91 // nor the names of its contributors may be used to endorse or
92 // promote products derived from this software without specific
93 // prior written permission.
94 //
95 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
96 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
97 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
98 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
99 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
100 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
101 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
102 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
103 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
104 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
105 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
106 // POSSIBILITY OF SUCH DAMAGE.
unsigned char _padding1
padding
Definition: SeparationVP.h:29
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
EntityID _parentEntityID
ID of parent.
Definition: SeparationVP.h:32
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned char _recordType
the identification of the Variable Parameter record.
Definition: SeparationVP.h:20
Definition: EntityID.h:15
Definition: SeparationVP.h:16
unsigned int _stationLocation
Station separated from.
Definition: SeparationVP.h:38
unsigned short _padding2
padding
Definition: SeparationVP.h:35
unsigned char _reasonForSeparation
Reason for separation.
Definition: SeparationVP.h:23
unsigned char _preEntityIndicator
Whether the entity existed prior to separation EBV.
Definition: SeparationVP.h:26