open-dis-cpp
StopFreezePdu.h
1 #pragma once
2 
3 #include <dis6/ClockTime.h>
4 #include <dis6/SimulationManagementFamilyPdu.h>
5 #include <dis6/utils/DataStream.h>
6 #include <dis6/opendis6_export.h>
7 
8 
9 namespace DIS
10 {
11 // Section 5.2.3.4. Stop or freeze an exercise. COMPLETE
12 
13 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
14 //
15 // @author DMcG, jkg
16 
17 class OPENDIS6_EXPORT StopFreezePdu : public SimulationManagementFamilyPdu
18 {
19 protected:
22 
24  unsigned char _reason;
25 
27  unsigned char _frozenBehavior;
28 
30  short _padding1;
31 
33  unsigned int _requestID;
34 
35 
36  public:
37  StopFreezePdu();
38  virtual ~StopFreezePdu();
39 
40  virtual void marshal(DataStream& dataStream) const;
41  virtual void unmarshal(DataStream& dataStream);
42 
43  ClockTime& getRealWorldTime();
44  const ClockTime& getRealWorldTime() const;
45  void setRealWorldTime(const ClockTime &pX);
46 
47  unsigned char getReason() const;
48  void setReason(unsigned char pX);
49 
50  unsigned char getFrozenBehavior() const;
51  void setFrozenBehavior(unsigned char pX);
52 
53  short getPadding1() const;
54  void setPadding1(short pX);
55 
56  unsigned int getRequestID() const;
57  void setRequestID(unsigned int pX);
58 
59 
60 virtual int getMarshalledSize() const;
61 
62  bool operator ==(const StopFreezePdu& rhs) const;
63 };
64 }
65 
66 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
67 // Redistribution and use in source and binary forms, with or without
68 // modification, are permitted provided that the following conditions
69 // are met:
70 //
71 // * Redistributions of source code must retain the above copyright
72 // notice, this list of conditions and the following disclaimer.
73 // * Redistributions in binary form must reproduce the above copyright
74 // notice, this list of conditions and the following disclaimer
75 // in the documentation and/or other materials provided with the
76 // distribution.
77 // * Neither the names of the Naval Postgraduate School (NPS)
78 // Modeling Virtual Environments and Simulation (MOVES) Institute
79 // (http://www.nps.edu and http://www.MovesInstitute.org)
80 // nor the names of its contributors may be used to endorse or
81 // promote products derived from this software without specific
82 // prior written permission.
83 //
84 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
85 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
86 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
87 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
88 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
89 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
90 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
91 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
92 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
93 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
94 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
95 // POSSIBILITY OF SUCH DAMAGE.
Definition: ClockTime.h:15
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
ClockTime _realWorldTime
UTC time at which the simulation shall stop or freeze.
Definition: StopFreezePdu.h:21
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: SimulationManagementFamilyPdu.h:18
unsigned int _requestID
Request ID that is unique.
Definition: StopFreezePdu.h:33
unsigned char _frozenBehavior
Internal behavior of the simulation and its appearance while frozento the other participants.
Definition: StopFreezePdu.h:27
Definition: StopFreezePdu.h:17
unsigned char _reason
Reason the simulation was stopped or frozen.
Definition: StopFreezePdu.h:24
short _padding1
padding
Definition: StopFreezePdu.h:30