KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IFF_Layer3.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_Layer3
32  DIS: (7) 1278.1 - 2012
33  created: 23/09/2013
34  author: Karl Jones
35 
36  purpose: Base class for Layer 3 Mode 5 interrogator and transponder functional data.
37  Note: The Layer 1 System Type field isused to determine whether Layer 3
38  represents a Mode 5 capable interrogator or transponder.
39 
40  Size: 224 bits / 28 octets - min size
41 *********************************************************************/
42 
43 #pragma once
44 
45 #include "./LayerHeader.h"
46 #include "./SimulationIdentifier.h"
47 #include "./StandardVariable.h"
48 
49 namespace KDIS {
50 namespace DATA_TYPE {
51 
53 {
54 protected:
55 
57 
58  // Transponder/interrogator in the inherited classes.
59 
61 
63 
64  std::vector<KDIS::DATA_TYPE::StdVarPtr> m_vStdVarRecs;
65 
66 public:
67 
68  static const KUINT16 IFF_LAYER3_SIZE = 28; // Min size
69 
70  IFF_Layer3();
71 
72  IFF_Layer3( const LayerHeader & H );
73 
74  virtual ~IFF_Layer3();
75 
76  //************************************
77  // FullName: KDIS::DATA_TYPE::IFF_Layer3::SetReportingSimulation
78  // KDIS::DATA_TYPE::IFF_Layer3::GetReportingSimulation
79  //!Description: The simulation reporting this IFF PDU.
80  // Parameter: const SimulationIdentifier & RS
81  //************************************
82  void SetReportingSimulation( const SimulationIdentifier & RS );
83  const SimulationIdentifier & GetReportingSimulation() const;
84  SimulationIdentifier & GetReportingSimulation();
85 
86  //************************************
87  // FullName: KDIS::DATA_TYPE::IFF_Layer3::GetNumberDataRecords
88  //!Description: The number of IFF Data records in this PDU.
89  //************************************
90  KUINT16 GetNumberDataRecords() const;
91 
92  //************************************
93  // FullName: KDIS::PDU::IFF_Layer3::AddDataRecord
94  // KDIS::PDU::IFF_Layer3::SetDataRecords
95  // KDIS::PDU::IFF_Layer3::GetDataRecords
96  // KDIS::PDU::IFF_Layer3::ClearDataRecords
97  //!Description: IFF Data records are used when variable records are required to be included in the layer.
98  //! They are identical to Standard Variable Specification record format except that alignment is to
99  //! a 32-bit boundary for each IFF Data record instead of to a 64-bit boundary.
100  //! This means the records can not contain 64 bit floats or 64 bit integers.
101  //! See B.2.1.1 of IEEE 1278.1-2012 for a full list of supported records (Note: I have not implmented them all yet but do plan to).
102  // Parameter: StdVarPtr DR, const vector<StdVarPtr> & DRS
103  //************************************
104  void AddDataRecord( StdVarPtr DR );
105  void SetDataRecords( const std::vector<StdVarPtr> & DRS );
106  const std::vector<StdVarPtr> & GetDataRecords() const;
107  void ClearDataRecords();
108 
109  KBOOL operator == ( const IFF_Layer3 & Value ) const;
110  KBOOL operator != ( const IFF_Layer3 & Value ) const;
111 };
112 
113 } // END namespace DATA_TYPE
114 } // END namespace KDIS
Definition: SimulationIdentifier.h:51
std::vector< KDIS::DATA_TYPE::StdVarPtr > m_vStdVarRecs
Definition: IFF_Layer3.h:64
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT16 m_ui16Padding
Definition: IFF_Layer3.h:60
Definition: LayerHeader.h:59
SimulationIdentifier m_RptSim
Definition: IFF_Layer3.h:56
bool KBOOL
Definition: KDefines.h:119
Definition: IFF_Layer3.h:52
KUINT16 m_ui16NumIffRecs
Definition: IFF_Layer3.h:62
#define KDIS_EXPORT
Definition: KDefines.h:82
Definition: KRef_Ptr.h:73