open-dis-cpp
EnvironmentalProcessPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EntityType.h>
5 #include <dis6/Environment.h>
6 #include <vector>
7 #include <dis6/SyntheticEnvironmentFamilyPdu.h>
8 #include <dis6/utils/DataStream.h>
9 #include <dis6/opendis6_export.h>
10 
11 
12 namespace DIS
13 {
14 // Section 5.3.11.1: Information about environmental effects and processes. This requires manual cleanup. the environmental record is variable, as is the padding. UNFINISHED
15 
16 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
17 //
18 // @author DMcG, jkg
19 
21 {
22 protected:
25 
28 
30  unsigned char _modelType;
31 
33  unsigned char _environmentStatus;
34 
37 
39  unsigned short _sequenceNumber;
40 
42  std::vector<Environment> _environmentRecords;
43 
44 
45  public:
47  virtual ~EnvironmentalProcessPdu();
48 
49  virtual void marshal(DataStream& dataStream) const;
50  virtual void unmarshal(DataStream& dataStream);
51 
52  EntityID& getEnvironementalProcessID();
53  const EntityID& getEnvironementalProcessID() const;
54  void setEnvironementalProcessID(const EntityID &pX);
55 
56  EntityType& getEnvironmentType();
57  const EntityType& getEnvironmentType() const;
58  void setEnvironmentType(const EntityType &pX);
59 
60  unsigned char getModelType() const;
61  void setModelType(unsigned char pX);
62 
63  unsigned char getEnvironmentStatus() const;
64  void setEnvironmentStatus(unsigned char pX);
65 
66  unsigned char getNumberOfEnvironmentRecords() const;
67 
68  unsigned short getSequenceNumber() const;
69  void setSequenceNumber(unsigned short pX);
70 
71  std::vector<Environment>& getEnvironmentRecords();
72  const std::vector<Environment>& getEnvironmentRecords() const;
73  void setEnvironmentRecords(const std::vector<Environment>& pX);
74 
75 
76 virtual int getMarshalledSize() const;
77 
78  bool operator ==(const EnvironmentalProcessPdu& rhs) const;
79 };
80 }
81 
82 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
83 // Redistribution and use in source and binary forms, with or without
84 // modification, are permitted provided that the following conditions
85 // are met:
86 //
87 // * Redistributions of source code must retain the above copyright
88 // notice, this list of conditions and the following disclaimer.
89 // * Redistributions in binary form must reproduce the above copyright
90 // notice, this list of conditions and the following disclaimer
91 // in the documentation and/or other materials provided with the
92 // distribution.
93 // * Neither the names of the Naval Postgraduate School (NPS)
94 // Modeling Virtual Environments and Simulation (MOVES) Institute
95 // (http://www.nps.edu and http://www.MovesInstitute.org)
96 // nor the names of its contributors may be used to endorse or
97 // promote products derived from this software without specific
98 // prior written permission.
99 //
100 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
101 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
102 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
103 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
104 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
105 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
106 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
107 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
108 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
109 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
110 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
111 // POSSIBILITY OF SUCH DAMAGE.
Definition: EnvironmentalProcessPdu.h:20
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _environmentStatus
Environment status.
Definition: EnvironmentalProcessPdu.h:33
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned short _sequenceNumber
PDU sequence number for the environmentla process if pdu sequencing required.
Definition: EnvironmentalProcessPdu.h:39
std::vector< Environment > _environmentRecords
environemt records
Definition: EnvironmentalProcessPdu.h:42
Definition: EntityID.h:15
Definition: EntityType.h:15
EntityType _environmentType
Environment type.
Definition: EnvironmentalProcessPdu.h:27
Definition: SyntheticEnvironmentFamilyPdu.h:16
unsigned char _numberOfEnvironmentRecords
number of environment records
Definition: EnvironmentalProcessPdu.h:36
unsigned char _modelType
model type
Definition: EnvironmentalProcessPdu.h:30
EntityID _environementalProcessID
Environmental process ID.
Definition: EnvironmentalProcessPdu.h:24