open-dis-cpp
IOEffect.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 // Effect of IO on an entity. Section 6.2.49.3
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS7_EXPORT IOEffect
17 {
18 protected:
19  unsigned int _recordType;
20 
21  unsigned short _recordLength;
22 
23  unsigned char _ioStatus;
24 
25  unsigned char _ioLinkType;
26 
27  EntityID _ioEffect;
28 
29  unsigned char _ioEffectDutyCycle;
30 
31  unsigned short _ioEffectDuration;
32 
33  unsigned short _ioProcess;
34 
35  unsigned short _padding;
36 
37 
38  public:
39  IOEffect();
40  virtual ~IOEffect();
41 
42  virtual void marshal(DataStream& dataStream) const;
43  virtual void unmarshal(DataStream& dataStream);
44 
45  unsigned int getRecordType() const;
46  void setRecordType(unsigned int pX);
47 
48  unsigned short getRecordLength() const;
49  void setRecordLength(unsigned short pX);
50 
51  unsigned char getIoStatus() const;
52  void setIoStatus(unsigned char pX);
53 
54  unsigned char getIoLinkType() const;
55  void setIoLinkType(unsigned char pX);
56 
57  EntityID& getIoEffect();
58  const EntityID& getIoEffect() const;
59  void setIoEffect(const EntityID &pX);
60 
61  unsigned char getIoEffectDutyCycle() const;
62  void setIoEffectDutyCycle(unsigned char pX);
63 
64  unsigned short getIoEffectDuration() const;
65  void setIoEffectDuration(unsigned short pX);
66 
67  unsigned short getIoProcess() const;
68  void setIoProcess(unsigned short pX);
69 
70  unsigned short getPadding() const;
71  void setPadding(unsigned short pX);
72 
73 
74 virtual int getMarshalledSize() const;
75 
76  bool operator ==(const IOEffect& rhs) const;
77 };
78 }
79 
80 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
81 // Redistribution and use in source and binary forms, with or without
82 // modification, are permitted provided that the following conditions
83 // are met:
84 //
85 // * Redistributions of source code must retain the above copyright
86 // notice, this list of conditions and the following disclaimer.
87 // * Redistributions in binary form must reproduce the above copyright
88 // notice, this list of conditions and the following disclaimer
89 // in the documentation and/or other materials provided with the
90 // distribution.
91 // * Neither the names of the Naval Postgraduate School (NPS)
92 // Modeling Virtual Environments and Simulation (MOVES) Institute
93 // (http://www.nps.edu and http://www.MovesInstitute.org)
94 // nor the names of its contributors may be used to endorse or
95 // promote products derived from this software without specific
96 // prior written permission.
97 //
98 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
99 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
100 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
101 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
102 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
103 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
104 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
105 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
106 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
107 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
108 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
109 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: EntityID.h:15
Definition: IOEffect.h:16