Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -44,7 +44,7 @@ bool HandlerOrder::init()
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
bRet = false;
return;
}
@@ -52,11 +52,11 @@ bool HandlerOrder::init()
};
if (!m_mainHandler->db()->select(cbOrder) || !bRet)
{
ERROR_LOG() << "Error reading data from database!";
ERROR_LOG(m_logger) << "Error reading data from database!";
return false;
}
DEBUG_LOG() << "m_orderObjMap.size() = " << m_orderObjMap.size();
DEBUG_LOG(m_logger) << "m_orderObjMap.size() = " << m_orderObjMap.size();
return true;
}
@@ -95,7 +95,7 @@ void HandlerOrder::createOrder(const ConvertFromTab::EffectShowOrder_t &effectSh
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
return;
}
m_orderObjMap.insert(ifs->getId(), ifs);
@@ -125,7 +125,7 @@ void HandlerOrder::createOrder(const ConvertFromTab::RelocationOrder_t &relocati
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
return;
}
m_orderObjMap.insert(ifs->getId(), ifs);
@@ -136,7 +136,7 @@ void HandlerOrder::removeOrder(const ConvertFromTab::OrderRetract_t &orderRetrac
for (auto it = m_orderObjMap.begin(); it != m_orderObjMap.end(); ++it)
{
if (it.value()->getData().typeOfOrder == orderRetract.orderType)
//ERROR_LOG() << "current idorder =" ;
//ERROR_LOG(m_logger) << "current idorder =" ;
if (it.value()->getData().idOrder == orderRetract.id)
{
int id = it.key();
@@ -144,14 +144,14 @@ void HandlerOrder::removeOrder(const ConvertFromTab::OrderRetract_t &orderRetrac
int def = it.value()->getData().orderConfirmation;
ret = it.value()->removeObject();
if (ret.error())
ERROR_LOG() << Q_FUNC_INFO << ret();
ERROR_LOG(m_logger) << Q_FUNC_INFO << ret();
else
{
if (def == EffectShowManagement::OrderConfirmation_e_def::Execution ||
def == EffectShowManagement::OrderConfirmation_e_def::InterruptExecution ||
def == EffectShowManagement::OrderConfirmation_e_def::FiringReadiness)
{
DEBUG_LOG() << "EndFireHandler from Remove";
DEBUG_LOG(m_logger) << "EndFireHandler from Remove";
emit endHandlerFiring(it.value()->getData());
//Stop the current execution
@@ -171,7 +171,7 @@ void HandlerOrder::removeOrder(const ConvertFromTab::OrderRetract_t &orderRetrac
void HandlerOrder::sendOrderConfirmation(const ConvertToTab::OrderConfirmation_t &oc)
{
ERROR_LOG() << "Send Order Confirmation to Excon " << oc.orderId << " / ";
ERROR_LOG(m_logger) << "Send Order Confirmation to Excon " << oc.orderId << " / ";
m_mainHandler->handlerTabData()->orderConfirmation(oc);
}
@@ -179,7 +179,7 @@ void HandlerOrder::sendOrderConfirmation(const ConvertToTab::OrderConfirmation_t
void HandlerOrder::onOrderModifyRequest(const rti::core::SampleIdentity &cookie,
const OrderModifyRequest &request)
{
DEBUG_LOG() << "Order: " << request.id() << " Order: " << request.orderConfirmation();
DEBUG_LOG(m_logger) << "Order: " << request.id() << " Order: " << request.orderConfirmation();
if (request.id() > 0)
{
@@ -194,7 +194,7 @@ void HandlerOrder::onOrderModifyRequest(const rti::core::SampleIdentity &cookie,
if (ret.error())
{
m_mainHandler->dds()->fts()->orderModifyReply(cookie, ret);
ERROR_LOG() << "Update Order object failed.";
ERROR_LOG(m_logger) << "Update Order object failed.";
return;
}
@@ -207,7 +207,7 @@ void HandlerOrder::onOrderModifyRequest(const rti::core::SampleIdentity &cookie,
else
{
m_mainHandler->dds()->fts()->orderModifyReply(cookie, Core::FunctionReplyObject(request.id()));
ERROR_LOG() << "Illegal Order ID";
ERROR_LOG(m_logger) << "Illegal Order ID";
}
}
bool HandlerOrder::updateOrder(ObjectOrder *order,
@@ -222,14 +222,14 @@ bool HandlerOrder::updateOrder(ObjectOrder *order,
oc.confirmation = orderConf.underlying();
oc.answerText = answerText;
sendOrderConfirmation(oc);
ERROR_LOG() << "Update Order " << oc.orderId << " / ";
ERROR_LOG(m_logger) << "Update Order " << oc.orderId << " / ";
switch (orderConf.underlying())
{
case EffectShowManagement::OrderConfirmation_e_def::FiringReadiness:
emit startHandlerFiring(order->getData());
break;
case EffectShowManagement::OrderConfirmation_e_def::Execution:
DEBUG_LOG() << "start execution";
DEBUG_LOG(m_logger) << "start execution";
m_mainHandler->handlerVehicle()->effectShowControl(EffectShowClient::EffectShowControl_e::Start);
emit effectShowStarted();
break;
@@ -242,7 +242,7 @@ bool HandlerOrder::updateOrder(ObjectOrder *order,
case EffectShowManagement::OrderConfirmation_e_def::Abort:
if (checkForActiveOrder(escOrder.idOrder))
{
DEBUG_LOG() << "idOrder is " << escOrder.idOrder << " send abbort as is active";
DEBUG_LOG(m_logger) << "idOrder is " << escOrder.idOrder << " send abbort as is active";
m_mainHandler->handlerControlUnit()->send(CommandSignal::FT_SE_CB_SALVE_UNTERBRECHEN);
m_mainHandler->handlerVehicle()->effectShowControl(EffectShowControl_e::Abort);
}
@@ -262,7 +262,7 @@ bool HandlerOrder::updateOrder(ObjectOrder *order,
break;
}
default:
ERROR_LOG() << "Unhandled EffectShowManagement::OrderConfirmation_e_def in HandlerOrder::onOrderModifyRequest"; // todo
ERROR_LOG(m_logger) << "Unhandled EffectShowManagement::OrderConfirmation_e_def in HandlerOrder::onOrderModifyRequest"; // todo
break;
}
@@ -279,14 +279,14 @@ void HandlerOrder::updateOrderWithId(int orderId, const QString &answerText, Eff
ifs->setOrderConfirmation(orderConf.underlying());
auto ret = ifs->updateObject();
if (ret.error())
ERROR_LOG() << "Error Updating Order " << orderId << " / ";
ERROR_LOG(m_logger) << "Error Updating Order " << orderId << " / ";
updateOrder(ifs, answerText, orderConf);
}
bool HandlerOrder::checkForActiveOrder(int orderId)
{
DEBUG_LOG() << "check for active Order " << orderId << " ";
DEBUG_LOG(m_logger) << "check for active Order " << orderId << " ";
if (orderId <= 0)
return false;
return ((m_mainHandler->handlerFiringExplosion()->getCurrentorderId() == orderId )||( m_mainHandler->handlerFiringSmoke()->getCurrentorderId() == orderId));