##// END OF EJS Templates
Changes plugin products to integrate parametric frequencies
Alexandre Leroux -
r783:958cef2901c0
parent child
Show More
@@ -45,8 +45,18 std::unique_ptr<DataSourceItem> createDataSourceItem(const QUuid &dataSourceUid)
45 // Magnetic field products
45 // Magnetic field products
46 auto magneticFieldFolder = std::make_unique<DataSourceItem>(DataSourceItemType::NODE,
46 auto magneticFieldFolder = std::make_unique<DataSourceItem>(DataSourceItemType::NODE,
47 QStringLiteral("Magnetic field"));
47 QStringLiteral("Magnetic field"));
48 magneticFieldFolder->appendChild(createProductItem(QStringLiteral("FGM"), dataSourceUid));
48 magneticFieldFolder->appendChild(
49 magneticFieldFolder->appendChild(createProductItem(QStringLiteral("SC"), dataSourceUid));
49 createProductItem({{DataSourceItem::NAME_DATA_KEY, QStringLiteral("Scalar 10 Hz")},
50 {COSINUS_FREQUENCY_KEY, 10.}},
51 dataSourceUid));
52 magneticFieldFolder->appendChild(
53 createProductItem({{DataSourceItem::NAME_DATA_KEY, QStringLiteral("Scalar 60 Hz")},
54 {COSINUS_FREQUENCY_KEY, 60.}},
55 dataSourceUid));
56 magneticFieldFolder->appendChild(
57 createProductItem({{DataSourceItem::NAME_DATA_KEY, QStringLiteral("Scalar 100 Hz")},
58 {COSINUS_FREQUENCY_KEY, 100.}},
59 dataSourceUid));
50
60
51 // Electric field products
61 // Electric field products
52 auto electricFieldFolder = std::make_unique<DataSourceItem>(DataSourceItemType::NODE,
62 auto electricFieldFolder = std::make_unique<DataSourceItem>(DataSourceItemType::NODE,
@@ -1,4 +1,5
1 #include "CosinusProvider.h"
1 #include "CosinusProvider.h"
2 #include "MockDefs.h"
2
3
3 #include <Data/DataProviderParameters.h>
4 #include <Data/DataProviderParameters.h>
4 #include <Data/ScalarSeries.h>
5 #include <Data/ScalarSeries.h>
@@ -158,7 +159,8 void TestCosinusAcquisition::testAcquisition()
158 QFETCH(SqpRange, initialRange);
159 QFETCH(SqpRange, initialRange);
159 sqpApp->timeController().onTimeToUpdate(initialRange);
160 sqpApp->timeController().onTimeToUpdate(initialRange);
160 auto provider = std::make_shared<CosinusProvider>();
161 auto provider = std::make_shared<CosinusProvider>();
161 auto variable = sqpApp->variableController().createVariable("MMS", {}, provider);
162 auto variable = sqpApp->variableController().createVariable(
163 "MMS", {{COSINUS_TYPE_KEY, "scalar"}, {COSINUS_FREQUENCY_KEY, 100.}}, provider);
162
164
163 QTest::qWait(OPERATION_DELAY);
165 QTest::qWait(OPERATION_DELAY);
164 validateVariable(variable, initialRange);
166 validateVariable(variable, initialRange);
General Comments 0
You need to be logged in to leave comments. Login now