open-dis-cpp
IsGroupOfPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/VariableDatum.h>
5 #include <vector>
6 #include <dis6/EntityManagementFamilyPdu.h>
7 #include <dis6/utils/DataStream.h>
8 #include <dis6/opendis6_export.h>
9 
10 
11 namespace DIS
12 {
13 // Section 5.3.9.2 Information about a particular group of entities grouped together for the purposes of netowrk bandwidth reduction or aggregation. Needs manual cleanup. The GED size requires a database lookup. UNFINISHED
14 
15 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
16 //
17 // @author DMcG, jkg
18 
19 class OPENDIS6_EXPORT IsGroupOfPdu : public EntityManagementFamilyPdu
20 {
21 protected:
24 
26  unsigned char _groupedEntityCategory;
27 
29  unsigned char _numberOfGroupedEntities;
30 
32  unsigned int _pad2;
33 
35  double _latitude;
36 
38  double _longitude;
39 
41  std::vector<VariableDatum> _groupedEntityDescriptions;
42 
43 
44  public:
45  IsGroupOfPdu();
46  virtual ~IsGroupOfPdu();
47 
48  virtual void marshal(DataStream& dataStream) const;
49  virtual void unmarshal(DataStream& dataStream);
50 
51  EntityID& getGroupEntityID();
52  const EntityID& getGroupEntityID() const;
53  void setGroupEntityID(const EntityID &pX);
54 
55  unsigned char getGroupedEntityCategory() const;
56  void setGroupedEntityCategory(unsigned char pX);
57 
58  unsigned char getNumberOfGroupedEntities() const;
59 
60  unsigned int getPad2() const;
61  void setPad2(unsigned int pX);
62 
63  double getLatitude() const;
64  void setLatitude(double pX);
65 
66  double getLongitude() const;
67  void setLongitude(double pX);
68 
69  std::vector<VariableDatum>& getGroupedEntityDescriptions();
70  const std::vector<VariableDatum>& getGroupedEntityDescriptions() const;
71  void setGroupedEntityDescriptions(const std::vector<VariableDatum>& pX);
72 
73 
74 virtual int getMarshalledSize() const;
75 
76  bool operator ==(const IsGroupOfPdu& rhs) const;
77 };
78 }
79 
80 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
81 // Redistribution and use in source and binary forms, with or without
82 // modification, are permitted provided that the following conditions
83 // are met:
84 //
85 // * Redistributions of source code must retain the above copyright
86 // notice, this list of conditions and the following disclaimer.
87 // * Redistributions in binary form must reproduce the above copyright
88 // notice, this list of conditions and the following disclaimer
89 // in the documentation and/or other materials provided with the
90 // distribution.
91 // * Neither the names of the Naval Postgraduate School (NPS)
92 // Modeling Virtual Environments and Simulation (MOVES) Institute
93 // (http://www.nps.edu and http://www.MovesInstitute.org)
94 // nor the names of its contributors may be used to endorse or
95 // promote products derived from this software without specific
96 // prior written permission.
97 //
98 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
99 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
100 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
101 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
102 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
103 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
104 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
105 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
106 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
107 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
108 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
109 // 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
std::vector< VariableDatum > _groupedEntityDescriptions
GED records about each individual entity in the group.
Definition: IsGroupOfPdu.h:41
double _longitude
longitude
Definition: IsGroupOfPdu.h:38
Definition: EntityID.h:15
unsigned char _groupedEntityCategory
type of entities constituting the group
Definition: IsGroupOfPdu.h:26
Definition: EntityManagementFamilyPdu.h:16
Definition: IsGroupOfPdu.h:19
double _latitude
latitude
Definition: IsGroupOfPdu.h:35
unsigned int _pad2
padding
Definition: IsGroupOfPdu.h:32
unsigned char _numberOfGroupedEntities
Number of individual entities constituting the group.
Definition: IsGroupOfPdu.h:29
EntityID _groupEntityID
ID of aggregated entities.
Definition: IsGroupOfPdu.h:23