open-dis-cpp
ActionRequestPdu.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.6. Request from simulation manager to an entity. 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 ActionRequestPdu : public SimulationManagementFamilyPdu
20 {
21 protected:
23  unsigned int _requestID;
24 
26  unsigned int _actionID;
27 
30 
33 
35  std::vector<FixedDatum> _fixedDatums;
36 
38  std::vector<VariableDatum> _variableDatums;
39 
40 
41  public:
43  virtual ~ActionRequestPdu();
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 getActionID() const;
52  void setActionID(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 ActionRequestPdu& 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.
unsigned int _numberOfVariableDatumRecords
Number of variable datum records.
Definition: ActionRequestPdu.h:32
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned int _actionID
identifies the action being requested
Definition: ActionRequestPdu.h:26
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned int _numberOfFixedDatumRecords
Number of fixed datum records.
Definition: ActionRequestPdu.h:29
Definition: SimulationManagementFamilyPdu.h:18
unsigned int _requestID
Request ID that is unique.
Definition: ActionRequestPdu.h:23
std::vector< FixedDatum > _fixedDatums
variable length list of fixed datums
Definition: ActionRequestPdu.h:35
std::vector< VariableDatum > _variableDatums
variable length list of variable length datums
Definition: ActionRequestPdu.h:38
Definition: ActionRequestPdu.h:19