open-dis-cpp
DataQueryReliablePdu.h
1 #pragma once
2 
3 #include <dis6/FixedDatum.h>
4 #include <dis6/VariableDatum.h>
5 #include <vector>
6 #include <dis6/SimulationManagementWithReliabilityFamilyPdu.h>
7 #include <dis6/utils/DataStream.h>
8 #include <dis6/opendis6_export.h>
9 
10 
11 namespace DIS
12 {
13 // Section 5.3.12.8: request for data from an entity. COMPLETE
14 
15 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
16 //
17 // @author DMcG, jkg
18 
20 {
21 protected:
24 
26  unsigned short _pad1;
27 
29  unsigned char _pad2;
30 
32  unsigned int _requestID;
33 
35  unsigned int _timeInterval;
36 
39 
42 
44  std::vector<FixedDatum> _fixedDatumRecords;
45 
47  std::vector<VariableDatum> _variableDatumRecords;
48 
49 
50  public:
52  virtual ~DataQueryReliablePdu();
53 
54  virtual void marshal(DataStream& dataStream) const;
55  virtual void unmarshal(DataStream& dataStream);
56 
57  unsigned char getRequiredReliabilityService() const;
58  void setRequiredReliabilityService(unsigned char pX);
59 
60  unsigned short getPad1() const;
61  void setPad1(unsigned short pX);
62 
63  unsigned char getPad2() const;
64  void setPad2(unsigned char pX);
65 
66  unsigned int getRequestID() const;
67  void setRequestID(unsigned int pX);
68 
69  unsigned int getTimeInterval() const;
70  void setTimeInterval(unsigned int pX);
71 
72  unsigned int getNumberOfFixedDatumRecords() const;
73 
74  unsigned int getNumberOfVariableDatumRecords() const;
75 
76  std::vector<FixedDatum>& getFixedDatumRecords();
77  const std::vector<FixedDatum>& getFixedDatumRecords() const;
78  void setFixedDatumRecords(const std::vector<FixedDatum>& pX);
79 
80  std::vector<VariableDatum>& getVariableDatumRecords();
81  const std::vector<VariableDatum>& getVariableDatumRecords() const;
82  void setVariableDatumRecords(const std::vector<VariableDatum>& pX);
83 
84 
85 virtual int getMarshalledSize() const;
86 
87  bool operator ==(const DataQueryReliablePdu& rhs) const;
88 };
89 }
90 
91 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
92 // Redistribution and use in source and binary forms, with or without
93 // modification, are permitted provided that the following conditions
94 // are met:
95 //
96 // * Redistributions of source code must retain the above copyright
97 // notice, this list of conditions and the following disclaimer.
98 // * Redistributions in binary form must reproduce the above copyright
99 // notice, this list of conditions and the following disclaimer
100 // in the documentation and/or other materials provided with the
101 // distribution.
102 // * Neither the names of the Naval Postgraduate School (NPS)
103 // Modeling Virtual Environments and Simulation (MOVES) Institute
104 // (http://www.nps.edu and http://www.MovesInstitute.org)
105 // nor the names of its contributors may be used to endorse or
106 // promote products derived from this software without specific
107 // prior written permission.
108 //
109 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
110 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
111 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
112 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
113 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
114 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
115 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
116 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
117 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
118 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
119 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
120 // POSSIBILITY OF SUCH DAMAGE.
std::vector< FixedDatum > _fixedDatumRecords
Fixed datum records.
Definition: DataQueryReliablePdu.h:44
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
Definition: SimulationManagementWithReliabilityFamilyPdu.h:18
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned char _requiredReliabilityService
level of reliability service used for this transaction
Definition: DataQueryReliablePdu.h:23
unsigned int _requestID
request ID
Definition: DataQueryReliablePdu.h:32
unsigned int _numberOfFixedDatumRecords
Fixed datum record count.
Definition: DataQueryReliablePdu.h:38
unsigned int _numberOfVariableDatumRecords
variable datum record count
Definition: DataQueryReliablePdu.h:41
unsigned char _pad2
padding
Definition: DataQueryReliablePdu.h:29
Definition: DataQueryReliablePdu.h:19
std::vector< VariableDatum > _variableDatumRecords
Variable datum records.
Definition: DataQueryReliablePdu.h:47
unsigned int _timeInterval
time interval between issuing data query PDUs
Definition: DataQueryReliablePdu.h:35
unsigned short _pad1
padding
Definition: DataQueryReliablePdu.h:26