open-dis-cpp
EntityAssociation.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 // Association or disassociation of two entities. Section 6.2.93.4
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS7_EXPORT EntityAssociation
17 {
18 protected:
20  unsigned char _recordType;
21 
23  unsigned char _changeIndicator;
24 
26  unsigned char _associationStatus;
27 
29  unsigned char _associationType;
30 
33 
35  unsigned short _owsSttionLocation;
36 
38  unsigned short _physicalConnectionType;
39 
41  unsigned char _groupMemberType;
42 
44  unsigned short _groupNumber;
45 
46 
47  public:
49  virtual ~EntityAssociation();
50 
51  virtual void marshal(DataStream& dataStream) const;
52  virtual void unmarshal(DataStream& dataStream);
53 
54  unsigned char getRecordType() const;
55  void setRecordType(unsigned char pX);
56 
57  unsigned char getChangeIndicator() const;
58  void setChangeIndicator(unsigned char pX);
59 
60  unsigned char getAssociationStatus() const;
61  void setAssociationStatus(unsigned char pX);
62 
63  unsigned char getAssociationType() const;
64  void setAssociationType(unsigned char pX);
65 
66  EntityID& getEntityID();
67  const EntityID& getEntityID() const;
68  void setEntityID(const EntityID &pX);
69 
70  unsigned short getOwsSttionLocation() const;
71  void setOwsSttionLocation(unsigned short pX);
72 
73  unsigned short getPhysicalConnectionType() const;
74  void setPhysicalConnectionType(unsigned short pX);
75 
76  unsigned char getGroupMemberType() const;
77  void setGroupMemberType(unsigned char pX);
78 
79  unsigned short getGroupNumber() const;
80  void setGroupNumber(unsigned short pX);
81 
82 
83 virtual int getMarshalledSize() const;
84 
85  bool operator ==(const EntityAssociation& rhs) const;
86 };
87 }
88 
89 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
90 // Redistribution and use in source and binary forms, with or without
91 // modification, are permitted provided that the following conditions
92 // are met:
93 //
94 // * Redistributions of source code must retain the above copyright
95 // notice, this list of conditions and the following disclaimer.
96 // * Redistributions in binary form must reproduce the above copyright
97 // notice, this list of conditions and the following disclaimer
98 // in the documentation and/or other materials provided with the
99 // distribution.
100 // * Neither the names of the Naval Postgraduate School (NPS)
101 // Modeling Virtual Environments and Simulation (MOVES) Institute
102 // (http://www.nps.edu and http://www.MovesInstitute.org)
103 // nor the names of its contributors may be used to endorse or
104 // promote products derived from this software without specific
105 // prior written permission.
106 //
107 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
108 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
109 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
110 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
111 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
112 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
113 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
114 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
115 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
116 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
117 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
118 // POSSIBILITY OF SUCH DAMAGE.
EntityID _entityID
Object ID of entity associated with this entity.
Definition: EntityAssociation.h:32
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _changeIndicator
Indicates if this VP has changed since last issuance.
Definition: EntityAssociation.h:23
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned char _groupMemberType
Type of member the entity is within th egroup.
Definition: EntityAssociation.h:41
unsigned char _associationStatus
Indicates association status between two entities; 8 bit enum.
Definition: EntityAssociation.h:26
unsigned short _physicalConnectionType
Type of physical connection.
Definition: EntityAssociation.h:38
unsigned short _groupNumber
Group if any to which the entity belongs.
Definition: EntityAssociation.h:44
Definition: EntityID.h:15
unsigned short _owsSttionLocation
Station location on one&#39;s own entity.
Definition: EntityAssociation.h:35
unsigned char _recordType
the identification of the Variable Parameter record.
Definition: EntityAssociation.h:20
Definition: EntityAssociation.h:16
unsigned char _associationType
Type of association; 8 bit enum.
Definition: EntityAssociation.h:29