本文整理汇总了C++中ConfigFile::Phase方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigFile::Phase方法的具体用法?C++ ConfigFile::Phase怎么用?C++ ConfigFile::Phase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigFile
的用法示例。
在下文中一共展示了ConfigFile::Phase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetSettings
// pull settings from the configuration file
GnuRadarSettingsPtr GetSettings( ConfigFile& configuration ) {
GnuRadarSettingsPtr settings( new GnuRadarSettings() );
settings->numChannels = configuration.NumChannels();
settings->decimationRate = configuration.Decimation();
settings->fpgaFileName = configuration.FPGAImage();
//Program GNURadio
for ( int i = 0; i < configuration.NumChannels(); ++i ) {
settings->Tune ( i, configuration.DDC ( i ) );
settings->Phase( i, configuration.Phase( i ) );
}
//change these as needed
settings->fUsbBlockSize = 0;
settings->fUsbNblocks = 0;
settings->mux = 0xf3f2f1f0;
return settings;
}
示例2: throw
Hdf5Ptr SetupHDF5( ConfigFile& configuration ) throw( H5::Exception )
{
std::string fileSet = configuration.DataFileBaseName();
Hdf5Ptr h5File_( new HDF5 ( fileSet , hdf5::WRITE ) );
h5File_->Description ( "GnuRadar Software" + configuration.Version() );
h5File_->WriteStrAttrib ( "START_TIME", currentTime.GetTime() );
h5File_->WriteStrAttrib ( "INSTRUMENT", configuration.Receiver() );
h5File_->WriteAttrib<int> ( "CHANNELS", configuration.NumChannels(),
H5::PredType::NATIVE_INT, H5::DataSpace() );
h5File_->WriteAttrib<double> ( "SAMPLE_RATE", configuration.SampleRate(),
H5::PredType::NATIVE_DOUBLE, H5::DataSpace() );
h5File_->WriteAttrib<double> ( "BANDWIDTH", configuration.Bandwidth(),
H5::PredType::NATIVE_DOUBLE, H5::DataSpace() );
h5File_->WriteAttrib<int> ( "DECIMATION", configuration.Decimation(),
H5::PredType::NATIVE_INT, H5::DataSpace() );
h5File_->WriteAttrib<double> ( "OUTPUT_RATE", configuration.OutputRate(),
H5::PredType::NATIVE_DOUBLE, H5::DataSpace() );
h5File_->WriteAttrib<double> ( "IPP", configuration.IPP(),
H5::PredType::NATIVE_DOUBLE, H5::DataSpace() );
h5File_->WriteAttrib<double> ( "RF", configuration.TxCarrier() ,
H5::PredType::NATIVE_DOUBLE, H5::DataSpace() );
for ( int i = 0; i < configuration.NumChannels(); ++i ) {
h5File_->WriteAttrib<double> (
"DDC" + lexical_cast<string> ( i ),
configuration.DDC ( i ),
H5::PredType::NATIVE_DOUBLE,
H5::DataSpace()
);
h5File_->WriteAttrib<double> (
"PHASE" + lexical_cast<string> ( i ),
configuration.Phase ( i ),
H5::PredType::NATIVE_DOUBLE,
H5::DataSpace()
);
}
h5File_->WriteAttrib<int> (
"SAMPLE_WINDOWS", configuration.NumWindows(),
H5::PredType::NATIVE_INT, H5::DataSpace()
);
for ( int i = 0; i < configuration.NumWindows(); ++i ) {
// TODO: Window Renaming scheme - 10/19/2010
// Standardize window naming and add the user-defined
// window name as a separate attribute.
h5File_->WriteAttrib<int> (
configuration.WindowName ( i ) + "_START",
configuration.WindowStart ( i ),
H5::PredType::NATIVE_INT, H5::DataSpace()
);
h5File_->WriteAttrib<int> (
configuration.WindowName ( i ) + "_STOP",
configuration.WindowStop ( i ),
H5::PredType::NATIVE_INT, H5::DataSpace()
);
// update gnuradar shared buffer header
header_->AddWindow( configuration.WindowName(i),
configuration.WindowStart(i),
configuration.WindowStop(i)
);
}
return h5File_;
}