open-dis-cpp
TransferControlRequestPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EntityID.h>
5 #include <dis6/EntityID.h>
6 #include <dis6/RecordSet.h>
7 #include <vector>
8 #include <dis6/EntityManagementFamilyPdu.h>
9 #include <dis6/utils/DataStream.h>
10 #include <dis6/opendis6_export.h>
11 
12 
13 namespace DIS
14 {
15 // Section 5.3.9.3 Information initiating the dyanic allocation and control of simulation entities between two simulation applications. Requires manual cleanup. The padding between record sets is variable. UNFINISHED
16 
17 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
18 //
19 // @author DMcG, jkg
20 
22 {
23 protected:
26 
29 
31  unsigned int _requestID;
32 
35 
37  unsigned char _tranferType;
38 
41 
43  unsigned char _numberOfRecordSets;
44 
46  std::vector<RecordSet> _recordSets;
47 
48 
49  public:
51  virtual ~TransferControlRequestPdu();
52 
53  virtual void marshal(DataStream& dataStream) const;
54  virtual void unmarshal(DataStream& dataStream);
55 
56  EntityID& getOrginatingEntityID();
57  const EntityID& getOrginatingEntityID() const;
58  void setOrginatingEntityID(const EntityID &pX);
59 
60  EntityID& getRecevingEntityID();
61  const EntityID& getRecevingEntityID() const;
62  void setRecevingEntityID(const EntityID &pX);
63 
64  unsigned int getRequestID() const;
65  void setRequestID(unsigned int pX);
66 
67  unsigned char getRequiredReliabilityService() const;
68  void setRequiredReliabilityService(unsigned char pX);
69 
70  unsigned char getTranferType() const;
71  void setTranferType(unsigned char pX);
72 
73  EntityID& getTransferEntityID();
74  const EntityID& getTransferEntityID() const;
75  void setTransferEntityID(const EntityID &pX);
76 
77  unsigned char getNumberOfRecordSets() const;
78 
79  std::vector<RecordSet>& getRecordSets();
80  const std::vector<RecordSet>& getRecordSets() const;
81  void setRecordSets(const std::vector<RecordSet>& pX);
82 
83 
84 virtual int getMarshalledSize() const;
85 
86  bool operator ==(const TransferControlRequestPdu& rhs) const;
87 };
88 }
89 
90 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
91 // Redistribution and use in source and binary forms, with or without
92 // modification, are permitted provided that the following conditions
93 // are met:
94 //
95 // * Redistributions of source code must retain the above copyright
96 // notice, this list of conditions and the following disclaimer.
97 // * Redistributions in binary form must reproduce the above copyright
98 // notice, this list of conditions and the following disclaimer
99 // in the documentation and/or other materials provided with the
100 // distribution.
101 // * Neither the names of the Naval Postgraduate School (NPS)
102 // Modeling Virtual Environments and Simulation (MOVES) Institute
103 // (http://www.nps.edu and http://www.MovesInstitute.org)
104 // nor the names of its contributors may be used to endorse or
105 // promote products derived from this software without specific
106 // prior written permission.
107 //
108 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
109 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
110 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
111 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
112 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
113 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
114 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
115 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
116 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
117 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
118 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
119 // POSSIBILITY OF SUCH DAMAGE.
Definition: TransferControlRequestPdu.h:21
unsigned char _tranferType
type of transfer desired
Definition: TransferControlRequestPdu.h:37
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
std::vector< RecordSet > _recordSets
^^^This is wrong–the RecordSet class needs more work
Definition: TransferControlRequestPdu.h:46
unsigned char _numberOfRecordSets
number of record sets to transfer
Definition: TransferControlRequestPdu.h:43
a class to support managing a network buffer.
Definition: DataStream.h:28
EntityID _recevingEntityID
ID of entity receiving request.
Definition: TransferControlRequestPdu.h:28
Definition: EntityID.h:15
EntityID _transferEntityID
The entity for which control is being requested to transfer.
Definition: TransferControlRequestPdu.h:40
EntityID _orginatingEntityID
ID of entity originating request.
Definition: TransferControlRequestPdu.h:25
Definition: EntityManagementFamilyPdu.h:16
unsigned char _requiredReliabilityService
required level of reliabliity service.
Definition: TransferControlRequestPdu.h:34
unsigned int _requestID
ID ofrequest.
Definition: TransferControlRequestPdu.h:31