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