QRSS Rx Network receiver. A receiver to sample a segment of RF spectrum and send this data to a server for further processing and display. NXP mbed Design Challenge entry (Honorable Mention). Published in Circuit Cellar, Feb 2012
Dependencies: NetServices mbed DNSResolver
DSP.h
00001 /*--------------------------------------------------------------------------- 00002 00003 QRSS Receiver Application 00004 00005 by Clayton ZL3TKA/VK1TKA 00006 clayton@isnotcrazy.com 00007 00008 Header File for DSP Processing class 00009 00010 ---------------------------------------------------------------------------*/ 00011 #ifndef _DSP_H 00012 #define _DSP_H 00013 00014 #include "mbed.h" 00015 #include "BufferSys.h" 00016 00017 // Definitions 00018 00019 // Macros 00020 00021 // 00022 // Classes 00023 // 00024 00025 //--------------------------------------------------------------------------- 00026 // 00027 // DSP Processor Class - based on a buffer handle. Processes the attached samples buffer 00028 // 00029 class TDSPProcessor : public TBufferHandle 00030 { 00031 00032 // parameters 00033 public: 00034 // Set NCO phase inc 00035 // Set inc directly 00036 void NCOPhaseInc( uint32_t uiPhaseInc ) 00037 { uiMixerPhaseIncrement = uiPhaseInc; } 00038 // Set inc from a frequency 00039 void NCOFrequency( int32_t iFreq ); 00040 00041 // results 00042 public: 00043 // get filtered output data 00044 const TDataSample FilteredOutput( int iIndex ) const 00045 { 00046 if ( !HasBuffer() || (iIndex<0) || (iIndex>=LPF_OUTPUTS_SIZE) ) 00047 return NullSample; // return empty sample 00048 return asLPFOutputs[iIndex]; 00049 } 00050 00051 // processing operations 00052 public: 00053 // Reset processing 00054 void Reset(); 00055 00056 // Mix samples with LO 00057 bool MixLO(); 00058 00059 // LPF processing 00060 bool LPF(); 00061 00062 // data 00063 protected: 00064 // NCO mixer 00065 uint32_t uiMixerPhaseAccumulator; 00066 uint32_t uiMixerPhaseIncrement; 00067 00068 // LPF outputs 00069 TDataSample asLPFOutputs[LPF_OUTPUTS_SIZE]; 00070 00071 // LPF partial results (ready to complete with the next buffer) 00072 TLongDataSample asLPFPartials[LPF_OUTPUTS_SIZE]; 00073 00074 // LPF Partials valid flag 00075 bool bLPFPartailsValid; 00076 00077 }; 00078 00079 #endif 00080 00081 //--------------------------------------------------------------------------- 00082 // END 00083 //--------------------------------------------------------------------------- 00084
Generated on Wed Jul 13 2022 23:08:21 by 1.7.2