open-dis-cpp
MinefieldResponseNackPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EntityID.h>
5 #include <dis6/EightByteChunk.h>
6 #include <vector>
7 #include <dis6/MinefieldFamilyPdu.h>
8 #include <dis6/utils/DataStream.h>
9 #include <dis6/opendis6_export.h>
10 
11 
12 namespace DIS
13 {
14 // Section 5.3.10.4 proivde the means to request a retransmit of a minefield data pdu. COMPLETE
15 
16 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
17 //
18 // @author DMcG, jkg
19 
20 class OPENDIS6_EXPORT MinefieldResponseNackPdu : public MinefieldFamilyPdu
21 {
22 protected:
25 
28 
30  unsigned char _requestID;
31 
33  unsigned char _numberOfMissingPdus;
34 
36  std::vector<EightByteChunk> _missingPduSequenceNumbers;
37 
38 
39  public:
41  virtual ~MinefieldResponseNackPdu();
42 
43  virtual void marshal(DataStream& dataStream) const;
44  virtual void unmarshal(DataStream& dataStream);
45 
46  EntityID& getMinefieldID();
47  const EntityID& getMinefieldID() const;
48  void setMinefieldID(const EntityID &pX);
49 
50  EntityID& getRequestingEntityID();
51  const EntityID& getRequestingEntityID() const;
52  void setRequestingEntityID(const EntityID &pX);
53 
54  unsigned char getRequestID() const;
55  void setRequestID(unsigned char pX);
56 
57  unsigned char getNumberOfMissingPdus() const;
58 
59  std::vector<EightByteChunk>& getMissingPduSequenceNumbers();
60  const std::vector<EightByteChunk>& getMissingPduSequenceNumbers() const;
61  void setMissingPduSequenceNumbers(const std::vector<EightByteChunk>& pX);
62 
63 
64 virtual int getMarshalledSize() const;
65 
66  bool operator ==(const MinefieldResponseNackPdu& rhs) const;
67 };
68 }
69 
70 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
71 // Redistribution and use in source and binary forms, with or without
72 // modification, are permitted provided that the following conditions
73 // are met:
74 //
75 // * Redistributions of source code must retain the above copyright
76 // notice, this list of conditions and the following disclaimer.
77 // * Redistributions in binary form must reproduce the above copyright
78 // notice, this list of conditions and the following disclaimer
79 // in the documentation and/or other materials provided with the
80 // distribution.
81 // * Neither the names of the Naval Postgraduate School (NPS)
82 // Modeling Virtual Environments and Simulation (MOVES) Institute
83 // (http://www.nps.edu and http://www.MovesInstitute.org)
84 // nor the names of its contributors may be used to endorse or
85 // promote products derived from this software without specific
86 // prior written permission.
87 //
88 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
89 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
90 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
91 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
92 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
93 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
94 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
95 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
96 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
97 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
98 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
99 // POSSIBILITY OF SUCH DAMAGE.
unsigned char _numberOfMissingPdus
how many pdus were missing
Definition: MinefieldResponseNackPdu.h:33
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _requestID
request ID
Definition: MinefieldResponseNackPdu.h:30
Definition: MinefieldResponseNackPdu.h:20
a class to support managing a network buffer.
Definition: DataStream.h:28
std::vector< EightByteChunk > _missingPduSequenceNumbers
PDU sequence numbers that were missing.
Definition: MinefieldResponseNackPdu.h:36
EntityID _minefieldID
Minefield ID.
Definition: MinefieldResponseNackPdu.h:24
EntityID _requestingEntityID
entity ID making the request
Definition: MinefieldResponseNackPdu.h:27
Definition: EntityID.h:15
Definition: MinefieldFamilyPdu.h:16