VR-Exchange 2.4 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pRadioSignalInter.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2015 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pInteraction.h>
13 
14 namespace MAKVrExchange
15 {
16 
17  class DtPortalConnection;
18 
22  : public DtPortalInteraction
23  {
24  public:
25 
27  typedef void (*functionCallback_type) (
28  const DtPortalRadioSignalInteraction& interaction, void* userData );
29 
32 
35 
38 
41 
43  static void addCallback( DtPortalConnection* connection,
44  functionCallback_type callbackFunction, void* userData );
45 
47  static void removeCallback( DtPortalConnection* connection,
48  functionCallback_type callbackFunction, void* userData );
49 
52 
55  DtDEC_ATTRIBUTE( DtString, HostRadioId, hostRadioId );
56 
58  DtDEC_ATTRIBUTE( DtU32, DataRate, dataRate );
59 
62  DtDEC_ATTRIBUTE( DtU32, Samples, samples );
63 
65  DtDEC_ATTRIBUTE( DtVariableLengthData, SignalData, signalData );
66 
68  DtDEC_ATTRIBUTE( DtU32, UserProtocolID, userProtocolID );
69 
71  DtDEC_ATTRIBUTE( DtU32, TacticalDataLinkType, tacticalDataLinkType );
72 
73  DtDEC_ATTRIBUTE( DtU32, DatabaseIndex, databaseIndex );
74  DtDEC_ATTRIBUTE( DtU32, Duration, duration );
75  DtDEC_ATTRIBUTE( DtU32, StartOffset, startOffset );
76 
78  public:
79 
81  void setEncodingClass( const DtU32& value );
83  DtU32 encodingClass() const;
84 
86  void setEncodingType( const DtU32& value );
88  DtU32 encodingType() const;
89 
91  void setTDLMessageCount( const DtU32& value );
93  DtU32 tdlMessageCount() const;
94 
96 
97  public:
98 
100 
101  static DtPortalMessage* create();
102 
103  virtual unsigned int netSize() const;
104  virtual void writeSelfToBuffer( void* buffer ) const;
105  virtual void readSelfFromBuffer( const void* buffer );
106 
107  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
108 
109  protected:
110 
119 
120  };
121 
122 
124  {
125  return new DtPortalRadioSignalInteraction();
126  }
127 
128  inline void DtPortalRadioSignalInteraction::setEncodingClass( const DtU32& value )
129  {
130  myEncodingScheme |= (0x0000D000 & (value << 14));
131  }
132 
134  {
135  return ((myEncodingScheme >> 14) & 0x00000003);
136  }
137 
138  inline void DtPortalRadioSignalInteraction::setEncodingType( const DtU32& value )
139  {
140  myEncodingScheme |= (0x00003FFF & value);
141  }
142 
144  {
145  return (myEncodingScheme & 0x00003FFF);
146  }
147 
148  inline void DtPortalRadioSignalInteraction::setTDLMessageCount( const DtU32& value )
149  {
150  setEncodingType( value );
151  }
152 
154  {
155  return encodingType();
156  }
157 
158 }

Document ID: Generated on Thu Jul 23 10:25:22 EDT 2015 from SVN revision 155065
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)