open-dis-cpp
RecordQueryReliablePdu.h
1 #pragma once
2 
3 #include <dis6/FourByteChunk.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.13: A request for one or more records of data from an entity. COMPLETE
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 short _eventType;
35 
37  unsigned int _time;
38 
40  unsigned int _numberOfRecords;
41 
43  std::vector<FourByteChunk> _recordIDs;
44 
45 
46  public:
48  virtual ~RecordQueryReliablePdu();
49 
50  virtual void marshal(DataStream& dataStream) const;
51  virtual void unmarshal(DataStream& dataStream);
52 
53  unsigned int getRequestID() const;
54  void setRequestID(unsigned int pX);
55 
56  unsigned char getRequiredReliabilityService() const;
57  void setRequiredReliabilityService(unsigned char pX);
58 
59  unsigned short getPad1() const;
60  void setPad1(unsigned short pX);
61 
62  unsigned char getPad2() const;
63  void setPad2(unsigned char pX);
64 
65  unsigned short getEventType() const;
66  void setEventType(unsigned short pX);
67 
68  unsigned int getTime() const;
69  void setTime(unsigned int pX);
70 
71  unsigned int getNumberOfRecords() const;
72 
73  std::vector<FourByteChunk>& getRecordIDs();
74  const std::vector<FourByteChunk>& getRecordIDs() const;
75  void setRecordIDs(const std::vector<FourByteChunk>& pX);
76 
77 
78 virtual int getMarshalledSize() const;
79 
80  bool operator ==(const RecordQueryReliablePdu& rhs) const;
81 };
82 }
83 
84 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
85 // Redistribution and use in source and binary forms, with or without
86 // modification, are permitted provided that the following conditions
87 // are met:
88 //
89 // * Redistributions of source code must retain the above copyright
90 // notice, this list of conditions and the following disclaimer.
91 // * Redistributions in binary form must reproduce the above copyright
92 // notice, this list of conditions and the following disclaimer
93 // in the documentation and/or other materials provided with the
94 // distribution.
95 // * Neither the names of the Naval Postgraduate School (NPS)
96 // Modeling Virtual Environments and Simulation (MOVES) Institute
97 // (http://www.nps.edu and http://www.MovesInstitute.org)
98 // nor the names of its contributors may be used to endorse or
99 // promote products derived from this software without specific
100 // prior written permission.
101 //
102 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
103 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
104 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
105 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
106 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
107 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
108 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
109 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
110 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
111 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
112 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
113 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned int _numberOfRecords
numberOfRecords
Definition: RecordQueryReliablePdu.h:40
Definition: SimulationManagementWithReliabilityFamilyPdu.h:18
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned int _time
time
Definition: RecordQueryReliablePdu.h:37
std::vector< FourByteChunk > _recordIDs
record IDs
Definition: RecordQueryReliablePdu.h:43
unsigned int _requestID
request ID
Definition: RecordQueryReliablePdu.h:22
unsigned char _pad2
padding
Definition: RecordQueryReliablePdu.h:31
unsigned char _requiredReliabilityService
level of reliability service used for this transaction
Definition: RecordQueryReliablePdu.h:25
unsigned short _pad1
padding.
Definition: RecordQueryReliablePdu.h:28
Definition: RecordQueryReliablePdu.h:18
unsigned short _eventType
event type
Definition: RecordQueryReliablePdu.h:34