open-dis-cpp
ElectromagneticEmissionsPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EventID.h>
5 #include <dis6/ElectromagneticEmissionSystemData.h>
6 #include <vector>
7 #include <dis6/DistributedEmissionsFamilyPdu.h>
8 #include <dis6/utils/DataStream.h>
9 #include <dis6/opendis6_export.h>
10 
11 
12 namespace DIS
13 {
14 // Section 5.3.7.1. Information about active electronic warfare (EW) emissions and active EW countermeasures shall be communicated using an Electromagnetic Emission PDU. COMPLETE (I think)
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 _stateUpdateIndicator;
31 
33  unsigned char _numberOfSystems;
34 
36  unsigned short _paddingForEmissionsPdu;
37 
39  std::vector<ElectromagneticEmissionSystemData> _systems;
40 
41 
42  public:
44  virtual ~ElectromagneticEmissionsPdu();
45 
46  virtual void marshal(DataStream& dataStream) const;
47  virtual void unmarshal(DataStream& dataStream);
48 
49  EntityID& getEmittingEntityID();
50  const EntityID& getEmittingEntityID() const;
51  void setEmittingEntityID(const EntityID &pX);
52 
53  EventID& getEventID();
54  const EventID& getEventID() const;
55  void setEventID(const EventID &pX);
56 
57  unsigned char getStateUpdateIndicator() const;
58  void setStateUpdateIndicator(unsigned char pX);
59 
60  unsigned char getNumberOfSystems() const;
61 
62  unsigned short getPaddingForEmissionsPdu() const;
63  void setPaddingForEmissionsPdu(unsigned short pX);
64 
65  std::vector<ElectromagneticEmissionSystemData>& getSystems();
66  const std::vector<ElectromagneticEmissionSystemData>& getSystems() const;
67  void setSystems(const std::vector<ElectromagneticEmissionSystemData>& pX);
68 
69 
70 virtual int getMarshalledSize() const;
71 
72  bool operator ==(const ElectromagneticEmissionsPdu& rhs) const;
73 };
74 }
75 
76 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
77 // Redistribution and use in source and binary forms, with or without
78 // modification, are permitted provided that the following conditions
79 // are met:
80 //
81 // * Redistributions of source code must retain the above copyright
82 // notice, this list of conditions and the following disclaimer.
83 // * Redistributions in binary form must reproduce the above copyright
84 // notice, this list of conditions and the following disclaimer
85 // in the documentation and/or other materials provided with the
86 // distribution.
87 // * Neither the names of the Naval Postgraduate School (NPS)
88 // Modeling Virtual Environments and Simulation (MOVES) Institute
89 // (http://www.nps.edu and http://www.MovesInstitute.org)
90 // nor the names of its contributors may be used to endorse or
91 // promote products derived from this software without specific
92 // prior written permission.
93 //
94 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
95 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
96 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
97 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
98 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
99 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
100 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
101 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
102 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
103 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
104 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
105 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _stateUpdateIndicator
This field shall be used to indicate if the data in the PDU represents a state update or just data th...
Definition: ElectromagneticEmissionsPdu.h:30
unsigned short _paddingForEmissionsPdu
padding
Definition: ElectromagneticEmissionsPdu.h:36
EntityID _emittingEntityID
ID of the entity emitting.
Definition: ElectromagneticEmissionsPdu.h:24
a class to support managing a network buffer.
Definition: DataStream.h:28
EventID _eventID
ID of event.
Definition: ElectromagneticEmissionsPdu.h:27
Definition: EventID.h:15
unsigned char _numberOfSystems
This field shall specify the number of emission systems being described in the current PDU...
Definition: ElectromagneticEmissionsPdu.h:33
Definition: EntityID.h:15
Definition: ElectromagneticEmissionsPdu.h:20
Definition: DistributedEmissionsFamilyPdu.h:16
std::vector< ElectromagneticEmissionSystemData > _systems
Electromagnetic emmissions systems.
Definition: ElectromagneticEmissionsPdu.h:39