VR-Exchange 2.1 API Documentation
pRadioSignalInter.h
Go to the documentation of this file.
1 /******************************************************************************
2  ** Copyright (c) 1992-2010 VT MAK
3  ******************************************************************************/
4 
5 #ifndef pRadioSignalInter_H_
6 #define pRadioSignalInter_H_
7 
11 
12 
13 #include <portal/pBaseInteraction.h>
14 
15 namespace MAKVrExchange
16 {
17 
18  class DtPortalConnection;
19 
24  {
25  public:
27  typedef void (*functionCallback_type) (const DtPortalRadioSignalInteraction& interaction,
28  void* userData );
29 
32 
35 
41 
43 
44 
47  DtDEC_ATTRIBUTE( DtString, HostRadioId, hostRadioId );
48 
50  DtDEC_ATTRIBUTE( DtU32, DataRate, dataRate );
51 
54  DtDEC_ATTRIBUTE( DtU32, Samples, samples );
55 
57  DtDEC_ATTRIBUTE( DtVariableLengthData, SignalData, signalData );
58 
60  DtDEC_ATTRIBUTE( DtU32, UserProtocolID, userProtocolID );
61 
63  DtDEC_ATTRIBUTE( DtU32, TacticalDataLinkType, tacticalDataLinkType );
64 
65  DtDEC_ATTRIBUTE( DtU32, DatabaseIndex, databaseIndex );
66  DtDEC_ATTRIBUTE( DtU32, Duration, duration );
67  DtDEC_ATTRIBUTE( DtU32, StartOffset, startOffset );
68 
69  public:
70 
72  void setEncodingClass( const DtU32& value );
74  DtU32 encodingClass() const;
75 
77  void setEncodingType( const DtU32& value );
79  DtU32 encodingType() const;
80 
82  void setTDLMessageCount( const DtU32& value );
84  DtU32 tdlMessageCount() const;
85 
86  protected:
87 
96 
98 
100  public:
101 
106 
107  //Doxygen comments inherited from parent class
108  virtual DtPortalMessageKind kind() const;
109 
110  //Doxygen comments inherited from parent class
111  virtual const char* interactionKindName() const;
112 
113  //Doxygen comments inherited from parent class
114  virtual unsigned int netSize() const;
115 
116  //Doxygen comments inherited from parent class
117  virtual void writeSelfToBuffer( void* buffer ) const;
118 
119  //Doxygen comments inherited from parent class
120  virtual void readSelfFromBuffer( const void* buffer );
121 
130  static void addCallback( DtPortalConnection* connection,
131  functionCallback_type callbackFunction,
132  void* userData );
133 
142  static void removeCallback( DtPortalConnection* connection,
143  functionCallback_type callbackFunction,
144  void* userData );
145 
153  static DtPortalMessage* create();
154 
155  //Doxygen comments inherited from parent class
156  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
157 
158  private:
159 
162 
164  bool operator==( const DtPortalRadioSignalInteraction& ) const;
165 
167  bool operator!=( const DtPortalRadioSignalInteraction& ) const;
168 
169  }; //end class DtPortalRadioSignalInteraction
170 
172  {
173  return new DtPortalRadioSignalInteraction();
174  }
175 
177  {
178  return "Radio Signal";
179  }
180 
182  {
183  return theKind;
184  }
185 
186  inline void DtPortalRadioSignalInteraction::setEncodingClass( const DtU32& value )
187  {
188  myEncodingScheme |= (0x0000D000 & (value << 14));
189  }
190 
192  {
193  return ((myEncodingScheme >> 14) & 0x00000003);
194  }
195 
196 
197  inline void DtPortalRadioSignalInteraction::setEncodingType( const DtU32& value )
198  {
199  myEncodingScheme |= (0x00003FFF & value);
200  }
201 
203  {
204  return (myEncodingScheme & 0x00003FFF);
205  }
206 
207  inline void DtPortalRadioSignalInteraction::setTDLMessageCount( const DtU32& value )
208  {
209  setEncodingType( value );
210  }
211 
213  {
214  return encodingType();
215  }
216 
217 
218 }
219 
220 #endif //end #ifndef pRadioSignalInter_H_

Document ID: Generated on Tue Aug 7 22:07:13 EDT 2012 from SVN revision 117874
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)