mirror of
https://github.com/nqrduck/LimeDriver.git
synced 2024-11-24 11:02:25 +00:00
Updates ... very important ...
This commit is contained in:
parent
34a18f2a88
commit
3d1c7bdf2c
2 changed files with 16 additions and 6 deletions
|
@ -325,16 +325,16 @@ void dumpConfig(std::vector<Config2HDFattr_t> &config) {
|
||||||
std::cout << "}" << std::endl;
|
std::cout << "}" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
LimeConfig_t initializeLimeConfig(int Npulses,
|
LimeConfig_t initializeLimeConfig(int Npulses) {
|
||||||
std::ostringstream &stringstream) {
|
|
||||||
/* Initialize the LimeConfig_t struct
|
/* Initialize the LimeConfig_t struct
|
||||||
|
|
||||||
@param Npulses: Number of pulses
|
@param Npulses: Number of pulses
|
||||||
@param stringstream: std::ostringstream object
|
|
||||||
|
|
||||||
@return LimeConfig_t: LimeConfig_t struct with default values
|
@return LimeConfig_t: LimeConfig_t struct with default values
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
std::ostringstream stringstream;
|
||||||
|
|
||||||
LimeConfig_t LimeCfg{};
|
LimeConfig_t LimeCfg{};
|
||||||
|
|
||||||
LimeCfg.Npulses = Npulses;
|
LimeCfg.Npulses = Npulses;
|
||||||
|
@ -1895,11 +1895,19 @@ DC_Q << endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int run_experiment_from_LimeCfg(LimeConfig_t LimeCfg){
|
||||||
|
|
||||||
|
int Npulses = LimeCfg.Npulses; // Number of pulses from the LimeCfg
|
||||||
|
|
||||||
|
// Getting HDF Attributes from dedicated function
|
||||||
|
std::vector<Config2HDFattr_t> HDFattrVector = getHDFAttributes(LimeCfg);
|
||||||
|
|
||||||
|
run_experiment(LimeCfg, HDFattrVector);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
const double pi = acos(-1);
|
const double pi = acos(-1);
|
||||||
|
|
||||||
std::ostringstream stringstream;
|
|
||||||
|
|
||||||
int Npulses = 2; // default number of pulses
|
int Npulses = 2; // default number of pulses
|
||||||
// check if nPulses has been given as argument, so that all the arrays are
|
// check if nPulses has been given as argument, so that all the arrays are
|
||||||
// initialized with proper size
|
// initialized with proper size
|
||||||
|
@ -1911,7 +1919,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the LimeConfig_t struct
|
// Initialize the LimeConfig_t struct
|
||||||
LimeConfig_t LimeCfg = initializeLimeConfig(Npulses, stringstream);
|
LimeConfig_t LimeCfg = initializeLimeConfig(Npulses);
|
||||||
|
|
||||||
// Getting HDF Attributes from dedicated function
|
// Getting HDF Attributes from dedicated function
|
||||||
std::vector<Config2HDFattr_t> HDFattrVector = getHDFAttributes(LimeCfg);
|
std::vector<Config2HDFattr_t> HDFattrVector = getHDFAttributes(LimeCfg);
|
||||||
|
|
|
@ -112,4 +112,6 @@ struct Config2HDFattr_t {
|
||||||
// Device structure, should be initialize to NULL
|
// Device structure, should be initialize to NULL
|
||||||
static lms_device_t *device = NULL;
|
static lms_device_t *device = NULL;
|
||||||
|
|
||||||
|
LimeConfig_t initializeLimeConfig(int Npulses);
|
||||||
|
|
||||||
#endif // LIMECONFIG_H
|
#endif // LIMECONFIG_H
|
Loading…
Reference in a new issue