1 /*********************************************************************
2 Copyright 2013 Karl Jones
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
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
30 /********************************************************************
31 class: Acknowledge_R_PDU
32 DIS: (6) 1278.1A - 1998
36 purpose: Sent to acknowledges receipt of a Start/Resume-R PDU,
37 Stop/Freeze-R PDU, Create Entity-R PDU or Remove Entity-R PDU. size: 256
39 *********************************************************************/
43 #include "KDIS/PDU/Entity_Management/Transfer_Control_Request_PDU.hpp"
44 #include "KDIS/PDU/Simulation_Management/Acknowledge_PDU.hpp"
45 #include "KDIS/PDU/Simulation_Management_With_Reliability/Create_Entity_R_PDU.hpp"
46 #include "KDIS/PDU/Simulation_Management_With_Reliability/Remove_Entity_R_PDU.hpp"
47 #include "KDIS/PDU/Simulation_Management_With_Reliability/Start_Resume_R_PDU.hpp"
48 #include "KDIS/PDU/Simulation_Management_With_Reliability/Stop_Freeze_R_PDU.hpp"
53 class KDIS_EXPORT Acknowledge_R_PDU
: public Acknowledge_PDU
{
55 static const KUINT16 ACKNOWLEDGE_R_PDU_SIZE
= 32;
59 Acknowledge_R_PDU(KDataStream
& stream
);
61 Acknowledge_R_PDU(const Header
& H
, KDataStream
& stream
);
64 const KDIS::DATA_TYPE::EntityIdentifier
& OriginatingEntityID
,
65 const KDIS::DATA_TYPE::EntityIdentifier
& ReceivingEntityID
,
66 KDIS::DATA_TYPE::ENUMS::AcknowledgeFlag AF
,
67 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
, KUINT32 RequestID
);
69 Acknowledge_R_PDU(const Simulation_Management_Header
& SimMgrHeader
,
70 KDIS::DATA_TYPE::ENUMS::AcknowledgeFlag AF
,
71 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
,
74 // Generate a response to a specific PDU
75 Acknowledge_R_PDU(const Create_Entity_R_PDU
& pdu
,
76 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
);
77 Acknowledge_R_PDU(const Remove_Entity_R_PDU
& pdu
,
78 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
);
79 Acknowledge_R_PDU(const Start_Resume_R_PDU
& pdu
,
80 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
);
81 Acknowledge_R_PDU(const Stop_Freeze_R_PDU
& pdu
,
82 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
);
83 Acknowledge_R_PDU(const Transfer_Control_Request_PDU
& pdu
,
84 KDIS::DATA_TYPE::ENUMS::AcknowledgeResponseFlag ARF
);
86 virtual ~Acknowledge_R_PDU();
88 //************************************
89 // FullName: KDIS::PDU::Acknowledge_R_PDU::GetAsString
90 // Description: Returns a string representation of the PDU.
91 //************************************
92 virtual KString
GetAsString() const;
94 KBOOL
operator==(const Acknowledge_R_PDU
& Value
) const;
95 KBOOL
operator!=(const Acknowledge_R_PDU
& Value
) const;
98 } // END namespace PDU
99 } // END namespace KDIS