Remove old changelog
[KDIS.git] / include / KDIS / PDU / Simulation_Management_With_Reliability / Create_Entity_R_PDU.hpp
blobf072a380a061a2f05f75ecce7bb8ff6d22e1f6a9
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
30 /********************************************************************
31 class: Create_Entity_R_PDU
32 DIS: (5) 1278.1 - 1995
33 created: 20:03:2009
34 author: Karl Jones
36 purpose: Create Entity PDU with reliability.
37 size: 256 bits / 32 octets
38 *********************************************************************/
40 #pragma once
42 #include "KDIS/PDU/Simulation_Management/Create_Entity_PDU.hpp"
43 #include "KDIS/PDU/Simulation_Management_With_Reliability/Reliability_Header.hpp"
45 namespace KDIS {
46 namespace PDU {
48 class KDIS_EXPORT Create_Entity_R_PDU : public Create_Entity_PDU,
49 public Reliability_Header {
50 public:
51 static const KUINT16 CREATE_ENTITY_R_PDU_SIZE = 32;
53 Create_Entity_R_PDU();
55 explicit Create_Entity_R_PDU(const Header& H);
57 Create_Entity_R_PDU(KDataStream& stream);
59 Create_Entity_R_PDU(const Header& H, KDataStream& stream);
61 Create_Entity_R_PDU(const KDIS::DATA_TYPE::EntityIdentifier& ReceivingEntity,
62 const KDIS::DATA_TYPE::EntityIdentifier& SupplyingEntity,
63 KUINT32 RequestID,
64 KDIS::DATA_TYPE::ENUMS::RequiredReliabilityService RRS);
66 Create_Entity_R_PDU(const Simulation_Management_Header& SimMgrHeader,
67 KUINT32 RequestID,
68 KDIS::DATA_TYPE::ENUMS::RequiredReliabilityService RRS);
70 virtual ~Create_Entity_R_PDU();
72 //************************************
73 // FullName: KDIS::PDU::Create_Entity_R_PDU::GetString
74 // Description: Returns a string representation of the PDU.
75 //************************************
76 virtual KString GetAsString() const;
78 //************************************
79 // FullName: KDIS::PDU::Create_Entity_R_PDU::Decode
80 // Description: Convert From Network Data.
81 // Parameter: KDataStream & stream
82 // Parameter: bool ignoreHeader = false - Decode the header from the stream?
83 //************************************
84 virtual void Decode(KDataStream& stream, bool ignoreHeader = false);
86 //************************************
87 // FullName: KDIS::PDU::Create_Entity_R_PDU::Encode
88 // Description: Convert To Network Data.
89 // Parameter: KDataStream & stream
90 //************************************
91 virtual KDataStream Encode() const;
92 virtual void Encode(KDataStream& stream) const;
94 KBOOL operator==(const Create_Entity_R_PDU& Value) const;
95 KBOOL operator!=(const Create_Entity_R_PDU& Value) const;
98 } // END namespace PDU
99 } // END namespace KDIS