OutputPort1 = InputPort1;
format long
Data_Rate=12;
R=1/2;
Nbpsc=2;
Ncbps=96;
Ndbps=48;
Nfft=64;
Ts=50*10^-9;
modulation_scheme='QPSK';

 cs = length(InputPort1.Sequence);

 if( cs > 0 )
     PSDU=InputPort1.Sequence;
      DATA=data_framing(PSDU,Ndbps);            %%output DATA
        SIGNAL=signaling(PSDU,Data_Rate);	           %%output signal
        encoded_signal=conv_encoderk7(SIGNAL,1/2);        %%input of  viterbib---signal
        encoded_data=conv_encoderk7(DATA,R);               %%input of  viterbib------data
        interleaved_signal=interleaver(encoded_signal,48,1);   %%input of dienterliever signal
        interleaved_data=interleaver(encoded_data,Ncbps,Nbpsc);   %%input of dienterliever data     
        signal_symbols=modulator('BPSK',interleaved_signal,48);    %%input of demapper  signal
        data_symbols=modulator(modulation_scheme,interleaved_data,Ncbps); %%input of demapper data
        
       mod_scheme = 'QPSK';
       received_PSDU=scramble(DATA,zeros(1,6));
       received_PSDU(1:length(PSDU)+17-1)
%         system_test;
        
        %plot(real(data_symbols),imag(data_symbols),'ro')
        carriers_symbols=insert_pilots(signal_symbols,data_symbols);
        ready_to_ifft=insert_padding(carriers_symbols);
        transmitted_symbols=perform_ifft(ready_to_ifft);
        transmitted_ofdm=add_cyclic(transmitted_symbols);                                                                    
        preamble=form_preamble;
        transmitted_ofdm=[preamble transmitted_ofdm];
        transmitted_cont=DAC(transmitted_ofdm,10);
        [Real_Fixed,Imag_Fixed]=fixed([0.04*ones(1,18)+1j*0.04*ones(1,18) transmitted_cont]);
        
        sent=transmitted_cont;
        %sent=0.1*ones(1,1000);
        for i=1:length(sent)
        	data2(2*i-1)=real(sent(i));
        	data2(2*i)=imag(sent(i));
        end
         data2;
         data3=1000.*data2;
          OutputPort1.Sequence= data3;
 end
