Migrates remaining services and plugins to generated rtiddsgen API
Converts accessor calls to plain member access across the residual service set.
This commit is contained in:
104 files changed
+2424
-2430
No files matched your search
+43
-43
@@ -136,11 +136,11 @@ void ExmTests::tryCreateTrainingArea()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send modifyRequest TrainingArea (create)";
|
||||
AssetManagement::TrainingAreaModifyRequest request;
|
||||
request.id(0);
|
||||
request.name("TestTrainingAreaCreate");
|
||||
request.bottomLeft(Core::GeoPosition2D(11.61/180*M_PI, 53.07/180*M_PI));
|
||||
request.height(1000000);
|
||||
request.width(1000000);
|
||||
request.id = 0;
|
||||
request.name = "TestTrainingAreaCreate";
|
||||
request.bottomLeft = Core::GeoPosition2D(11.61/180*M_PI, 53.07/180*M_PI);
|
||||
request.height = 1000000;
|
||||
request.width = 1000000;
|
||||
|
||||
if (!m_ftc_asm->trainingAreaModifyRequest(request, this))
|
||||
|
||||
@@ -176,14 +176,14 @@ void ExmTests::tryCreate()
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send createRequest Exercise";
|
||||
ExerciseCreateRequest req;
|
||||
req.name(std::string("TestExerciseCreate"));
|
||||
req.beginTime(10);
|
||||
req.endTime(20);
|
||||
req.trainingAreaId(m_trainingAreaId);
|
||||
req.radioGroupId(radioGroupId);
|
||||
req.symbolFillTypeId(symbolFillType);
|
||||
req.forces(std::string("Forces"));
|
||||
req.description(std::string("Description"));
|
||||
req.name = std::string("TestExerciseCreate");
|
||||
req.beginTime = 10;
|
||||
req.endTime = 20;
|
||||
req.trainingAreaId = m_trainingAreaId;
|
||||
req.radioGroupId = radioGroupId;
|
||||
req.symbolFillTypeId = symbolFillType;
|
||||
req.forces = std::string("Forces");
|
||||
req.description = std::string("Description");
|
||||
|
||||
if (!m_ftc->exerciseCreateRequest(req, this))
|
||||
{
|
||||
@@ -198,17 +198,17 @@ void ExmTests::tryModify()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send modify request for exercise Id = " << m_exerciseId;
|
||||
ExerciseModifyRequest req;
|
||||
req.id(m_exerciseId);
|
||||
req.name(std::string("ExerciseModifyTest"));
|
||||
req.beginTime(1000);
|
||||
req.endTime(2000);
|
||||
req.trainingAreaId(m_trainingAreaId);
|
||||
req.radioGroupId(1);
|
||||
req.symbolFillTypeId(1);
|
||||
req.forces(std::string("ForcesUpdated"));
|
||||
req.description(std::string("DescriptionUpdated"));
|
||||
req.activePhaseId(m_phaseId);
|
||||
req.newState(ExerciseState::Created);
|
||||
req.id = m_exerciseId;
|
||||
req.name = std::string("ExerciseModifyTest");
|
||||
req.beginTime = 1000;
|
||||
req.endTime = 2000;
|
||||
req.trainingAreaId = m_trainingAreaId;
|
||||
req.radioGroupId = 1;
|
||||
req.symbolFillTypeId = 1;
|
||||
req.forces = std::string("ForcesUpdated");
|
||||
req.description = std::string("DescriptionUpdated");
|
||||
req.activePhaseId = m_phaseId;
|
||||
req.newState = ExerciseState::Created;
|
||||
if (!m_ftc->exerciseModifyRequest(req, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
@@ -268,20 +268,20 @@ void ExmTests::tryStartExercise()
|
||||
m_dtc->waitForHistoricalDataExercise();
|
||||
ExerciseManagement::Exercise ex = m_dtc->exercise(m_exerciseId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Training area id = " << ex.trainingAreaId();
|
||||
DEBUG_LOG(m_logger) << "Training area id = " << ex.trainingAreaId;
|
||||
|
||||
ExerciseModifyRequest req;
|
||||
req.id(m_exerciseId);
|
||||
req.name(std::string("ExerciseStarted"));
|
||||
req.beginTime(ex.beginTime());
|
||||
req.endTime(ex.endTime());
|
||||
req.trainingAreaId(ex.trainingAreaId());
|
||||
req.radioGroupId(ex.radioGroupId());
|
||||
req.symbolFillTypeId(ex.symbolFillTypeId());
|
||||
req.activePhaseId(ex.activePhaseId());
|
||||
req.forces(ex.forces());
|
||||
req.description(ex.description());
|
||||
req.newState(ExerciseState::Started);
|
||||
req.id = m_exerciseId;
|
||||
req.name = std::string("ExerciseStarted");
|
||||
req.beginTime = ex.beginTime;
|
||||
req.endTime = ex.endTime;
|
||||
req.trainingAreaId = ex.trainingAreaId;
|
||||
req.radioGroupId = ex.radioGroupId;
|
||||
req.symbolFillTypeId = ex.symbolFillTypeId;
|
||||
req.activePhaseId = ex.activePhaseId;
|
||||
req.forces = ex.forces;
|
||||
req.description = ex.description;
|
||||
req.newState = ExerciseState::Started;
|
||||
if (!m_ftc->exerciseModifyRequest(req, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
@@ -311,7 +311,7 @@ void ExmTests::tryGetAllExercises()
|
||||
bool bAtLeastOneFound = false;
|
||||
auto cb = [this, &bAtLeastOneFound](const ExerciseManagement::Exercise &ex)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Exe(" << ex.id() << ") : " << ex.name();
|
||||
INFO_LOG(m_logger) << "Exe(" << ex.id << ") : " << ex.name;
|
||||
bAtLeastOneFound = true;
|
||||
};
|
||||
m_dtc->exercises(cb);
|
||||
@@ -330,17 +330,17 @@ void ExmTests::tryGetExercise()
|
||||
m_dtc->waitForHistoricalDataExercise();
|
||||
ExerciseManagement::Exercise data = m_dtc->exercise(m_exerciseId);
|
||||
|
||||
if (data.id() <= 0)
|
||||
if (data.id <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error receiving data for exercise " << m_exerciseId;
|
||||
DEBUG_LOG(m_logger) << "data.id() = " << data.id();
|
||||
DEBUG_LOG(m_logger) << "data.id() = " << data.id;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(m_logger) << "## Exe(" << data.id() << ") : name = " << data.name()
|
||||
<< ", begin = " << data.beginTime() << ", end = " << data.endTime()
|
||||
<< ", state = " << data.state();
|
||||
INFO_LOG(m_logger) << "## Exe(" << data.id << ") : name = " << data.name
|
||||
<< ", begin = " << data.beginTime << ", end = " << data.endTime
|
||||
<< ", state = " << data.state;
|
||||
}
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ void ExmTests::tryGetExercise()
|
||||
void ExmTests::onExerciseChanged(const ExerciseManagement::Exercise &data,
|
||||
DataModification modType)
|
||||
{
|
||||
const int id = data.id();
|
||||
const int id = data.id;
|
||||
DEBUG_LOG(m_logger) << "onExerciseChanged for exercise " << id
|
||||
<< " - modType: " << (int)modType;
|
||||
if (m_exerciseId == id)
|
||||
|
||||
Reference in new issue
Block a user