open-dis-cpp
SetRecordReliablePdu.h
1 #pragma once
2 
3 #include <dis6/RecordSet.h>
4 #include <vector>
5 #include <dis6/SimulationManagementWithReliabilityFamilyPdu.h>
6 #include <dis6/utils/DataStream.h>
7 #include <dis6/opendis6_export.h>
8 
9 
10 namespace DIS
11 {
12 // Section 5.3.12.14: Initializing or changing internal parameter info. Needs manual intervention to fix padding in recrod set PDUs. UNFINISHED
13 
14 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
15 //
16 // @author DMcG, jkg
17 
19 {
20 protected:
22  unsigned int _requestID;
23 
26 
28  unsigned short _pad1;
29 
31  unsigned char _pad2;
32 
34  unsigned int _numberOfRecordSets;
35 
37  std::vector<RecordSet> _recordSets;
38 
39 
40  public:
42  virtual ~SetRecordReliablePdu();
43 
44  virtual void marshal(DataStream& dataStream) const;
45  virtual void unmarshal(DataStream& dataStream);
46 
47  unsigned int getRequestID() const;
48  void setRequestID(unsigned int pX);
49 
50  unsigned char getRequiredReliabilityService() const;
51  void setRequiredReliabilityService(unsigned char pX);
52 
53  unsigned short getPad1() const;
54  void setPad1(unsigned short pX);
55 
56  unsigned char getPad2() const;
57  void setPad2(unsigned char pX);
58 
59  unsigned int getNumberOfRecordSets() const;
60 
61  std::vector<RecordSet>& getRecordSets();
62  const std::vector<RecordSet>& getRecordSets() const;
63  void setRecordSets(const std::vector<RecordSet>& pX);
64 
65 
66 virtual int getMarshalledSize() const;
67 
68  bool operator ==(const SetRecordReliablePdu& 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: SetRecordReliablePdu.h:18
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned int _requestID
request ID
Definition: SetRecordReliablePdu.h:22
Definition: SimulationManagementWithReliabilityFamilyPdu.h:18
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned short _pad1
padding.
Definition: SetRecordReliablePdu.h:28
std::vector< RecordSet > _recordSets
record sets
Definition: SetRecordReliablePdu.h:37
unsigned char _pad2
padding
Definition: SetRecordReliablePdu.h:31
unsigned int _numberOfRecordSets
Number of record sets in list.
Definition: SetRecordReliablePdu.h:34
unsigned char _requiredReliabilityService
level of reliability service used for this transaction
Definition: SetRecordReliablePdu.h:25