open-dis-cpp
CommentReliablePdu.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.12: Arbitrary messages. Only reliable this time. Neds manual intervention to fix padding in variable datums. UNFINISHED
14 
15 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
16 //
17 // @author DMcG, jkg
18 
20 {
21 protected:
24 
27 
29  std::vector<FixedDatum> _fixedDatumRecords;
30 
32  std::vector<VariableDatum> _variableDatumRecords;
33 
34 
35  public:
37  virtual ~CommentReliablePdu();
38 
39  virtual void marshal(DataStream& dataStream) const;
40  virtual void unmarshal(DataStream& dataStream);
41 
42  unsigned int getNumberOfFixedDatumRecords() const;
43 
44  unsigned int getNumberOfVariableDatumRecords() const;
45 
46  std::vector<FixedDatum>& getFixedDatumRecords();
47  const std::vector<FixedDatum>& getFixedDatumRecords() const;
48  void setFixedDatumRecords(const std::vector<FixedDatum>& pX);
49 
50  std::vector<VariableDatum>& getVariableDatumRecords();
51  const std::vector<VariableDatum>& getVariableDatumRecords() const;
52  void setVariableDatumRecords(const std::vector<VariableDatum>& pX);
53 
54 
55 virtual int getMarshalledSize() const;
56 
57  bool operator ==(const CommentReliablePdu& rhs) const;
58 };
59 }
60 
61 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
62 // Redistribution and use in source and binary forms, with or without
63 // modification, are permitted provided that the following conditions
64 // are met:
65 //
66 // * Redistributions of source code must retain the above copyright
67 // notice, this list of conditions and the following disclaimer.
68 // * Redistributions in binary form must reproduce the above copyright
69 // notice, this list of conditions and the following disclaimer
70 // in the documentation and/or other materials provided with the
71 // distribution.
72 // * Neither the names of the Naval Postgraduate School (NPS)
73 // Modeling Virtual Environments and Simulation (MOVES) Institute
74 // (http://www.nps.edu and http://www.MovesInstitute.org)
75 // nor the names of its contributors may be used to endorse or
76 // promote products derived from this software without specific
77 // prior written permission.
78 //
79 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
80 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
81 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
82 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
83 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
84 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
85 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
86 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
87 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
88 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
89 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
90 // POSSIBILITY OF SUCH DAMAGE.
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 int _numberOfVariableDatumRecords
variable datum record count
Definition: CommentReliablePdu.h:26
unsigned int _numberOfFixedDatumRecords
Fixed datum record count.
Definition: CommentReliablePdu.h:23
std::vector< VariableDatum > _variableDatumRecords
Variable datum records.
Definition: CommentReliablePdu.h:32
std::vector< FixedDatum > _fixedDatumRecords
Fixed datum records.
Definition: CommentReliablePdu.h:29
Definition: CommentReliablePdu.h:19