KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TrackJamTargetIdentifier.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: TrackJamTargetIdentifier
32  created: 19/10/2008
33  author: Karl Jones
34 
35  purpose: Contains information about a tracked/jammed target
36  For a tracked target only the entity identifier is needed,
37  Emitter ID and Beam ID are used for jammed targets only.
38  size: 64 bits / 8 octets
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./EntityIdentifier.h"
44 
45 namespace KDIS {
46 namespace DATA_TYPE {
47 
49 {
50 protected:
51 
53 
55 
56 public:
57 
58  static const KUINT16 TRACK_JAM_TARGET_SIZE = 8; // Min Size
59 
61 
63 
64  TrackJamTargetIdentifier( const EntityIdentifier & EntityID );
65 
66  TrackJamTargetIdentifier( KUINT16 SiteID, KUINT16 ApplicatonID, KUINT16 EntityID,
67  KUINT8 EmitterID = 0, KUINT8 BeamID = 0 );
68 
69  virtual ~TrackJamTargetIdentifier();
70 
71  //************************************
72  // FullName: KDIS::DATA_TYPE::TrackJamTargetIdentifier::SetEmitterID
73  // KDIS::DATA_TYPE::TrackJamTargetIdentifier::GetEmitterID
74  //!Description: For tracking this value is 0. For jamming represents
75  //! the ID of the emitter the jamming session is
76  //! is intended for.
77  // Parameter: KUINT8 ID, void
78  //************************************
79  void SetEmitterID( KUINT8 ID );
80  KUINT8 GetEmitterID() const;
81 
82  //************************************
83  // FullName: KDIS::DATA_TYPE::TrackJamTargetIdentifier::SetBeamID
84  // KDIS::DATA_TYPE::TrackJamTargetIdentifier::GetBeamID
85  //!Description: For tracking this value is 0. For jamming represents
86  //! the ID of the beam the jamming session is
87  //! is intended for.
88  // Parameter: KUINT8 ID, void
89  //************************************
90  void SetBeamID( KUINT8 ID );
91  KUINT8 GetBeamID() const;
92 
93  //************************************
94  // FullName: KDIS::DATA_TYPE::TrackJamTargetIdentifier::GetAsString
95  //!Description: Returns a string representation
96  //************************************
97  virtual KString GetAsString() const;
98 
99  //************************************
100  // FullName: KDIS::DATA_TYPE::TrackJamTargetIdentifier::Decode
101  //!Description: Convert From Network Data.
102  // Parameter: KDataStream & stream
103  //************************************
104  virtual void Decode( KDataStream & stream ) throw( KException );
105 
106  //************************************
107  // FullName: KDIS::DATA_TYPE::TrackJamTargetIdentifier::Encode
108  //!Description: Convert To Network Data.
109  // Parameter: KDataStream & stream
110  //************************************
111  virtual KDataStream Encode() const;
112  virtual void Encode( KDataStream & stream ) const;
113 
114  KBOOL operator == ( const TrackJamTargetIdentifier & Value )const;
115  KBOOL operator != ( const TrackJamTargetIdentifier & Value )const;
116 };
117 
118 } // END namespace DATA_TYPES
119 } // END namespace KDIS
Definition: TrackJamTargetIdentifier.h:48
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: KDefines.h:182
Definition: KDataStream.h:48
KUINT8 m_ui8BeamID
Definition: TrackJamTargetIdentifier.h:54
bool KBOOL
Definition: KDefines.h:119
KUINT8 m_ui8EmitterID
Definition: TrackJamTargetIdentifier.h:52
std::string KString
Definition: KDefines.h:116
Definition: EntityIdentifier.h:49
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82