open-dis-cpp
AcknowledgePdu.h
1 #pragma once
2 
3 #include <dis6/SimulationManagementFamilyPdu.h>
4 #include <dis6/utils/DataStream.h>
5 #include <dis6/opendis6_export.h>
6 
7 
8 namespace DIS
9 {
10 // Section 5.3.6.5. Acknowledge the receiptof a start/resume, stop/freeze, or RemoveEntityPDU. COMPLETE
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS6_EXPORT AcknowledgePdu : public SimulationManagementFamilyPdu
17 {
18 protected:
20  unsigned short _acknowledgeFlag;
21 
23  unsigned short _responseFlag;
24 
26  unsigned int _requestID;
27 
28 
29  public:
31  virtual ~AcknowledgePdu();
32 
33  virtual void marshal(DataStream& dataStream) const;
34  virtual void unmarshal(DataStream& dataStream);
35 
36  unsigned short getAcknowledgeFlag() const;
37  void setAcknowledgeFlag(unsigned short pX);
38 
39  unsigned short getResponseFlag() const;
40  void setResponseFlag(unsigned short pX);
41 
42  unsigned int getRequestID() const;
43  void setRequestID(unsigned int pX);
44 
45 
46 virtual int getMarshalledSize() const;
47 
48  bool operator ==(const AcknowledgePdu& rhs) const;
49 };
50 }
51 
52 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
53 // Redistribution and use in source and binary forms, with or without
54 // modification, are permitted provided that the following conditions
55 // are met:
56 //
57 // * Redistributions of source code must retain the above copyright
58 // notice, this list of conditions and the following disclaimer.
59 // * Redistributions in binary form must reproduce the above copyright
60 // notice, this list of conditions and the following disclaimer
61 // in the documentation and/or other materials provided with the
62 // distribution.
63 // * Neither the names of the Naval Postgraduate School (NPS)
64 // Modeling Virtual Environments and Simulation (MOVES) Institute
65 // (http://www.nps.edu and http://www.MovesInstitute.org)
66 // nor the names of its contributors may be used to endorse or
67 // promote products derived from this software without specific
68 // prior written permission.
69 //
70 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
71 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
72 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
73 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
74 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
75 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
76 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
77 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
78 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
79 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
80 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
81 // POSSIBILITY OF SUCH DAMAGE.
unsigned short _responseFlag
Whether or not the receiving entity was able to comply with the request.
Definition: AcknowledgePdu.h:23
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: SimulationManagementFamilyPdu.h:18
Definition: AcknowledgePdu.h:16
unsigned int _requestID
Request ID that is unique.
Definition: AcknowledgePdu.h:26
unsigned short _acknowledgeFlag
type of message being acknowledged
Definition: AcknowledgePdu.h:20