Changeset 3988
- Timestamp:
- 05/28/07 17:17:05 (6 years ago)
- Location:
- components/Interpolator/trunk/Interpolator
- Files:
-
- 4 modified
-
Interpolator.cpp (modified) (5 diffs)
-
Interpolator.spd.xml (modified) (1 diff)
-
Makefile.am (modified) (1 diff)
-
main.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
components/Interpolator/trunk/Interpolator/Interpolator.cpp
r3426 r3988 1 1 /**************************************************************************** 2 2 3 Copyright 2006 Virginia Polytechnic Institute and State University3 Copyright 2006, 2007 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE Interpolator. … … 67 67 CORBA::Object_ptr Interpolator_i::getPort( const char* portName) throw (CORBA::SystemException, CF::PortSupplier::UnknownPort) 68 68 { 69 DEBUG(4, Interpolator, "Interpolator getPort() called with: " << portName); 69 70 70 71 CORBA::Object_var p; … … 178 179 179 180 if (len != old_len || M_factor != old_M) { 180 DEBUG( 1, Interpolator, "data len or M changed.")181 DEBUG(4, Interpolator, "data len or M changed."); 181 182 I_out.length(len * M_factor); 182 183 Q_out.length(len * M_factor); 183 184 old_len = len; 184 185 old_M = M_factor; 186 DEBUG(4, Interpolator, "New data len: " << len << " M: " << M); 185 187 } 186 188 187 189 for (unsigned int i = 0; i < len; i++) { 188 190 191 DEBUG(8, Interpolator, "About to filter data."); 189 192 i_filter->do_work(true, (*I_in)[i], I_out[out_idx]); 190 193 q_filter->do_work(true, (*Q_in)[i], Q_out[out_idx]); 191 192 out_data->write_data(I_out[out_idx]); 194 DEBUG(8, Interpolator, "Done filtering data."); 195 196 // out_data->write_data(I_out[out_idx]); 193 197 194 198 out_idx++; … … 199 203 q_filter->do_work(true, 0, Q_out[out_idx]); 200 204 201 out_data->write_data(I_out[out_idx]);205 // out_data->write_data(I_out[out_idx]); 202 206 203 207 out_idx++; … … 205 209 } 206 210 dataIn->bufferEmptied(); 211 DEBUG(5, Interpolator, "Interpolator about to send data."); 207 212 dataOut->pushPacket(I_out, Q_out); 213 DEBUG(5, Interpolator, "Interpolator data sent."); 208 214 } 209 215 } -
components/Interpolator/trunk/Interpolator/Interpolator.spd.xml
r3426 r3988 11 11 </author> 12 12 <propertyfile type="PRF"> 13 <localfile name=" xml/Interpolator/Interpolator.prf.xml"/>13 <localfile name="Interpolator.prf.xml"/> 14 14 </propertyfile> 15 15 <descriptor> 16 <localfile name=" xml/Interpolator/Interpolator.scd.xml"/>16 <localfile name="Interpolator.scd.xml"/> 17 17 </descriptor> 18 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"/>21 <localfile name="/bin/Interpolator"/> 22 22 </code> 23 23 <processor name="x86"/> -
components/Interpolator/trunk/Interpolator/Makefile.am
r3426 r3988 3 3 4 4 ossieName = Interpolator 5 bin_PROGRAMS = Interpolator 5 dombindir = $(prefix)/dom/bin 6 dombin_PROGRAMS = Interpolator 6 7 7 xmldir = $(prefix)/ xml/$(ossieName)8 xmldir = $(prefix)/dom/xml/$(ossieName) 8 9 dist_xml_DATA = Interpolator.prf.xml Interpolator.scd.xml \ 9 10 Interpolator.spd.xml -
components/Interpolator/trunk/Interpolator/main.cpp
r3426 r3988 1 1 /**************************************************************************** 2 2 3 Copyright 2006 Virginia Polytechnic Institute and State University3 Copyright 2006, 2007 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE Interpolator. … … 34 34 35 35 { 36 struct sched_param prio;37 38 prio.sched_priority = 5;39 40 int rc = sched_setscheduler(0, SCHED_RR, &prio);41 42 36 ossieDebugLevel = 3; 43 37 44 if (rc < 0)45 std::cerr << "Failed to set RR scheduler for USRP device." << std::endl;46 38 ossieSupport::ORB *orb = new ossieSupport::ORB; 47 39 omni_mutex component_running_mutex; 48 40 omni_condition *component_running = new omni_condition(&component_running_mutex); 49 41 50 if (argc != 3) { 51 std::cout << argv[0] << " <id> <usage name> " << std::endl; 52 exit (-1); 53 } 54 55 char *uuid = argv[1]; 56 char *label = argv[2]; 57 58 DEBUG(1, Interpolator, "Identifier - " << uuid << " Label - " << label) 42 ossieSupport::ossieComponent interpolator(orb, argc, argv); 59 43 60 44 Interpolator_i* interpolator_servant; … … 63 47 // Create the interpolator component servant and object reference 64 48 65 interpolator_servant = new Interpolator_i( uuid, component_running);49 interpolator_servant = new Interpolator_i(interpolator.getUuid(), component_running); 66 50 interpolator_var = interpolator_servant->_this(); 67 51 68 orb->bind_object_to_name((CORBA::Object_ptr) interpolator_var, label);52 interpolator.bind(interpolator_var); 69 53 70 54 // This bit is ORB specific … … 74 58 75 59 component_running->wait(); 76 orb->unbind_name(label);60 interpolator.unbind(); 77 61 orb->orb->shutdown(0); 78 62