KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NamedLocationIdentifier.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: NamedLocationIdentifier
32  created: 27/06/2008
33  author: Karl Jones
34 
35  purpose: Contaiins information about the discrete positional relationship of the part
36  entity with respect to the its host entity.
37  size: 32 bits / 4 octets
38 *********************************************************************/
39 
40 #pragma once
41 
42 #include "./DataTypeBase.h"
43 
44 namespace KDIS {
45 namespace DATA_TYPE {
46 
48 {
49 protected:
50 
52 
54 
55 public:
56 
57  static const KUINT16 NAMED_LOCATION_ID_SIZE = 4;
58 
60 
62 
64 
65  virtual ~NamedLocationIdentifier();
66 
67  //************************************
68  // FullName: KDIS::DATA_TYPE::NamedLocationIdentifier::SetStationName
69  // KDIS::DATA_TYPE::NamedLocationIdentifier::GetStationName
70  //!Description: Specifies the station name within the host at which the part entity
71  //! is located. If the part entity is On Station, this field shall
72  //! specify the representation of the part�s location data fields.
73  // Parameter: StationName SN
74  //************************************
75  void SetStationName( KDIS::DATA_TYPE::ENUMS::StationName SN );
76  KDIS::DATA_TYPE::ENUMS::StationName GetStationName() const;
77 
78  //************************************
79  // FullName: KDIS::DATA_TYPE::NamedLocationIdentifier::SetStationNumber
80  // KDIS::DATA_TYPE::NamedLocationIdentifier::GetStationNumber
81  //!Description: Specifies the number of the particular wingstation, cargo hold etc, at
82  //! which the part is attached.
83  // Parameter: KUINT16 SN
84  //************************************
85  void SetStationNumber( KUINT16 SN );
86  KUINT16 GetStationNumber() const;
87 
88  //************************************
89  // FullName: KDIS::DATA_TYPE::NamedLocationIdentifier::GetAsString
90  //!Description: Returns a string representation
91  //************************************
92  virtual KString GetAsString() const;
93 
94  //************************************
95  // FullName: KDIS::DATA_TYPE::NamedLocationIdentifier::Decode
96  //!Description: Convert From Network Data.
97  // Parameter: KDataStream & stream
98  //************************************
99  virtual void Decode( KDataStream & stream ) throw( KException );
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::NamedLocationIdentifier::Encode
103  //!Description: Convert To Network Data.
104  // Parameter: KDataStream & stream
105  //************************************
106  virtual KDataStream Encode() const;
107  virtual void Encode( KDataStream & stream ) const;
108 
109  KBOOL operator == ( const NamedLocationIdentifier & Value ) const;
110  KBOOL operator != ( const NamedLocationIdentifier & Value ) const;
111 };
112 
113 } // END namespace DATA_TYPES
114 } // END namespace KDIS
KUINT16 m_ui16StnNum
Definition: NamedLocationIdentifier.h:53
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
KUINT16 m_ui16StnName
Definition: NamedLocationIdentifier.h:51
std::string KString
Definition: KDefines.h:116
Definition: NamedLocationIdentifier.h:47
#define KDIS_EXPORT
Definition: KDefines.h:82
StationName
Definition: EnumEntityManagement.h:667