KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Repair_Response_PDU.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
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.
13 
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.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: Repair_Response_PDU
32  DIS: (5) 1278.1 - 1995
33  created: 2008/09/22
34  author: Karl Jones
35 
36  purpose: When a receiving entity receives a repair complete PDU
37  from its repairing entity, the receiving entity shall acknowledge
38  the reapir by issuing a repair response PDU.
39  Size: 224 bits / 28 octets
40 *********************************************************************/
41 
42 #pragma once
43 
44 #include "./Logistics_Header.h"
45 
46 namespace KDIS {
47 namespace PDU {
48 
50 {
51 protected:
52 
54 
56 
58 
59 public:
60 
61  static const KUINT16 REPAIR_RESPONSE_PDU_SIZE = 28;
62 
64 
65  Repair_Response_PDU( KDataStream & stream ) throw( KException );
66 
67  Repair_Response_PDU( const Header & H, KDataStream & stream ) throw( KException );
68 
69  Repair_Response_PDU( const KDIS::DATA_TYPE::EntityIdentifier & ReceivingEntityID, const KDIS::DATA_TYPE::EntityIdentifier & SupplyingEntityID,
71 
72  virtual ~Repair_Response_PDU();
73 
74  //************************************
75  // FullName: KDIS::PDU::Repair_Response_PDU::SetRepairResult
76  // KDIS::PDU::Repair_Response_PDU::GetRepairResult
77  //!Description: Specifies the result of a previous repair completed PDU
78  // Parameter: RepairResult RR
79  //************************************
80  void SetRepairResult( KDIS::DATA_TYPE::ENUMS::RepairResult RR );
81  KDIS::DATA_TYPE::ENUMS::RepairResult GetRepairResult() const;
82 
83  //************************************
84  // FullName: KDIS::PDU::Repair_Response_PDU::GetAsString
85  //!Description: Returns a string representation of the PDU.
86  //************************************
87  virtual KString GetAsString() const;
88 
89  //************************************
90  // FullName: KDIS::PDU::Repair_Response_PDU::Decode
91  //!Description: Convert From Network Data.
92  // Parameter: KDataStream & stream
93  // Parameter: bool ignoreHeader = false - Decode the header from the stream?
94  //************************************
95  virtual void Decode( KDataStream & stream, bool ignoreHeader = false ) throw( KException );
96 
97  //************************************
98  // FullName: KDIS::PDU::Repair_Response_PDU::Encode
99  //!Description: Convert To Network Data.
100  // Parameter: KDataStream & stream
101  //************************************
102  virtual KDataStream Encode() const;
103  virtual void Encode( KDataStream & stream ) const;
104 
105  KBOOL operator == ( const Repair_Response_PDU & Value ) const;
106  KBOOL operator != ( const Repair_Response_PDU & Value ) const;
107 };
108 
109 } // END namespace PDU
110 } // END namespace KDIS
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT8 m_ui8RepairResult
Definition: Repair_Response_PDU.h:53
KUINT16 m_ui16Padding
Definition: Repair_Response_PDU.h:57
Definition: KDefines.h:182
Definition: KDataStream.h:48
RepairResult
Definition: EnumSupply.h:179
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
Definition: EntityIdentifier.h:49
Definition: Header7.h:142
unsigned char KUINT8
Definition: KDefines.h:99
KUINT8 m_ui8Padding
Definition: Repair_Response_PDU.h:55
Definition: Logistics_Header.h:48
#define KDIS_EXPORT
Definition: KDefines.h:82
Definition: Repair_Response_PDU.h:49