open-dis-cpp
AttachedParts.h
1 #pragma once
2 
3 #include <dis7/utils/DataStream.h>
4 #include <dis7/opendis7_export.h>
5 
6 
7 namespace DIS
8 {
9 // Removable parts that may be attached to an entity. Section 6.2.94.3
10 
11 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
12 //
13 // @author DMcG, jkg
14 
15 class OPENDIS7_EXPORT AttachedParts
16 {
17 protected:
19  unsigned char _recordType;
20 
22  unsigned char _detachedIndicator;
23 
25  unsigned short _partAttachedTo;
26 
28  unsigned int _parameterType;
29 
31  unsigned long long _attachedPartType;
32 
33 
34  public:
35  AttachedParts();
36  virtual ~AttachedParts();
37 
38  virtual void marshal(DataStream& dataStream) const;
39  virtual void unmarshal(DataStream& dataStream);
40 
41  unsigned char getRecordType() const;
42  void setRecordType(unsigned char pX);
43 
44  unsigned char getDetachedIndicator() const;
45  void setDetachedIndicator(unsigned char pX);
46 
47  unsigned short getPartAttachedTo() const;
48  void setPartAttachedTo(unsigned short pX);
49 
50  unsigned int getParameterType() const;
51  void setParameterType(unsigned int pX);
52 
53  unsigned long long getAttachedPartType() const;
54  void setAttachedPartType(unsigned long long pX);
55 
56 
57 virtual int getMarshalledSize() const;
58 
59  bool operator ==(const AttachedParts& rhs) const;
60 };
61 }
62 
63 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
64 // Redistribution and use in source and binary forms, with or without
65 // modification, are permitted provided that the following conditions
66 // are met:
67 //
68 // * Redistributions of source code must retain the above copyright
69 // notice, this list of conditions and the following disclaimer.
70 // * Redistributions in binary form must reproduce the above copyright
71 // notice, this list of conditions and the following disclaimer
72 // in the documentation and/or other materials provided with the
73 // distribution.
74 // * Neither the names of the Naval Postgraduate School (NPS)
75 // Modeling Virtual Environments and Simulation (MOVES) Institute
76 // (http://www.nps.edu and http://www.MovesInstitute.org)
77 // nor the names of its contributors may be used to endorse or
78 // promote products derived from this software without specific
79 // prior written permission.
80 //
81 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
82 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
83 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
84 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
85 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
86 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
87 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
88 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
89 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
90 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
91 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
92 // POSSIBILITY OF SUCH DAMAGE.
unsigned char _recordType
the identification of the Variable Parameter record.
Definition: AttachedParts.h:19
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned short _partAttachedTo
the identification of the articulated part to which this articulation parameter is attached...
Definition: AttachedParts.h:25
unsigned int _parameterType
The location or station to which the part is attached.
Definition: AttachedParts.h:28
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned long long _attachedPartType
The definition of the 64 bits shall be determined based on the type of parameter specified in the Par...
Definition: AttachedParts.h:31
Definition: AttachedParts.h:15
unsigned char _detachedIndicator
0 = attached, 1 = detached.
Definition: AttachedParts.h:22