![]() |
VR-Link API Documentation for DIS
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 #ifndef _SIGNALP_H_ 00007 #define _SIGNALP_H_ 1 00008 00009 #include <vlpi/NetStructs.h> 00010 #include "pduHeader.h" 00011 00012 /* ---------------------- signal ---------------------- */ 00013 #ifdef __cplusplus 00014 00015 /* hopefully provide some insulation from 00016 * the machine dependent bit field layouts */ 00017 class DtSignalEncodingScheme 00018 { 00019 public: 00020 unsigned eClass : 2; 00021 unsigned eType : 14; 00022 DtU16 operator = (DtU16 u) 00023 { 00024 eClass = u >> 14; 00025 eType = u ^ 2<<14; 00026 return u; 00027 } 00028 operator DtU16() 00029 { 00030 DtU16 u; 00031 u = eClass << 14 | eType; 00032 return u; 00033 } 00034 }; 00035 00036 #endif 00037 00038 typedef struct DtNetSignalPdu 00039 { 00040 DtNetPduHeader DtHeader; 00041 DtNetEntityIdentifier DtTransmittingEntityID; 00042 DtNetU16 DtRadioId; 00043 DtNetU16 DtEncodingScheme; 00044 DtNetU16 TDLType; 00045 DtNetInt32 DtSampleRate; 00046 DtNetInt16 DtLength; /* bits */ 00047 DtNetInt16 DtSamples; 00048 DtNetU8 DtData[1 /* len/8 */ ]; 00049 } DtNetSignalPdu; 00050 00051 00052 #endif /* _SIGNALP_H_ */ 00053