Changeset 5270
- Timestamp:
- 10/07/07 13:24:41 (6 years ago)
- Location:
- experimental/components/SubchannelSelector/trunk/SubchannelSelector/src
- Files:
-
- 3 modified
-
SubchannelSelector.cpp (modified) (1 diff)
-
SubchannelSelector.h (modified) (1 diff)
-
main.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
experimental/components/SubchannelSelector/trunk/SubchannelSelector/src/SubchannelSelector.cpp
r5267 r5270 112 112 std::cout << "Property id : " << props[i].id << std::endl; 113 113 114 if (strcmp(props[i].id, "DCE:9032b00e-74f4-11dc-a5a4-00123f63025f") == 0) 115 {114 if (strcmp(props[i].id, "DCE:9032b00e-74f4-11dc-a5a4-00123f63025f") == 0) { 115 // subchannel_frequency 116 116 CORBA::Float simple_temp; 117 117 props[i].value >>= simple_temp; 118 118 simple_0_value = simple_temp; 119 } else if (strcmp(props[i].id, "DCE:b56e1f7a-74f4-11dc-b9ef-00123f63025f") == 0) { 120 // decimation rate 121 CORBA::ULong simple_temp; 122 props[i].value >>= simple_temp; 123 simple_0_value = simple_temp; 124 } else { 125 // unknown property 126 std::cerr << "ERROR: SubchannelSelector::configure() unknown property \"" 127 << props[i].id << "\"" << std::endl; 128 throw CF::PropertySet::InvalidConfiguration(); 119 129 } 120 121 if (strcmp(props[i].id, "DCE:b56e1f7a-74f4-11dc-b9ef-00123f63025f") == 0) 122 { 130 } 123 131 } 124 132 -
experimental/components/SubchannelSelector/trunk/SubchannelSelector/src/SubchannelSelector.h
r5267 r5270 87 87 omni_condition *component_running; ///< for component shutdown 88 88 omni_thread *processing_thread; ///< for component writer function 89 90 CORBA::Float simple_0_value;91 CORBA::Ulong simple_1_value;92 89 90 CORBA::Float simple_0_value; 91 CORBA::ULong simple_1_value; 93 92 94 93 // list components provides and uses ports 95 standardInterfaces_i::complexShort_p *dataIn_0;96 standardInterfaces_i::complexShort_u *dataOut_0;94 standardInterfaces_i::complexShort_p *dataIn_0; 95 standardInterfaces_i::complexShort_u *dataOut_0; 97 96 98 97 }; -
experimental/components/SubchannelSelector/trunk/SubchannelSelector/src/main.cpp
r5267 r5270 1 1 /**************************************************************************** 2 2 3 Copyright 200 7Virginia Polytechnic Institute and State University3 Copyright 2006 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE SubchannelSelector. … … 23 23 #include <iostream> 24 24 #include "ossie/ossieSupport.h" 25 #include "ossie/debug.h" 25 26 26 27 #include "SubchannelSelector.h" 27 28 29 using namespace std; 30 using namespace standardInterfaces; // For standard OSSIE interface classes 31 32 28 33 int main(int argc, char* argv[]) 29 30 34 { 31 ossieDebugLevel = 3;35 ossieDebugLevel = 5; 32 36 33 37 ossieSupport::ORB *orb = new ossieSupport::ORB; … … 35 39 omni_condition *component_running = new omni_condition(&component_running_mutex); 36 40 37 ossieSupport::ossieComponent subchannelselector(orb, argc, argv); 41 if (argc != 3) { 42 cout << argv[0] << " <id> <usage name> " << endl; 43 exit (-1); 44 } 45 46 char *uuid = argv[1]; 47 char *label = argv[2]; 48 49 cout << "Identifier - " << uuid << " Label - " << label << endl; 38 50 39 51 SubchannelSelector_i* subchannelselector_servant; … … 42 54 // Create the subchannelselector component servant and object reference 43 55 44 subchannelselector_servant = new SubchannelSelector_i( subchannelselector.getUuid(), component_running);56 subchannelselector_servant = new SubchannelSelector_i(uuid, component_running); 45 57 subchannelselector_var = subchannelselector_servant->_this(); 46 58 47 PortableServer::ObjectId_var servantId = orb->poa->reference_to_id(subchannelselector_var); 48 49 subchannelselector.bind(subchannelselector_var); 59 orb->bind_object_to_name((CORBA::Object_ptr) subchannelselector_var, label); 50 60 51 61 // This bit is ORB specific … … 55 65 56 66 component_running->wait(); 57 58 subchannelselector.unbind(); 59 60 DEBUG(4, SubchannelSelector, "Deactivate object."); 61 orb->poa->deactivate_object(servantId); 62 63 DEBUG(4, SubchannelSelector, "Destroy POA."); 64 orb->poa->destroy(false, false); 65 66 DEBUG(4, SubchannelSelector, "Shutdown orb."); 67 orb->unbind_name(label); 67 68 orb->orb->shutdown(0); 68 69