open-dis-cpp
SimulationManagementPduHeader.h
1 #pragma once
2 
3 #include <dis7/PduHeader.h>
4 #include <dis7/EntityID.h>
5 #include <dis7/EntityID.h>
6 #include <dis7/utils/DataStream.h>
7 #include <dis7/opendis7_export.h>
8 
9 
10 namespace DIS
11 {
12 // First part of a simulation management (SIMAN) PDU and SIMAN-Reliability (SIMAN-R) PDU. Sectionn 6.2.81
13 
14 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
15 //
16 // @author DMcG, jkg
17 
18 class OPENDIS7_EXPORT SimulationManagementPduHeader
19 {
20 protected:
23 
26 
29 
30 
31  public:
34 
35  virtual void marshal(DataStream& dataStream) const;
36  virtual void unmarshal(DataStream& dataStream);
37 
38  PduHeader& getPduHeader();
39  const PduHeader& getPduHeader() const;
40  void setPduHeader(const PduHeader &pX);
41 
42  EntityID& getOriginatingID();
43  const EntityID& getOriginatingID() const;
44  void setOriginatingID(const EntityID &pX);
45 
46  EntityID& getRecevingID();
47  const EntityID& getRecevingID() const;
48  void setRecevingID(const EntityID &pX);
49 
50 
51 virtual int getMarshalledSize() const;
52 
53  bool operator ==(const SimulationManagementPduHeader& rhs) const;
54 };
55 }
56 
57 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
58 // Redistribution and use in source and binary forms, with or without
59 // modification, are permitted provided that the following conditions
60 // are met:
61 //
62 // * Redistributions of source code must retain the above copyright
63 // notice, this list of conditions and the following disclaimer.
64 // * Redistributions in binary form must reproduce the above copyright
65 // notice, this list of conditions and the following disclaimer
66 // in the documentation and/or other materials provided with the
67 // distribution.
68 // * Neither the names of the Naval Postgraduate School (NPS)
69 // Modeling Virtual Environments and Simulation (MOVES) Institute
70 // (http://www.nps.edu and http://www.MovesInstitute.org)
71 // nor the names of its contributors may be used to endorse or
72 // promote products derived from this software without specific
73 // prior written permission.
74 //
75 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
76 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
77 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
78 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
79 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
80 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
81 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
82 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
83 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
84 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
85 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
86 // POSSIBILITY OF SUCH DAMAGE.
Definition: SimulationManagementPduHeader.h:18
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: PduHeader.h:15
PduHeader _pduHeader
Conventional PDU header.
Definition: SimulationManagementPduHeader.h:22
Definition: EntityID.h:15
EntityID _originatingID
IDs the simulation or entity, etiehr a simulation or an entity.
Definition: SimulationManagementPduHeader.h:25
EntityID _recevingID
simulation, all simulations, a special ID, or an entity.
Definition: SimulationManagementPduHeader.h:28