open-dis-cpp
GridAxisRecordRepresentation0.h
1 #pragma once
2 
3 #include "dis6/GridAxisRecord.h"
4 #include "dis6/opendis6_export.h"
5 #include "dis6/utils/DataStream.h"
6 #include <cstdint>
7 #include <vector>
8 
9 namespace DIS {
10 // 5.2.44: Grid data record, representation 0
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All
13 // rights reserved.
14 //
15 // @author DMcG, jkg
16 
17 class OPENDIS6_EXPORT GridAxisRecordRepresentation0 : public GridAxisRecord {
18 protected:
20  unsigned short _numberOfBytes;
21 
24  std::vector<uint8_t> _dataValues;
25 
26 public:
29 
30  virtual void marshal(DataStream &dataStream) const;
31  virtual void unmarshal(DataStream &dataStream);
32 
33  unsigned short getNumberOfBytes() const;
34 
35  std::vector<uint8_t> &getDataValues();
36  const std::vector<uint8_t> &getDataValues() const;
37  void setDataValues(const std::vector<uint8_t> &pX);
38 
39  virtual int getMarshalledSize() const;
40 
41  bool operator==(const GridAxisRecordRepresentation0 &rhs) const;
42 };
43 } // namespace DIS
44 
45 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
46 // Redistribution and use in source and binary forms, with or without
47 // modification, are permitted provided that the following conditions
48 // are met:
49 //
50 // * Redistributions of source code must retain the above copyright
51 // notice, this list of conditions and the following disclaimer.
52 // * Redistributions in binary form must reproduce the above copyright
53 // notice, this list of conditions and the following disclaimer
54 // in the documentation and/or other materials provided with the
55 // distribution.
56 // * Neither the names of the Naval Postgraduate School (NPS)
57 // Modeling Virtual Environments and Simulation (MOVES) Institute
58 // (http://www.nps.edu and http://www.MovesInstitute.org)
59 // nor the names of its contributors may be used to endorse or
60 // promote products derived from this software without specific
61 // prior written permission.
62 //
63 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
64 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
65 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
66 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
67 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
68 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
69 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
70 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
71 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
72 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
73 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
74 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: GridAxisRecord.h:15
unsigned short _numberOfBytes
number of bytes of environmental state data
Definition: GridAxisRecordRepresentation0.h:20
std::vector< uint8_t > _dataValues
variable length list of data parameters ^^^this is wrong–need padding as well
Definition: GridAxisRecordRepresentation0.h:24
Definition: GridAxisRecordRepresentation0.h:17