KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IFF_Layer3Transponder.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: IFF_Layer3Transponder
32  DIS: (7) 1278.1 - 2012
33  created: 27/06/2014
34  author: Karl Jones
35 
36  purpose: Layer 3 Mode 5 transponder functional data.
37 
38  Size: 224 bits / 28 octets - min size
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./IFF_Layer3.h"
44 #include "./SimulationIdentifier.h"
46 
47 namespace KDIS {
48 namespace DATA_TYPE {
49 
51 {
52 protected:
53 
55 
56 public:
57 
59 
60  IFF_Layer3Transponder( KDataStream & stream ) throw( KException );
61 
62  IFF_Layer3Transponder( const SimulationIdentifier & ReportingSimulation, const Mode5TransponderBasicData & Data,
63  std::vector<StdVarPtr> & Records );
64 
65  IFF_Layer3Transponder( const LayerHeader & H, KDataStream & stream ) throw( KException );
66 
67  virtual ~IFF_Layer3Transponder();
68 
69  //************************************
70  // FullName: KDIS::DATA_TYPE::IFF_Layer3Transponder::SetBasicData
71  // KDIS::DATA_TYPE::IFF_Layer3Transponder::GetBasicData
72  //!Description: Basic Mode 5 transponder data that is always required to be transmitted.
73  // Parameter: const Mode5TransponderBasicData & BD
74  //************************************
75  void SetBasicData( const Mode5TransponderBasicData & BD );
76  const Mode5TransponderBasicData & GetBasicData() const;
77  Mode5TransponderBasicData & GetBasicDatan();
78 
79  //************************************
80  // FullName: KDIS::DATA_TYPE::IFF_Layer3Transponder::GetAsString
81  //!Description: Returns a string representation
82  //************************************
83  virtual KString GetAsString() const;
84 
85  //************************************
86  // FullName: KDIS::DATA_TYPE::IFF_Layer3Transponder::Decode
87  //!Description: Convert From Network Data.
88  // Parameter: KDataStream & stream
89  // Parameter: bool ignoreHeader = false - Decode the layer header from the stream?
90  //************************************
91  virtual void Decode( KDataStream & stream, bool ignoreHeader = false ) throw( KException );
92 
93  //************************************
94  // FullName: KDIS::DATA_TYPE::IFF_Layer3Transponder::Encode
95  //!Description: Convert To Network Data.
96  // Parameter: KDataStream & stream
97  //************************************
98  virtual KDataStream Encode() const;
99  virtual void Encode( KDataStream & stream ) const;
100 
101  KBOOL operator == ( const IFF_Layer3Transponder & Value ) const;
102  KBOOL operator != ( const IFF_Layer3Transponder & Value ) const;
103 };
104 
105 } // END namespace DATA_TYPE
106 } // END namespace KDIS
Definition: SimulationIdentifier.h:51
Definition: LayerHeader.h:59
Definition: Mode5TransponderBasicData.h:53
Definition: KDefines.h:182
Definition: KDataStream.h:48
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
Definition: IFF_Layer3Transponder.h:50
Definition: IFF_Layer3.h:52
Mode5TransponderBasicData m_BasicData
Definition: IFF_Layer3Transponder.h:54
#define KDIS_EXPORT
Definition: KDefines.h:82