Changeset 8586
- Timestamp:
- 01/21/09 11:53:20 (4 years ago)
- Location:
- ossiedev/trunk/components/Interpolator
- Files:
-
- 4 modified
- 5 moved
-
Interpolator.cpp (moved) (moved from ossiedev/trunk/components/Interpolator/Interpolator_metadata.cpp) (22 diffs)
-
Interpolator.h (moved) (moved from ossiedev/trunk/components/Interpolator/Interpolator_metadata.h) (7 diffs)
-
Interpolator.prf.xml (moved) (moved from ossiedev/trunk/components/Interpolator/Interpolator_metadata.prf.xml) (4 diffs)
-
Interpolator.scd.xml (moved) (moved from ossiedev/trunk/components/Interpolator/Interpolator_metadata.scd.xml)
-
Interpolator.spd.xml (moved) (moved from ossiedev/trunk/components/Interpolator/Interpolator_metadata.spd.xml) (2 diffs)
-
Makefile.am (modified) (1 diff)
-
README.txt (modified) (1 diff)
-
configure.ac (modified) (2 diffs)
-
main.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/trunk/components/Interpolator/Interpolator.cpp
r8180 r8586 3 3 Copyright 2006, 2007 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE Interpolator _metadata.6 7 OSSIE Interpolator _metadatais free software; you can redistribute it and/or modify5 This file is part of the OSSIE Interpolator. 6 7 OSSIE Interpolator is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 OSSIE Interpolator _metadatais distributed in the hope that it will be useful,12 OSSIE Interpolator is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Interpolator _metadata; if not, write to the Free Software18 along with OSSIE Interpolator; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 … … 26 26 #include "ossie/debug.h" 27 27 28 #include "Interpolator _metadata.h"29 30 Interpolator_ metadata_i::Interpolator_metadata_i(const char *uuid, omni_condition *con) :28 #include "Interpolator.h" 29 30 Interpolator_i::Interpolator_i(const char *uuid, omni_condition *con) : 31 31 Resource_impl(uuid), 32 32 component_running(con), … … 39 39 previous_length = 0; 40 40 41 dataIn = new standardInterfaces MD_i::complexShort_p("inData");42 dataOut = new standardInterfaces MD_i::complexShort_u("outData");41 dataIn = new standardInterfaces_i::complexShort_p("inData"); 42 dataOut = new standardInterfaces_i::complexShort_u("outData"); 43 43 44 44 // Start the run_interpolation thread … … 61 61 62 62 63 Interpolator_ metadata_i::~Interpolator_metadata_i(void)63 Interpolator_i::~Interpolator_i(void) 64 64 { 65 65 delete dataIn; … … 72 72 } 73 73 74 CORBA::Object_ptr Interpolator_ metadata_i::getPort( const char* portName) throw (CORBA::SystemException, CF::PortSupplier::UnknownPort)75 { 76 DEBUG(4, Interpolator _metadata, "Interpolator_metadatagetPort() called with: " << portName);74 CORBA::Object_ptr Interpolator_i::getPort( const char* portName) throw (CORBA::SystemException, CF::PortSupplier::UnknownPort) 75 { 76 DEBUG(4, Interpolator, "Interpolator getPort() called with: " << portName); 77 77 78 78 CORBA::Object_var p; … … 91 91 } 92 92 93 void Interpolator_ metadata_i::start() throw (CORBA::SystemException, CF::Resource::StartError)94 { 95 DEBUG(3, Interpolator _metadata, "Interpolator_metadatastart() called")96 } 97 98 void Interpolator_ metadata_i::stop() throw (CORBA::SystemException, CF::Resource::StopError)99 { 100 DEBUG(3, Interpolator _metadata, "Interpolator_metadatastop() called")101 } 102 103 void Interpolator_ metadata_i::releaseObject() throw (CORBA::SystemException, CF::LifeCycle::ReleaseError)104 { 105 DEBUG(3, Interpolator _metadata, "In releaseObject.");93 void Interpolator_i::start() throw (CORBA::SystemException, CF::Resource::StartError) 94 { 95 DEBUG(3, Interpolator, "Interpolator start() called") 96 } 97 98 void Interpolator_i::stop() throw (CORBA::SystemException, CF::Resource::StopError) 99 { 100 DEBUG(3, Interpolator, "Interpolator stop() called") 101 } 102 103 void Interpolator_i::releaseObject() throw (CORBA::SystemException, CF::LifeCycle::ReleaseError) 104 { 105 DEBUG(3, Interpolator, "In releaseObject."); 106 106 component_running->signal(); 107 DEBUG(3, Interpolator _metadata, "Leaving releaseObject.");107 DEBUG(3, Interpolator, "Leaving releaseObject."); 108 108 } 109 109 110 void Interpolator_ metadata_i::initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException)110 void Interpolator_i::initialize() throw (CF::LifeCycle::InitializeError, CORBA::SystemException) 111 111 { 112 112 #ifdef INTERP_LOGGING … … 116 116 } 117 117 118 void Interpolator_ metadata_i::configure(const CF::Properties& props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration)119 { 120 DEBUG(3, Interpolator _metadata, "Interpolator_metadataconfigure() called")118 void Interpolator_i::configure(const CF::Properties& props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration) 119 { 120 DEBUG(3, Interpolator, "Interpolator configure() called") 121 121 122 DEBUG(3, Interpolator _metadata, "Props length : " << props.length())122 DEBUG(3, Interpolator, "Props length : " << props.length()) 123 123 124 124 for (unsigned int i = 0; i < props.length(); i++) { 125 DEBUG(3, Interpolator _metadata, "Property id : " << props[i].id)126 127 if (strcmp(props[i].id, "DCE: 8ebaf719-be0f-48af-b623-524989b43862") == 0) {125 DEBUG(3, Interpolator, "Property id : " << props[i].id) 126 127 if (strcmp(props[i].id, "DCE:e5c1d4aa-4b7f-48b7-b3bf-ed90b7653bec") == 0) { 128 128 // InterpFactor property, sets the interpolation factor 129 129 CORBA::UShort D; … … 133 133 134 134 M = D; 135 DEBUG(3, Interpolator _metadata, "Interpolation factor set to " << M)135 DEBUG(3, Interpolator, "Interpolation factor set to " << M) 136 136 std::cout << std::endl << "INTERP: k = " << M << std::endl; 137 137 isConfigured_k = true; 138 } else if (strcmp(props[i].id, "DCE: c3dcab06-841f-4259-a54f-a82c6209f59e") == 0) {138 } else if (strcmp(props[i].id, "DCE:9c39de73-54d4-43ad-ab9d-52f5fa526ddf") == 0) { 139 139 // filter property, Filter coefficients 140 140 CORBA::FloatSeq *coeff_ptr; … … 151 151 152 152 h = new float[len_h]; 153 DEBUG(3, Interpolator _metadata, "Interpolator filter length = " << len_h)153 DEBUG(3, Interpolator, "Interpolator filter length = " << len_h) 154 154 for (unsigned int i = 0; i < len_h; i++) { 155 155 h[i] = (*coeff_ptr)[i]; 156 //DEBUG(4, Interpolator _metadata, "Coeff[" << i << "] = " << h[i])156 //DEBUG(4, Interpolator, "Coeff[" << i << "] = " << h[i]) 157 157 printf("g(%d) = %f;\n", i+1, h[i]); 158 158 } … … 165 165 } 166 166 167 } else if (strcmp(props[i].id, "DCE: d462e7b6-3128-4fa5-9f73-c5b319b4bbf0") == 0) {167 } else if (strcmp(props[i].id, "DCE:e65ba870-4c11-11dc-9470-00123f63025f") == 0) { 168 168 // pulse shape 169 169 const char * prop_str; … … 176 176 } else { 177 177 // unknown pulse shape 178 std::cerr << "ERROR: Interpolator _metadata::configure() unknown pulse shape "178 std::cerr << "ERROR: Interpolator::configure() unknown pulse shape " 179 179 << prop_str << std::endl; 180 180 throw CF::PropertySet::InvalidConfiguration(); … … 183 183 std::cout << std::endl << "INTERP: pulse_shape = " << pulseShape << std::endl; 184 184 185 } else if (strcmp(props[i].id, "DCE: 58320c73-0498-452a-aa94-48f7df572534") == 0) {185 } else if (strcmp(props[i].id, "DCE:f6843fdc-4c11-11dc-b0be-00123f63025f") == 0) { 186 186 // m : symbol delay 187 187 CORBA::UShort simple_temp; … … 190 190 isConfigured_m = true; 191 191 std::cout << std::endl << "INTERP: m = " << m << std::endl; 192 } else if (strcmp(props[i].id, "DCE: 8ce7c2bc-b7f7-427b-ada8-7c1c0c7eded1") == 0) {192 } else if (strcmp(props[i].id, "DCE:fed01972-4c11-11dc-8d59-00123f63025f") == 0) { 193 193 // beta : excess bandwidth factor 194 194 CORBA::Float simple_temp; … … 198 198 std::cout << std::endl << "INTERP: beta = " << beta << std::endl; 199 199 } else { 200 std::cerr << "Interpolator _metadata: Unknown property id " << props[i].id << std::endl;200 std::cerr << "Interpolator: Unknown property id " << props[i].id << std::endl; 201 201 throw CF::PropertySet::InvalidConfiguration(); 202 202 } … … 215 215 216 216 ///\todo do not assume always rrcos filter 217 std::cout << "Interpolator _metadatadesigning new rrcos filter: "217 std::cout << "Interpolator designing new rrcos filter: " 218 218 << pulseShape << ", k=" << M << ", m=" << m << ", beta=" << beta 219 219 << std::endl; … … 231 231 } 232 232 233 void Interpolator_ metadata_i::run_interpolation()234 { 235 DEBUG(3, Interpolator _metadata, "Interpolator_metadatarun_interpolation() thread started")233 void Interpolator_i::run_interpolation() 234 { 235 DEBUG(3, Interpolator, "Interpolator run_interpolation() thread started") 236 236 PortTypes::ShortSequence *I_in, *Q_in; 237 237 PortTypes::ShortSequence I_out, Q_out; … … 243 243 while (1) { 244 244 245 dataIn->getData(I_in, Q_in , metadata);245 dataIn->getData(I_in, Q_in);//, metadata); 246 246 { 247 247 omni_mutex_lock l(accessPrivateData); … … 251 251 252 252 // Adjust MetaData tags 253 if ( createDynamicFilter )253 /* if ( createDynamicFilter ) 254 254 metadata->signal_bandwidth *= (float) ( metadata->sampling_frequency * (1+beta) ); 255 255 else … … 257 257 258 258 metadata->sampling_frequency *= (float) M; 259 259 */ 260 260 261 261 unsigned int len = I_in->length(); … … 263 263 264 264 if (len != old_len || M_factor != old_M) { 265 DEBUG(4, Interpolator _metadata, "data len or M changed.");265 DEBUG(4, Interpolator, "data len or M changed."); 266 266 I_out.length(len * M_factor); 267 267 Q_out.length(len * M_factor); 268 268 old_len = len; 269 269 old_M = M_factor; 270 DEBUG(4, Interpolator _metadata, "New data len: " << len << " M: " << M);270 DEBUG(4, Interpolator, "New data len: " << len << " M: " << M); 271 271 } 272 272 273 273 for (unsigned int i = 0; i < len; i++) { 274 274 275 DEBUG(8, Interpolator _metadata, "About to filter data.");275 DEBUG(8, Interpolator, "About to filter data."); 276 276 i_filter->do_work(true, (*I_in)[i], I_out[out_idx]); 277 277 q_filter->do_work(true, (*Q_in)[i], Q_out[out_idx]); 278 DEBUG(8, Interpolator _metadata, "Done filtering data.");278 DEBUG(8, Interpolator, "Done filtering data."); 279 279 280 280 #ifdef INTERP_LOGGING … … 297 297 } 298 298 dataIn->bufferEmptied(); 299 dataOut->pushPacket(I_out, Q_out , *metadata);299 dataOut->pushPacket(I_out, Q_out);//, *metadata); 300 300 } 301 301 } -
ossiedev/trunk/components/Interpolator/Interpolator.h
r8180 r8586 3 3 Copyright 2006 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE Interpolator _metadata.5 This file is part of the OSSIE Interpolator. 6 6 7 OSSIE Interpolator _metadatais free software; you can redistribute it and/or modify7 OSSIE Interpolator is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 OSSIE Interpolator _metadatais distributed in the hope that it will be useful,12 OSSIE Interpolator is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Interpolator _metadata; if not, write to the Free Software18 along with OSSIE Interpolator; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 … … 22 22 23 23 24 #ifndef INTERPOLATOR_ METADATA_IMPL_H25 #define INTERPOLATOR_ METADATA_IMPL_H24 #ifndef INTERPOLATOR_IMPL_H 25 #define INTERPOLATOR_IMPL_H 26 26 27 27 #include <stdlib.h> … … 29 29 #include "ossie/cf.h" 30 30 31 #include "standardinterfaces -metadata/complexShortMD_u.h"32 #include "standardinterfaces -metadata/complexShortMD_p.h"31 #include "standardinterfaces/complexShort_u.h" 32 #include "standardinterfaces/complexShort_p.h" 33 33 34 34 #include "ossie/Resource_impl.h" … … 37 37 #undef INTERP_LOGGING 38 38 39 class Interpolator_ metadata_i;39 class Interpolator_i; 40 40 41 class Interpolator_ metadata_i : public Resource_impl41 class Interpolator_i : public Resource_impl 42 42 { 43 43 44 44 public: 45 Interpolator_ metadata_i(const char *uuid, omni_condition *con);46 ~Interpolator_ metadata_i(void);45 Interpolator_i(const char *uuid, omni_condition *con); 46 ~Interpolator_i(void); 47 47 48 static void do_run_interpolation(void *data) { ((Interpolator_ metadata_i *)data)->run_interpolation(); };48 static void do_run_interpolation(void *data) { ((Interpolator_i *)data)->run_interpolation(); }; 49 49 50 50 void start() throw (CF::Resource::StartError, CORBA::SystemException); … … 62 62 63 63 private: 64 Interpolator_ metadata_i();65 Interpolator_ metadata_i(const Interpolator_metadata_i &);64 Interpolator_i(); 65 Interpolator_i(const Interpolator_i &); 66 66 67 67 void run_interpolation(); … … 86 86 87 87 // For data in port 88 standardInterfaces MD_i::complexShort_p *dataIn;88 standardInterfaces_i::complexShort_p *dataIn; 89 89 90 90 // For data out port 91 standardInterfaces MD_i::complexShort_u *dataOut;91 standardInterfaces_i::complexShort_u *dataOut; 92 92 93 standardInterfacesMD::MetaData *metadata;93 //standardInterfaces::MetaData *metadata; 94 94 95 95 // For debugging -
ossiedev/trunk/components/Interpolator/Interpolator.prf.xml
r8019 r8586 5 5 <properties> 6 6 <description /> 7 <simple id="DCE: 8ebaf719-be0f-48af-b623-524989b43862" type="ushort" name="InterpFactor (k)" mode="readwrite">7 <simple id="DCE:e5c1d4aa-4b7f-48b7-b3bf-ed90b7653bec" type="ushort" name="InterpFactor (k)" mode="readwrite"> 8 8 <value>1</value> 9 9 <kind kindtype="configure" /> 10 10 </simple> 11 <simplesequence id="DCE: c3dcab06-841f-4259-a54f-a82c6209f59e" type="float" name="filter" mode="readwrite">11 <simplesequence id="DCE:9c39de73-54d4-43ad-ab9d-52f5fa526ddf" type="float" name="filter" mode="readwrite"> 12 12 <values> 13 13 <value>1.0</value> … … 16 16 </simplesequence> 17 17 18 <simple id="DCE: d462e7b6-3128-4fa5-9f73-c5b319b4bbf0" type="string" name="pulse_shape" mode="readwrite">18 <simple id="DCE:e65ba870-4c11-11dc-9470-00123f63025f" type="string" name="pulse_shape" mode="readwrite"> 19 19 <description>Type of pulse shape to use for filter prototype</description> 20 20 <value>rrcos</value> … … 22 22 </simple> 23 23 24 <simple id="DCE: 58320c73-0498-452a-aa94-48f7df572534" type="ushort" name="m" mode="readwrite">24 <simple id="DCE:f6843fdc-4c11-11dc-b0be-00123f63025f" type="ushort" name="m" mode="readwrite"> 25 25 <description>Symbol delay</description> 26 26 <value>2</value> … … 28 28 </simple> 29 29 30 <simple id="DCE: 8ce7c2bc-b7f7-427b-ada8-7c1c0c7eded1" type="float" name="beta" mode="readwrite">30 <simple id="DCE:fed01972-4c11-11dc-8d59-00123f63025f" type="float" name="beta" mode="readwrite"> 31 31 <description>Excess bandwidth factor</description> 32 32 <value>0.3</value> -
ossiedev/trunk/components/Interpolator/Interpolator.spd.xml
r8019 r8586 3 3 <!--Created with OSSIE WaveDev Beta Version 0.5.0b--> 4 4 <!--Powered by Python--> 5 <softpkg type="sca_compliant" name="Interpolator _metadata" id="DCE:02c597e8-160b-4986-8439-f9ba52e2a3ee">5 <softpkg type="sca_compliant" name="Interpolator" id="DCE:e1a32064-21c5-11db-a265-000f1fd5acd7"> 6 6 <title/> 7 7 <author> … … 11 11 </author> 12 12 <propertyfile type="PRF"> 13 <localfile name="xml/Interpolator _metadata/Interpolator_metadata.prf.xml"/>13 <localfile name="xml/Interpolator/Interpolator.prf.xml"/> 14 14 </propertyfile> 15 15 <descriptor> 16 <localfile name="xml/Interpolator _metadata/Interpolator_metadata.scd.xml"/>16 <localfile name="xml/Interpolator/Interpolator.scd.xml"/> 17 17 </descriptor> 18 <implementation id="DCE: 00163ccc-4939-4273-a34e-59acd71e6931" aepcompliance="aep_compliant">18 <implementation id="DCE:e1a41b54-21c5-11db-9618-000f1fd5acd7" aepcompliance="aep_compliant"> 19 19 <description>Default Description</description> 20 20 <code type="Executable"> 21 <localfile name="bin/Interpolator _metadata"/>21 <localfile name="bin/Interpolator"/> 22 22 </code> 23 23 <processor name="x86"/> -
ossiedev/trunk/components/Interpolator/Makefile.am
r8019 r8586 2 2 AM_CXXFLAGS = -Wall 3 3 4 ossieName = Interpolator _metadata4 ossieName = Interpolator 5 5 dombindir = $(prefix)/bin 6 dombin_PROGRAMS = Interpolator _metadata6 dombin_PROGRAMS = Interpolator 7 7 8 8 xmldir = $(prefix)/xml/$(ossieName) 9 dist_xml_DATA = Interpolator _metadata.prf.xml Interpolator_metadata.scd.xml \10 Interpolator _metadata.spd.xml9 dist_xml_DATA = Interpolator.prf.xml Interpolator.scd.xml \ 10 Interpolator.spd.xml 11 11 12 Interpolator_ metadata_SOURCES = Interpolator_metadata.cpp Interpolator_metadata.h main.cpp12 Interpolator_SOURCES = Interpolator.cpp Interpolator.h main.cpp 13 13 14 14 # --- documentation --- -
ossiedev/trunk/components/Interpolator/README.txt
r8019 r8586 1 1 README.txt 2 2 3 Interpolator _metadata3 Interpolator 4 4 5 5 Based off Decimator. Uses 31 tap filter. Probably overkill... -
ossiedev/trunk/components/Interpolator/configure.ac
r8090 r8586 1 AC_INIT( Interpolator_metadata, 0.0.1)1 AC_INIT(interpolator, 0.0.1) 2 2 AM_INIT_AUTOMAKE 3 3 … … 24 24 AC_CHECK_LIB([standardInterfaces], [main], [], [AC_MSG_ERROR([cannot find standardInterfaces])]) 25 25 AC_CHECK_HEADERS([standardinterfaces/complexShort.h], [], [AC_MSG_ERROR([cannot find standardInterfaces header files])]) 26 AC_CHECK_LIB([standardInterfaces_metadata], [main], [], [AC_MSG_ERROR([cannot find standardInterfaces-metadata])])27 AC_CHECK_HEADERS([standardinterfaces-metadata/complexShortMD.h], [], [AC_MSG_ERROR([cannot find standardInterfaces-metadata header files])])28 26 29 27 AC_LANG_POP -
ossiedev/trunk/components/Interpolator/main.cpp
r8180 r8586 3 3 Copyright 2006 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE Interpolator _metadata.5 This file is part of the OSSIE Interpolator. 6 6 7 OSSIE Interpolator _metadatais free software; you can redistribute it and/or modify7 OSSIE Interpolator is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 OSSIE Interpolator _metadatais distributed in the hope that it will be useful,12 OSSIE Interpolator is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Interpolator _metadata; if not, write to the Free Software18 along with OSSIE Interpolator; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 … … 25 25 #include "ossie/debug.h" 26 26 27 #include "Interpolator _metadata.h"27 #include "Interpolator.h" 28 28 29 29 using namespace std; 30 using namespace standardInterfaces MD; // For standard OSSIE interface classes30 using namespace standardInterfaces; // For standard OSSIE interface classes 31 31 32 32 … … 48 48 cout << "Identifier - " << uuid << " Label - " << label << endl; 49 49 50 Interpolator_ metadata_i* interpolator_servant;50 Interpolator_i* interpolator_servant; 51 51 CF::Resource_var interpolator_var; 52 52 53 53 // Create the interpolator component servant and object reference 54 54 55 interpolator_servant = new Interpolator_ metadata_i(uuid, component_running);55 interpolator_servant = new Interpolator_i(uuid, component_running); 56 56 interpolator_var = interpolator_servant->_this(); 57 57