Changeset 8831

Show
Ignore:
Timestamp:
03/02/09 14:48:22 (4 years ago)
Author:
hvolos
Message:

remove metadata, add frame size properties

Location:
ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/Makefile.am

    r8015 r8831  
    11AM_CXXFLAGS = -Wall  
    22 
    3 bin_PROGRAMS = FrameAssembler_metadata 
     3bin_PROGRAMS = FrameAssembler 
    44bindir = $(prefix)/bin 
    55 
    6 # ---------- FrameAssembler_metadata ---------- 
     6# ---------- FrameAssembler ---------- 
    77 
    8 FrameAssembler_metadata_SOURCES =                \ 
    9     src/FrameAssembler_metadata.cpp              \ 
     8FrameAssembler_SOURCES =                \ 
     9    src/FrameAssembler.cpp              \ 
    1010    src/FrameAssemblerDSP.cpp           \ 
    1111    src/PNCodes.cpp                     \ 
    1212    src/main.cpp 
    1313 
    14 ossieName1 = FrameAssembler_metadata 
     14ossieName1 = FrameAssembler 
    1515xml1dir = $(prefix)/xml/$(ossieName1) 
    1616dist_xml1_DATA =                        \ 
    17     xml/FrameAssembler_metadata.prf.xml          \ 
    18     xml/FrameAssembler_metadata.scd.xml          \ 
    19     xml/FrameAssembler_metadata.spd.xml  
     17    xml/FrameAssembler.prf.xml          \ 
     18    xml/FrameAssembler.scd.xml          \ 
     19    xml/FrameAssembler.spd.xml  
    2020 
    2121# ---------- autotest ---------- 
     
    3131cxxtest: 
    3232        cxxtestgen.py --error-printer -o autotest.cpp   \ 
    33         atsrc/FrameAssembler_metadata_testsuite.h 
     33        atsrc/FrameAssembler_testsuite.h 
    3434 
    3535# ---------- documentation --------- 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/configure.ac

    r8015 r8831  
    1 AC_INIT(FrameAssembler_metadata, 0.7.0) 
     1AC_INIT(FrameAssembler, 0.7.0) 
    22AM_INIT_AUTOMAKE 
    33 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/documentation.txt

    r8015 r8831  
    33Copyright 2007 Virginia Polytechnic Institute and State University 
    44 
    5 This file is part of the OSSIE FrameAssembler_metadata. 
     5This file is part of the OSSIE FrameAssembler. 
    66 
    7 OSSIE FrameAssembler_metadata is free software; you can redistribute it and/or modify 
     7OSSIE FrameAssembler is free software; you can redistribute it and/or modify 
    88it under the terms of the GNU General Public License as published by 
    99the Free Software Foundation; either version 2 of the License, or 
    1010(at your option) any later version. 
    1111 
    12 OSSIE FrameAssembler_metadata is distributed in the hope that it will be useful, 
     12OSSIE FrameAssembler is distributed in the hope that it will be useful, 
    1313but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     
    1616 
    1717You should have received a copy of the GNU General Public License 
    18 along with OSSIE FrameAssembler_metadata; if not, write to the Free Software 
     18along with OSSIE FrameAssembler; if not, write to the Free Software 
    1919Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2020 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/src/FrameAssembler.cpp

    r8827 r8831  
    33Copyright 2007 Virginia Polytechnic Institute and State University 
    44 
    5 This file is part of the OSSIE FrameAssembler_metadata. 
    6  
    7 OSSIE FrameAssembler_metadata is free software; you can redistribute it and/or modify 
     5This file is part of the OSSIE FrameAssembler. 
     6 
     7OSSIE FrameAssembler is free software; you can redistribute it and/or modify 
    88it under the terms of the GNU General Public License as published by 
    99the Free Software Foundation; either version 2 of the License, or 
    1010(at your option) any later version. 
    1111 
    12 OSSIE FrameAssembler_metadata is distributed in the hope that it will be useful, 
     12OSSIE FrameAssembler is distributed in the hope that it will be useful, 
    1313but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     
    1616 
    1717You should have received a copy of the GNU General Public License 
    18 along with OSSIE FrameAssembler_metadata; if not, write to the Free Software 
     18along with OSSIE FrameAssembler; if not, write to the Free Software 
    1919Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2020 
     
    2424#include <string> 
    2525#include <iostream> 
    26 #include "FrameAssembler_metadata.h" 
    27  
    28 FrameAssembler_metadata_i::FrameAssembler_metadata_i(const char *uuid, omni_condition *condition) :  
     26#include "FrameAssembler.h" 
     27 
     28FrameAssembler_i::FrameAssembler_i(const char *uuid, omni_condition *condition) :  
    2929    Resource_impl(uuid), component_running(condition) 
    3030{ 
     
    3232    dataOut_0 = new standardInterfaces_i::complexShort_u("FrameSymbolsOut"); 
    3333 
    34     num_frames_sent_app_1 = 0; 
    35     num_frames_sent_app_2 = 0; 
    36     num_frames_sent_app_5 = 0; 
    37     num_frames_sent_app_6 = 0; 
     34    frame_size_option=1; 
    3835 
    3936    //Create the thread for the writer's processing function  
     
    4542} 
    4643 
    47 FrameAssembler_metadata_i::~FrameAssembler_metadata_i(void) 
     44FrameAssembler_i::~FrameAssembler_i(void) 
    4845{    
    4946    delete dataIn_0; 
     
    5249 
    5350// Static function for omni thread 
    54 void FrameAssembler_metadata_i::Run( void * data ) 
    55 { 
    56     ((FrameAssembler_metadata_i*)data)->ProcessData(); 
    57 } 
    58  
    59 CORBA::Object_ptr FrameAssembler_metadata_i::getPort( const char* portName ) throw ( 
     51void FrameAssembler_i::Run( void * data ) 
     52{ 
     53    ((FrameAssembler_i*)data)->ProcessData(); 
     54} 
     55 
     56CORBA::Object_ptr FrameAssembler_i::getPort( const char* portName ) throw ( 
    6057    CORBA::SystemException, CF::PortSupplier::UnknownPort) 
    6158{ 
    62     DEBUG(3, FrameAssembler_metadata, "getPort() invoked with " << portName) 
     59    DEBUG(3, FrameAssembler, "getPort() invoked with " << portName) 
    6360     
    6461    CORBA::Object_var p; 
     
    7875} 
    7976 
    80 void FrameAssembler_metadata_i::start() throw (CORBA::SystemException,  
     77void FrameAssembler_i::start() throw (CORBA::SystemException,  
    8178    CF::Resource::StartError) 
    8279{ 
    83     DEBUG(3, FrameAssembler_metadata, "start() invoked") 
    84 } 
    85  
    86 void FrameAssembler_metadata_i::stop() throw (CORBA::SystemException, CF::Resource::StopError)  
     80    DEBUG(3, FrameAssembler, "start() invoked") 
     81} 
     82 
     83void FrameAssembler_i::stop() throw (CORBA::SystemException, CF::Resource::StopError)  
    8784 
    88     DEBUG(3, FrameAssembler_metadata, "stop() invoked") 
    89 } 
    90  
    91 void FrameAssembler_metadata_i::releaseObject() throw (CORBA::SystemException, 
     85    DEBUG(3, FrameAssembler, "stop() invoked") 
     86} 
     87 
     88void FrameAssembler_i::releaseObject() throw (CORBA::SystemException, 
    9289    CF::LifeCycle::ReleaseError) 
    9390{ 
    94     DEBUG(3, FrameAssembler_metadata, "releaseObject() invoked") 
     91    DEBUG(3, FrameAssembler, "releaseObject() invoked") 
    9592     
    9693    component_running->signal(); 
    9794} 
    9895 
    99 void FrameAssembler_metadata_i::initialize() throw (CF::LifeCycle::InitializeError, 
     96void FrameAssembler_i::initialize() throw (CF::LifeCycle::InitializeError, 
    10097    CORBA::SystemException) 
    10198{ 
    102     DEBUG(3, FrameAssembler_metadata, "initialize() invoked") 
    103 } 
    104  
    105 void FrameAssembler_metadata_i::configure(const CF::Properties& props) 
     99    DEBUG(3, FrameAssembler, "initialize() invoked") 
     100} 
     101 
     102void FrameAssembler_i::configure(const CF::Properties& props) 
    106103throw (CORBA::SystemException, 
    107104    CF::PropertySet::InvalidConfiguration, 
    108105    CF::PropertySet::PartialConfiguration) 
    109106{ 
    110     DEBUG(3, FrameAssembler_metadata, "configure() invoked") 
     107    DEBUG(3, FrameAssembler, "configure() invoked") 
    111108     
    112109    std::cout << "props length : " << props.length() << std::endl; 
     
    115112        std::cout << "Property id : " << props[i].id << std::endl; 
    116113 
    117         if (strcmp(props[i].id, "DCE:c15e70e4-96e4-4cc8-b1f0-06cb301f6c2e") == 0) { 
     114        if (strcmp(props[i].id, "DCE:a15e70e4-96e4-4cc8-b1f0-06cb301f6c2e") == 0) { 
    118115            // Modulation type 
    119116            const char * prop_str; 
     
    133130            } else { 
    134131                // unknown property 
    135                 std::cerr << "ERROR: FrameAssembler_metadata::configure() unknown mod. scheme " 
     132                std::cerr << "ERROR: FrameAssembler::configure() unknown mod. scheme " 
    136133                          << prop_str << std::endl; 
    137134                throw CF::PropertySet::InvalidConfiguration(); 
    138135            } 
    139             ///\todo catch exception thrown by FrameAssembler_metadataDSP::ConfigureModulationScheme() 
    140  
    141         } else if (strcmp(props[i].id, "DCE:06b798ba-5412-4bbe-bf0b-8ca665d25b83") == 0) { 
     136            ///\todo catch exception thrown by FrameAssemblerDSP::ConfigureModulationScheme() 
     137 
     138        } else if (strcmp(props[i].id, "DCE:96b798ba-5412-4bbe-bf0b-8ca665d25b83") == 0) { 
    142139            // Frame size 
    143140            CORBA::UShort simple_temp; 
    144141            props[i].value >>= simple_temp; 
    145  
    146             ConfigureFrameSize(simple_temp); 
     142            frame_size_option=simple_temp; 
     143            ConfigureFrameSize(frame_size_option); 
     144            DEBUG(3, FrameAssembler, "Frame Size Option "<<frame_size_option<<" read and configured") 
     145        } else if (strcmp(props[i].id, "DCE:cdac2d50-214c-4c47-8a6d-d9ec453b3b3c") == 0) { 
     146            CORBA::UShort simple_temp; 
     147            props[i].value >>= simple_temp; 
     148            SetFrameSize(simple_temp,1);            
     149        } else if (strcmp(props[i].id, "DCE:a6caa288-08d2-4f0e-b0f0-f34fa513ce3d") == 0) { 
     150            CORBA::UShort simple_temp; 
     151            props[i].value >>= simple_temp; 
     152            SetFrameSize(simple_temp,2); 
     153        } else if (strcmp(props[i].id, "DCE:bcf3ff9b-9f9d-4498-b29a-78f813678271") == 0) { 
     154            CORBA::UShort simple_temp; 
     155            props[i].value >>= simple_temp; 
     156            SetFrameSize(simple_temp,3); 
     157        } else if (strcmp(props[i].id, "DCE:34311a06-2055-4490-a949-478786cad4d4") == 0) { 
     158            CORBA::UShort simple_temp; 
     159            props[i].value >>= simple_temp; 
     160            SetFrameSize(simple_temp,4); 
    147161 
    148162        } else { 
    149163            // unknown property 
    150             std::cerr << "ERROR: FrameAssembler_metadata::configure() unknown property" << std::endl; 
     164            std::cerr << "ERROR: FrameAssembler::configure() unknown property" << std::endl; 
    151165            throw CF::PropertySet::InvalidConfiguration(); 
    152166        } 
    153167    } 
    154  
    155 } 
    156  
    157 void FrameAssembler_metadata_i::ConfigureModulationSchemeOnMetaData() { 
    158     switch (metadata->modulation_scheme.scheme) { 
    159     case standardInterfaces::ModulationScheme::PSK: 
    160         switch (metadata->modulation_scheme.M) { 
    161         case 2: 
    162             ConfigureModulationScheme(SigProc::BPSK); 
    163             DEBUG(5, FrameAssembler_metadata, "Frame mod set to BPSK"); 
    164             break; 
    165         case 4: 
    166             ConfigureModulationScheme(SigProc::QPSK); 
    167             DEBUG(5, FrameAssembler_metadata, "Frame mod set to QPSK"); 
    168             break; 
    169         case 8: 
    170             ConfigureModulationScheme(SigProc::PSK8); 
    171             DEBUG(5, FrameAssembler_metadata, "Frame mod set to 8PSK"); 
    172             break; 
    173         default: 
    174             std::cerr << "FrameAssembler_metadata-metadata: Unsupported PSK modulation depth" << std::endl; 
    175             throw 0; 
    176         } 
    177         break; 
    178     case standardInterfaces::ModulationScheme::QAM: 
    179         switch (metadata->modulation_scheme.M) { 
    180         case 4: 
    181             ConfigureModulationScheme(SigProc::QPSK); 
    182             DEBUG(5, FrameAssembler_metadata, "Frame mod set to QPSK (4QAM)"); 
    183             break; 
    184         case 16: 
    185             ConfigureModulationScheme(SigProc::QAM16); 
    186             DEBUG(5, FrameAssembler_metadata, "Frame mod set to 16QAM"); 
    187             break; 
    188         default: 
    189             std::cerr << "FrameAssembler_metadata-metadata: Unsupported QAM modulation depth" << std::endl; 
    190             throw 0; 
    191         } 
    192         break; 
    193     case standardInterfaces::ModulationScheme::PAM: 
    194         switch (metadata->modulation_scheme.M) { 
    195         case 4: 
    196             ConfigureModulationScheme(SigProc::PAM4); 
    197             DEBUG(5, FrameAssembler_metadata, "Frame mod set to 4PAM"); 
    198             break; 
    199         default: 
    200             std::cerr << "FrameAssembler_metadata-metadata: Unsupported PAM modulation depth" << std::endl; 
    201             throw 0; 
    202         } 
    203         break; 
    204     case standardInterfaces::ModulationScheme::UNKNOWN: 
    205     default:; 
    206     } 
    207 } 
    208  
    209  
    210  
    211  
    212 void FrameAssembler_metadata_i::ProcessData() 
    213 { 
    214     DEBUG(3, FrameAssembler_metadata, "ProcessData() invoked") 
     168     
     169    //Update frame size 
     170    ConfigureFrameSize(frame_size_option); 
     171    DEBUG(3, FrameAssembler, "Frame Size Option "<<frame_size_option<<" configured") 
     172 
     173} 
     174 
     175 
     176 
     177void FrameAssembler_i::ProcessData() 
     178{ 
     179    DEBUG(3, FrameAssembler, "ProcessData() invoked") 
    215180 
    216181    PortTypes::ShortSequence I_out_header, Q_out_header; 
     
    270235        while ( numFrameSymbolsAssembled < (frameSize-1) ) { 
    271236            // Get data from port 
    272             //dataIn_0->getData(I_in_0, Q_in_0, metadata); 
    273237            dataIn_0->getData(I_in_0, Q_in_0); 
    274238            // Read input data length 
    275239            N_in = I_in_0->length(); 
    276             DEBUG(1, FrameAssembler_metadata, "got " << N_in << " samples"); 
     240            DEBUG(1, FrameAssembler, "got " << N_in << " samples"); 
    277241 
    278242 
    279243/* HV 
    280             if (metadata->app_id==0) { 
    281                 // control packet; configure 
    282                 DEBUG(1, FrameAssembler_metadata, "configuring end-of-frame control (app_id = 0)"); 
    283                 if (N_in != 1024) { 
    284                     std::cerr << "ERROR! FrameAssembler_metadata: control packet is wrong length!" 
    285                               << std::endl; 
    286                     throw 0; 
    287                 } 
    288244 
    289245                for (unsigned int i=0; i<N_in; i++) { 
     
    298254            if ( numFrameSymbolsAssembled==0 ) { 
    299255                // first packet 
    300                 ConfigureModulationScheme(SigProc::QPSK); 
     256                //ConfigureModulationScheme(SigProc::QPSK); 
    301257                 
    302                 /* HV 
    303                 ConfigureModulationSchemeOnMetaData(); 
    304  
    305                 if (metadata->app_id==5) { 
    306                     DEBUG(1, FrameAssembler_metadata, "configuring special control frame (app_id = 5)"); 
    307                     ConfigureFrameType(FRAME_TYPE_CONTROL); 
    308                     // control frame 
    309                     if (N_in != frameSize) { 
    310                         std::cerr << "ERROR! FrameAssembler_metadata: control packet (app_id=5) is wrong length!" 
    311                                   << std::endl; 
    312                         throw 0; 
    313                     } 
    314                     num_frames_sent_app_5++; 
    315                 } else if (metadata->app_id==6) { 
    316                     DEBUG(1, FrameAssembler_metadata, "configuring special beacon frame (app_id = 6)"); 
    317                     ConfigureFrameType(FRAME_TYPE_CONTROL); 
    318                     // control frame 
    319                     if (N_in != frameSize) { 
    320                         std::cerr << "ERROR! FrameAssembler_metadata: control packet (app_id=6) is wrong length!" 
    321                                   << std::endl; 
    322                         throw 0; 
    323                     } 
    324                     num_frames_sent_app_6++; 
    325                 } else if (metadata->app_id==1) { 
    326                     // audio data 
    327                     ConfigureFrameType(FRAME_TYPE_DATA); 
    328                     ///todo configure for BPSK 
    329                     if (metadata->modulation_scheme.M == 4) 
    330                         ConfigureFrameSize(8192);   // QPSK 
    331                     else 
    332                         ConfigureFrameSize(4096);   // 16-QAM 
    333                     num_frames_sent_app_1++; 
    334                 } else if (metadata->app_id==2) { 
    335                     // text data 
    336                     ConfigureFrameType(FRAME_TYPE_DATA); 
    337                     ConfigureFrameSize(512); 
    338                     num_frames_sent_app_2++; 
    339                 } else { 
    340                     std::cerr << "ERROR! FrameAssembler_metadata: Unknown app_id: " 
    341                               << metadata->app_id << std::endl; 
    342                     throw 0; 
    343                 } 
    344                 */ 
    345                  
    346                  //HV audio data 
     258 
    347259                 ConfigureFrameType(FRAME_TYPE_DATA); 
    348                 ///todo configure for BPSK 
    349                  //if (metadata->modulation_scheme.M == 4) 
    350                    //     ConfigureFrameSize(8192);   // QPSK 
    351                     //else 
    352                         ConfigureFrameSize(4096);   // 16-QAM 
    353                     num_frames_sent_app_1++; 
     260 
     261                ConfigureFrameSize(frame_size_option); 
     262                     
    354263 
    355264                I_out_data.length(frameSize); 
     
    357266            } 
    358267 
    359             DEBUG(1, FrameAssembler_metadata, "Assembling " << N_in << " symbols (max: " << frameSize); 
     268            DEBUG(1, FrameAssembler, "Assembling " << N_in << " symbols (max: " << frameSize); 
    360269 
    361270            for (unsigned int i=0; i<N_in; i++) { 
     
    373282 
    374283        // ASSEMBLE_PREAMBLE 
    375         DEBUG(4, FrameAssembler_metadata, "Assembling preamble") 
    376  //HV       metadata->port_id = 0; 
     284        DEBUG(4, FrameAssembler, "Assembling preamble") 
     285 
    377286 
    378287        // push ramp-up preamble phasing pattern 
    379         DEBUG(7, FrameAssembler_metadata, "pushing ramp up phasing " << I_out_ramp_up.length() << " frame samples") 
    380 //        dataOut_0->pushPacket(I_out_ramp_up, Q_out_ramp_up, *metadata); 
     288        DEBUG(7, FrameAssembler, "pushing ramp up phasing " << I_out_ramp_up.length() << " frame samples") 
    381289        dataOut_0->pushPacket(I_out_ramp_up, Q_out_ramp_up); 
    382290 
    383291        // push preamble 
    384292        unsigned int phasing_pattern_length; 
    385         /* HV 
    386         if (metadata->app_id==6) 
    387             phasing_pattern_length = 16; 
    388         else if (metadata->app_id==1) 
    389             phasing_pattern_length = 32; 
    390         else if (metadata->app_id==0) 
    391             phasing_pattern_length = 8; 
    392         else if (metadata->app_id==5) 
    393             phasing_pattern_length = 32; 
    394         else 
    395             phasing_pattern_length = 8; 
    396             */ 
    397293             
    398             phasing_pattern_length = 32; 
     294         phasing_pattern_length = 32; 
    399295 
    400296        for (unsigned int i=0; i<phasing_pattern_length; i++) { 
    401             DEBUG(7, FrameAssembler_metadata, "pushing phasing " << I_out_phasing_pattern.length() << " frame samples") 
    402             //dataOut_0->pushPacket(I_out_phasing_pattern, Q_out_phasing_pattern, *metadata); 
     297            DEBUG(7, FrameAssembler, "pushing phasing " << I_out_phasing_pattern.length() << " frame samples") 
    403298            dataOut_0->pushPacket(I_out_phasing_pattern, Q_out_phasing_pattern); 
    404299        } 
    405300 
    406301        // ASSEMBLE_HEADER 
    407         DEBUG(4, FrameAssembler_metadata, "Assembling header") 
     302        DEBUG(4, FrameAssembler, "Assembling header") 
    408303        // copy header 
    409304        I_out_header.length(512); 
     
    416311 
    417312        // push data 
    418         DEBUG(7, FrameAssembler_metadata, "pushing header " << I_out_header.length() << " frame samples") 
    419         //dataOut_0->pushPacket(I_out_header, Q_out_header, *metadata); 
     313        DEBUG(7, FrameAssembler, "pushing header " << I_out_header.length() << " frame samples") 
     314 
    420315        dataOut_0->pushPacket(I_out_header, Q_out_header); 
    421316 
     
    436331                I_out_0.length(j); 
    437332                Q_out_0.length(j); 
    438                 DEBUG(7, FrameAssembler_metadata, "pushing frame " << I_out_0.length() << " frame samples") 
    439                 //dataOut_0->pushPacket(I_out_0, Q_out_0, *metadata); 
     333                DEBUG(7, FrameAssembler, "pushing frame " << I_out_0.length() << " frame samples") 
    440334                dataOut_0->pushPacket(I_out_0, Q_out_0); 
    441335                j=0; 
     
    449343            // No need to push additional control information as internal frame data 
    450344            // are already control 
    451             DEBUG(7, FrameAssembler_metadata, "pushing control " << I_out_control.length() << " frame samples") 
    452       //HV      metadata->port_id = 1;//127; 
    453             //dataOut_0->pushPacket(I_out_control, Q_out_control, *metadata); 
    454       //HV no EOM      dataOut_0->pushPacket(I_out_control, Q_out_control); 
    455       //HV      metadata->port_id = 0; 
     345            DEBUG(7, FrameAssembler, "pushing control " << I_out_control.length() << " frame samples") 
     346 
     347      //no EOM      dataOut_0->pushPacket(I_out_control, Q_out_control); 
     348 
    456349        } 
    457350 
    458351        // push ramp-down phasing pattern 
    459         DEBUG(7, FrameAssembler_metadata, "pushing ramp down phasing " << I_out_ramp_up.length() << " frame samples") 
    460 //        dataOut_0->pushPacket(I_out_ramp_down, Q_out_ramp_down, *metadata); 
     352        DEBUG(7, FrameAssembler, "pushing ramp down phasing " << I_out_ramp_up.length() << " frame samples") 
     353 
    461354        dataOut_0->pushPacket(I_out_ramp_down, Q_out_ramp_down); 
    462355 
    463         if (ossieDebugLevel >= 4) { 
    464             std::cout << "Frame count:  " 
    465                       << "app_1(" << num_frames_sent_app_1 << ")  " 
    466                       << "app_2(" << num_frames_sent_app_2 << ")  " 
    467                       << "app_5(" << num_frames_sent_app_5 << ")  " 
    468                       << "app_6(" << num_frames_sent_app_6 << ")  " 
    469                       << "total: " << num_frames_sent_app_1+num_frames_sent_app_2 
    470                       << std::endl; 
    471         } 
    472356    } 
    473357 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/src/FrameAssembler.h

    r8827 r8831  
    33Copyright 2007 Virginia Polytechnic Institute and State University 
    44 
    5 This file is part of the OSSIE FrameAssembler_metadata. 
     5This file is part of the OSSIE FrameAssembler. 
    66 
    7 OSSIE FrameAssembler_metadata is free software; you can redistribute it and/or modify 
     7OSSIE FrameAssembler is free software; you can redistribute it and/or modify 
    88it under the terms of the GNU General Public License as published by 
    99the Free Software Foundation; either version 2 of the License, or 
    1010(at your option) any later version. 
    1111 
    12 OSSIE FrameAssembler_metadata is distributed in the hope that it will be useful, 
     12OSSIE FrameAssembler is distributed in the hope that it will be useful, 
    1313but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     
    1616 
    1717You should have received a copy of the GNU General Public License 
    18 along with OSSIE FrameAssembler_metadata; if not, write to the Free Software 
     18along with OSSIE FrameAssembler; if not, write to the Free Software 
    1919Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2020 
     
    2222 
    2323 
    24 #ifndef FRAMEASSEMBLER_METADATA_IMPL_H 
    25 #define FRAMEASSEMBLER_METADATA_IMPL_H 
     24#ifndef FRAMEASSEMBLER_IMPL_H 
     25#define FRAMEASSEMBLER_IMPL_H 
    2626 
    2727#include <stdlib.h> 
     
    4040 * 
    4141 */ 
    42 class FrameAssembler_metadata_i : public virtual Resource_impl, public FrameAssemblerDSP 
     42class FrameAssembler_i : public virtual Resource_impl, public FrameAssemblerDSP 
    4343{ 
    4444  public: 
    4545    /// Initializing constructor 
    46     FrameAssembler_metadata_i(const char *uuid, omni_condition *sem); 
     46    FrameAssembler_i(const char *uuid, omni_condition *sem); 
    4747 
    4848    /// Destructor 
    49     ~FrameAssembler_metadata_i(void); 
     49    ~FrameAssembler_i(void); 
    5050 
    5151    /// Static function for omni thread 
     
    7777  private: 
    7878    /// Disallow default constructor 
    79     FrameAssembler_metadata_i(); 
     79    FrameAssembler_i(); 
    8080 
    8181    /// Disallow copy constructor 
    82     FrameAssembler_metadata_i(FrameAssembler_metadata_i&); 
     82    FrameAssembler_i(FrameAssembler_i&); 
    8383 
    8484    /// Main signal processing method 
     
    9393    standardInterfaces_i::complexShort_p *dataIn_0; 
    9494    standardInterfaces_i::complexShort_u *dataOut_0; 
    95     standardInterfaces::MetaData *metadata; 
    9695 
    97     unsigned int num_frames_sent_app_1; 
    98     unsigned int num_frames_sent_app_2; 
    99     unsigned int num_frames_sent_app_5; 
    100     unsigned int num_frames_sent_app_6; 
     96    unsigned int frame_size_option; 
     97     
     98    //unsigned int numFrameSymbolsAssembled; 
     99     
     100     
    101101 
    102102}; 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/src/FrameAssemblerDSP.cpp

    r5638 r8831  
    3838        controlBlock[i] = pnControlCode; 
    3939 
     40    numFrameSymbolsAssembled = 0; 
     41     
     42    FRAME_SIZE_1=512;            ///< Frame size option 1 
     43    FRAME_SIZE_2=2048;           ///< Frame size option 2 
     44    FRAME_SIZE_3=4096;           ///< Frame size option 3 
     45    FRAME_SIZE_4=8192;           ///< Frame size option 4 
     46     
    4047    ConfigureModulationScheme( BPSK ); 
    41     ConfigureFrameSize( FRAME_SIZE_1 ); 
     48    ConfigureFrameSize(1); 
    4249    ConfigureFrameType( FRAME_TYPE_DATA ); 
    43  
    44     numFrameSymbolsAssembled = 0; 
    4550} 
    4651 
     
    101106        controlBlock[6] = pnControlCode;    // 1 
    102107        frameType = FRAME_TYPE_CONTROL; 
    103         ConfigureFrameSize(512); 
     108        ConfigureFrameSize(1); 
    104109        break; 
    105110    default: 
     
    116121void FrameAssemblerDSP::ConfigureFrameSize(unsigned int _fs) 
    117122{ 
    118     switch (_fs) { 
    119     case FRAME_SIZE_1: 
     123    switch (_fs){ 
     124    case 1: 
    120125        frameSize = FRAME_SIZE_1; 
    121126        controlBlock[3] = pnControlCodeInv; 
    122127        controlBlock[4] = pnControlCodeInv; 
    123         break; 
    124     case FRAME_SIZE_2: 
     128        break; 
     129    case 2: 
    125130        frameSize = FRAME_SIZE_2; 
    126131        controlBlock[3] = pnControlCodeInv; 
    127132        controlBlock[4] = pnControlCode; 
    128         break; 
    129     case FRAME_SIZE_3: 
     133        break; 
     134    case 3: 
    130135        frameSize = FRAME_SIZE_3; 
    131136        controlBlock[3] = pnControlCode; 
    132137        controlBlock[4] = pnControlCodeInv; 
    133         break; 
    134     case FRAME_SIZE_4: 
     138        break; 
     139    case 4: 
    135140        frameSize = FRAME_SIZE_4; 
    136141        controlBlock[3] = pnControlCode; 
    137142        controlBlock[4] = pnControlCode; 
    138         break; 
     143        break; 
    139144    default: 
    140145        // unsupported frame size 
     
    142147                  << "unsupported frame size (" << _fs << ")" << std::endl; 
    143148        std::cout << "  => using " << FRAME_SIZE_1 << " instead" << std::endl; 
    144         ConfigureFrameSize(FRAME_SIZE_1); 
    145     } 
     149        ConfigureFrameSize(1); 
     150    } 
     151     
     152     //std::cout << "FrameAssemblerDSP::ConfigureFrameSize(): "<<frameSize<<std::endl; 
    146153} 
    147154 
     
    212219} 
    213220 
    214  
     221void FrameAssemblerDSP::SetFrameSize(unsigned int inframesize, unsigned int inframesizeno) 
     222{ 
     223 switch ( inframesizeno ) { 
     224    case 0: 
     225       std::cerr << "ERROR: FrameSynchronizerDSP::SetFrameSize:0 frame size option not allowed to be set"<<std::endl; 
     226      throw 0; 
     227      break; 
     228   case 1: 
     229      FRAME_SIZE_1=inframesize; 
     230      break; 
     231   case 2: 
     232      FRAME_SIZE_2=inframesize; 
     233      break; 
     234   case 3: 
     235      FRAME_SIZE_3=inframesize; 
     236      break; 
     237   case 4: 
     238      FRAME_SIZE_4=inframesize; 
     239      break; 
     240   default: 
     241      std::cerr << "ERROR: FrameSynchronizerDSP::SetFrameSize:Invalid frame size option"<<std::endl; 
     242      throw 0; 
     243   } 
     244 
     245} 
     246 
     247 
     248unsigned int FrameAssemblerDSP::GetFrameSize(unsigned int inframesizeno) 
     249{ 
     250  switch ( inframesizeno ) { 
     251    case 0: 
     252      return frameSize; 
     253      break; 
     254   case 1: 
     255      return FRAME_SIZE_1; 
     256      break; 
     257   case 2: 
     258      return FRAME_SIZE_2; 
     259      break; 
     260   case 3: 
     261      return FRAME_SIZE_3; 
     262      break; 
     263   case 4: 
     264      return FRAME_SIZE_4; 
     265      break; 
     266   default: 
     267      std::cerr << "ERROR: FrameSynchronizerDSP::GetFrameSize:Invalid frame size option"<<std::endl; 
     268      throw 0; 
     269   } 
     270 
     271} 
     272 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/src/FrameAssemblerDSP.h

    r5630 r8831  
    2929#include "PNCodes.h" 
    3030 
    31 #define FRAME_SIZE_1 2048   ///< Frame size option 1 
    32 #define FRAME_SIZE_2 4096   ///< Frame size option 2 
    33 #define FRAME_SIZE_3 8192   ///< Frame size option 3 
    34 #define FRAME_SIZE_4 512    ///< Frame size option 4 
     31//#define FRAME_SIZE_1 2048   ///< Frame size option 1 
     32//#define FRAME_SIZE_2 4096   ///< Frame size option 2 
     33//#define FRAME_SIZE_3 8192   ///< Frame size option 3 
     34//#define FRAME_SIZE_4 512    ///< Frame size option 4 
    3535 
    3636 
     
    4848    /// Destructor 
    4949    ~FrameAssemblerDSP(); 
     50     
     51    void SetFrameSize(unsigned int inframesize, unsigned int inframesizeno); 
     52 
     53    unsigned int GetFrameSize(unsigned int inframesizeno); 
    5054 
    5155  protected: 
     
    6165    /// 
    6266    unsigned int frameSize; 
     67     
     68    unsigned int FRAME_SIZE_1,FRAME_SIZE_2,FRAME_SIZE_3,FRAME_SIZE_4; 
    6369 
    6470    /// 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/src/main.cpp

    r8015 r8831  
    33Copyright 2006 Virginia Polytechnic Institute and State University 
    44 
    5 This file is part of the OSSIE FrameAssembler_metadata. 
     5This file is part of the OSSIE FrameAssembler. 
    66 
    7 OSSIE FrameAssembler_metadata is free software; you can redistribute it and/or modify 
     7OSSIE FrameAssembler is free software; you can redistribute it and/or modify 
    88it under the terms of the GNU General Public License as published by 
    99the Free Software Foundation; either version 2 of the License, or 
    1010(at your option) any later version. 
    1111 
    12 OSSIE FrameAssembler_metadata is distributed in the hope that it will be useful, 
     12OSSIE FrameAssembler is distributed in the hope that it will be useful, 
    1313but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     
    1616 
    1717You should have received a copy of the GNU General Public License 
    18 along with OSSIE FrameAssembler_metadata; if not, write to the Free Software 
     18along with OSSIE FrameAssembler; if not, write to the Free Software 
    1919Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2020 
     
    2525#include "ossie/debug.h" 
    2626 
    27 #include "FrameAssembler_metadata.h" 
     27#include "FrameAssembler.h" 
    2828 
    2929using namespace std; 
     
    4848    cout << "Identifier - " << uuid << "  Label - " << label << endl; 
    4949 
    50     FrameAssembler_metadata_i* frameassembler_servant; 
     50    FrameAssembler_i* frameassembler_servant; 
    5151    CF::Resource_var frameassembler_var; 
    5252 
    5353    // Create the frameassembler component servant and object reference 
    5454 
    55     frameassembler_servant = new FrameAssembler_metadata_i(uuid, component_running); 
     55    frameassembler_servant = new FrameAssembler_i(uuid, component_running); 
    5656    frameassembler_var = frameassembler_servant->_this(); 
    5757 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/xml/FrameAssembler.prf.xml

    r8827 r8831  
    44<!--Powered by Python--> 
    55<properties> 
    6     <simple type="string" id="DCE:c15e70e4-96e4-4cc8-b1f0-06cb301f6c2e" name="mod_type" mode="readwrite"> 
     6    <simple type="string" id="DCE:a15e70e4-96e4-4cc8-b1f0-06cb301f6c2e" name="mod_type" mode="readwrite"> 
    77        <description>Modulation type: BPSK, QPSK, 8PSK, 16QAM</description> 
    88        <value>BPSK</value> 
    99        <kind kindtype="configure"/> 
    1010    </simple> 
    11     <simple type="ushort" id="DCE:06b798ba-5412-4bbe-bf0b-8ca665d25b83" name="frame_size" mode="readwrite"> 
    12         <description>Frame size (number of modulated symbols): 2048, 4096, 8192, 16384</description> 
     11    <simple type="ushort" id="DCE:96b798ba-5412-4bbe-bf0b-8ca665d25b83" name="FrameSizeOptionNumber" mode="readwrite"> 
     12        <description>Frame Size Option Number</description> 
     13        <value>1</value> 
     14        <kind kindtype="configure"/> 
     15    </simple> 
     16    <simple type="ushort" id="DCE:cdac2d50-214c-4c47-8a6d-d9ec453b3b3c" name="FrameSizeOption1" mode="readwrite"> 
     17        <description>Frame Size for Option 1</description>  
     18        <value>512</value> 
     19        <kind kindtype="configure"/> 
     20    </simple> 
     21    <simple type="ushort" id="DCE:a6caa288-08d2-4f0e-b0f0-f34fa513ce3d" name="FrameSizeOption2" mode="readwrite"> 
     22        <description>Frame Size for Option 2</description>  
    1323        <value>2048</value> 
    1424        <kind kindtype="configure"/> 
    1525    </simple> 
     26    <simple type="ushort" id="DCE:bcf3ff9b-9f9d-4498-b29a-78f813678271" name="FrameSizeOption3" mode="readwrite"> 
     27        <description>Frame Size for Option 3</description>  
     28        <value>4096</value> 
     29        <kind kindtype="configure"/> 
     30    </simple> 
     31    <simple type="ushort" id="DCE:34311a06-2055-4490-a949-478786cad4d4" name="FrameSizeOption4" mode="readwrite"> 
     32        <description>Frame Size for Option 4</description>  
     33        <value>8192</value> 
     34        <kind kindtype="configure"/> 
     35    </simple> 
    1636</properties> 
  • ossiedev/branches/hvolos/packetwfrm/components/FrameAssembler/xml/FrameAssembler.spd.xml

    r8827 r8831  
    33<!--Created with OSSIE WaveDev Beta Version 0.6.0b--> 
    44<!--Powered by Python--> 
    5 <softpkg name="FrameAssembler_metadata" id="DCE:fd67fe3a-ec3b-45f6-8c2b-b4cdab07ad56"> 
     5<softpkg name="FrameAssembler" id="DCE:ad67fe3a-ec3b-45f6-8c2b-b4cdab07ad56"> 
    66    <title>Frame assembler component</title> 
    77    <description>Adds BPSK preamble header information for assembling frames</description> 
     
    1212    </author> 
    1313    <propertyfile type="PRF"> 
    14         <localfile name="xml/FrameAssembler_metadata/FrameAssembler_metadata.prf.xml"/> 
     14        <localfile name="xml/FrameAssembler/FrameAssembler.prf.xml"/> 
    1515    </propertyfile> 
    1616    <descriptor> 
    17         <localfile name="xml/FrameAssembler_metadata/FrameAssembler_metadata.scd.xml"/> 
     17        <localfile name="xml/FrameAssembler/FrameAssembler.scd.xml"/> 
    1818    </descriptor> 
    19     <implementation id="DCE:a2a578b9-6ca0-4e20-9375-196a5f2a8121"> 
     19    <implementation id="DCE:d2a578b9-6ca0-4e20-9375-196a5f2a8121"> 
    2020        <description>Default implementation description</description>  
    2121        <code type="Executable"> 
    22             <localfile name="bin/FrameAssembler_metadata"/> 
     22            <localfile name="bin/FrameAssembler"/> 
    2323        </code> 
    2424        <processor name="x86"/>