Updates ... very important ...

This commit is contained in:
jupfi 2024-02-08 16:22:00 +01:00
parent 34a18f2a88
commit 3d1c7bdf2c
2 changed files with 16 additions and 6 deletions

View file

@ -325,16 +325,16 @@ void dumpConfig(std::vector<Config2HDFattr_t> &config) {
std::cout << "}" << std::endl;
}
LimeConfig_t initializeLimeConfig(int Npulses,
std::ostringstream &stringstream) {
LimeConfig_t initializeLimeConfig(int Npulses) {
/* Initialize the LimeConfig_t struct
@param Npulses: Number of pulses
@param stringstream: std::ostringstream object
@return LimeConfig_t: LimeConfig_t struct with default values
*/
std::ostringstream stringstream;
LimeConfig_t LimeCfg{};
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) {
const double pi = acos(-1);
std::ostringstream stringstream;
int Npulses = 2; // default number of pulses
// check if nPulses has been given as argument, so that all the arrays are
// initialized with proper size
@ -1911,7 +1919,7 @@ int main(int argc, char **argv) {
}
// Initialize the LimeConfig_t struct
LimeConfig_t LimeCfg = initializeLimeConfig(Npulses, stringstream);
LimeConfig_t LimeCfg = initializeLimeConfig(Npulses);
// Getting HDF Attributes from dedicated function
std::vector<Config2HDFattr_t> HDFattrVector = getHDFAttributes(LimeCfg);

View file

@ -112,4 +112,6 @@ struct Config2HDFattr_t {
// Device structure, should be initialize to NULL
static lms_device_t *device = NULL;
LimeConfig_t initializeLimeConfig(int Npulses);
#endif // LIMECONFIG_H