#include <ocsOptDemuxer.hh>
Public Member Functions | |
OptDemuxer (OptSignal *WDM_Signal2, OptFilter *TunableFilter2) | |
~OptDemuxer () | |
OptDemuxer (OptSignal *WDM_Signal2, OptFilter *TunableFilter2, OptSignal *SingleChannelSignal2) | |
OptSignal & | ExtractChannel (int ChannelArrayIndex) |
void | DemuxChannel (int ChannelArrayIndex) |
void | PrepareToDemuxChannel (int ChannelArrayIndex) |
void | ExtractSingleChannel (int ChannelArrayIndex) |
Ivan's code. Very similar to DemuxChannel. | |
OptSignal & | ExtractChannelCenterFreq (double CenterFreqOptFilter, BitString *SCBitString, bool DoFilterFlag) |
bool | GetDoAdditionalFiltering (void) |
Private Attributes | |
OptSignal * | WDM_Signal |
OptFilter * | TunableFilter |
OptSignal * | SingleChannelSignal |
int | ChannelArrayIndex |
bool | DoAdditionalFilteringFlag |
OptDemuxer::~OptDemuxer | ( | ) |
void OptDemuxer::DemuxChannel | ( | int | ChannelArrayIndex | ) |
Use this method to demux rather than using OptSignal& ExtractChannel(int ChannelArrayIndex). JZApril 2003 Based on void ExtractSingleChannel(int ChannelArrayIndex);
This method calls OptDemuxer::PrepareToDemuxChannel and then optically filters the signal.
To use the method make the following calls:
SingleChannelSignal = new OptSignal(*WDMSignal);
TunableOptFilter = new OptFilter(InDir + "TunableOptFilter.in", SingleChannelSignal);
oOptDemuxer = new OptDemuxer(WDMSignal,TunableOptFilter,SingleChannelSignal);
oOptDemuxer->DemuxChannel(ChannelArrayIndex);
The last call can be made multiple times throughout the code to demux the current WDMSignal, and can have different ChannelArrayIndexes for the different calls.
The method is more robust than calling OptSignal& OptDemuxer::ExtractChannel(int ChannelArrayIndex)
It is very similar to
void OptDemuxer::ExtractSingleChannel(int ChannelArrayIndex)
The main difference is that in the semianalytical receiver you want to call
void OptDemuxer::PrepareToDemuxChannel(ChannelArrayIndex)
separately from calling void OptFilter::FilterOptSignal(void)
JZ April 2003.
References OptFilter::FilterOptSignal(), PrepareToDemuxChannel(), and TunableFilter.
Referenced by ChiSquareReceiver::ReceiveNoiseFreeSignalAndRecoverClock(), ReceiverSemiAnalytical::ReceiveSignalBackToBackMonteCarlo(), GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized(), ReceiverSemiAnalytical::ReceiveSignalMonteCarlo(), ReceiverSemiAnalytical::ReceiveSignalSemiAnalytical(), GaussianReceiver::ReceiveSignalUnpolarizedNoise(), and GaussianReceiver::RecoverClockAndSetTimeSlices().
OptSignal & OptDemuxer::ExtractChannel | ( | int | ChannelArrayIndex | ) |
References OptSignal::fft, OptSignal::GetAccumulatedFirstOrderDispersion(), OptSignal::GetAccumulatedSecondOrderDispersion(), OptSignal::GetCenterFreq(), OptSignal::GetFrequency(), OptSignal::GetNumChannels(), OptSignal::oBitString, BitString::ReduceToSingleChannelBitString(), OptSignal::SetAccumulatedFirstOrderDispersion(), OptSignal::SetAccumulatedSecondOrderDispersion(), OptSignal::SetFrequency(), OptSignal::SetNumberChannelsForDemuxer(), OptSignal::SetNumChannels(), OptFilter::SetOpticalData(), OptFilter::SetRelativeCenterFreq(), OptSignal::sfftM, SingleChannelSignal, TunableFilter, OptFilter::TunableFilterOptSignal(), and WDM_Signal.
Referenced by ReceiverSubsystem::ReceiveSignal(), and ReceiverSubsystem::ReceiveSignalBackToBack().
OptSignal & OptDemuxer::ExtractChannelCenterFreq | ( | double | CenterFreqOptFilter, | |
BitString * | SCBitString, | |||
bool | DoFilterFlag | |||
) |
Written by JZ (Aug 2001) to demux about a given freq rather than a ch number. The BitString for the demuxed signal is given by SCBitString
References OptSignal::fft, OptSignal::GetCenterFreq(), OptSignal::GetNumChannels(), OptSignal::oBitString, BitString::ReduceToSingleChannelBitString(), OptSignal::SetFrequency(), OptSignal::SetNumberChannelsForDemuxer(), OptSignal::SetNumChannels(), OptFilter::SetOpticalData(), OptFilter::SetRelativeCenterFreq(), OptSignal::sfftM, SingleChannelSignal, TunableFilter, OptFilter::TunableFilterOptSignal(), and WDM_Signal.
Referenced by ReceiverSubsystem::ReceiveSignalBackToBackCenterFreq(), and ReceiverSubsystem::ReceiveSignalCenterFreq().
void OptDemuxer::ExtractSingleChannel | ( | int | ChannelArrayIndex | ) |
Ivan's code. Very similar to DemuxChannel.
References OptSignal::fft, OptSignal::GetCenterFreq(), OptSignal::GetFrequency(), OptSignal::GetNumChannels(), OptSignal::ReduceToSingleChannel(), OptSignal::SetNumChannels(), OptFilter::SetOpticalData(), OptFilter::SetRelativeCenterFreq(), OptSignal::sfftM, SingleChannelSignal, TunableFilter, OptFilter::TunableFilterOptSignal(), and WDM_Signal.
Referenced by ReceiverSubsystem::DemultiplexSingleChannnel().
bool OptDemuxer::GetDoAdditionalFiltering | ( | void | ) | [inline] |
Referenced by ReceiverSubsystem::ReceiveSignal(), and ReceiverSubsystem::ReceiveSignalBackToBack().
void OptDemuxer::PrepareToDemuxChannel | ( | int | ChannelArrayIndex | ) |
Does all of DemuxChannel expcept the actual filtering Used in ReceiverSemiAnalytical. JZApril 2003
This method sets the number of channels of the SingleChannelSignal to 1, reduces the WDM BitString to a SingleChannel BitString, sets the carrier frequency of the only channel in the SingleChannel signal and sets the center frequency of the optical filter. It does not do the actual filtering since we need to do that in the semianalytical receiver
References OptSignal::GetCenterFreq(), OptSignal::GetFrequency(), OptSignal::GetNumChannels(), OptSignal::oBitString, BitString::ReduceToSingleChannelBitString(), OptSignal::SetFrequency(), OptSignal::SetNumberChannelsForDemuxer(), OptSignal::SetNumChannels(), OptFilter::SetRelativeCenterFreq(), SingleChannelSignal, TunableFilter, and WDM_Signal.
Referenced by DemuxChannel(), GaussianReceiver::GaussianReceiver(), ReceiverSemiAnalytical::GetLimaParameters(), ReceiverSemiAnalytical::ReceiverSemiAnalytical(), GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized(), ReceiverSemiAnalytical::ReceiveSignalSemiAnalytical(), and GaussianReceiver::ReceiveSignalUnpolarizedNoise().
int OptDemuxer::ChannelArrayIndex [private] |
bool OptDemuxer::DoAdditionalFilteringFlag [private] |
Referenced by OptDemuxer().
OptSignal* OptDemuxer::SingleChannelSignal [private] |
Referenced by ExtractChannel(), ExtractChannelCenterFreq(), ExtractSingleChannel(), OptDemuxer(), and PrepareToDemuxChannel().
OptFilter* OptDemuxer::TunableFilter [private] |
Referenced by DemuxChannel(), ExtractChannel(), ExtractChannelCenterFreq(), ExtractSingleChannel(), OptDemuxer(), and PrepareToDemuxChannel().
OptSignal* OptDemuxer::WDM_Signal [private] |
Referenced by ExtractChannel(), ExtractChannelCenterFreq(), ExtractSingleChannel(), OptDemuxer(), and PrepareToDemuxChannel().