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