Migrates OcSituation and ServiceManagement to generated rtiddsgen API
Converts accessor calls to plain member access in osc, oss and obd services.
This commit is contained in:
30 files changed
+1000
-1007
No files matched your search
@@ -80,14 +80,14 @@ void ServiceManagement::ServiceHandler::onRestartServiceRequest(const rti::core:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onRestartServiceRequest " << request;
|
||||
|
||||
ServiceProcess *proc = serviceProcessFromServiceProcId(request.id());
|
||||
ServiceProcess *proc = serviceProcessFromServiceProcId(request.id);
|
||||
|
||||
Core::FunctionReplyObject ret(request.id());
|
||||
Core::FunctionReplyObject ret(request.id);
|
||||
if (proc == nullptr)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got restart request for non existing service ID "
|
||||
<< request.id();
|
||||
ret.setStr(tr_lts("dds", "There is no ServiceProcess with id %1")).arg(request.id());
|
||||
<< request.id;
|
||||
ret.setStr(tr_lts("dds", "There is no ServiceProcess with id %1")).arg(request.id);
|
||||
m_ddsHandler->fts()->restartServiceReply(cookie, ret);
|
||||
return;
|
||||
}
|
||||
@@ -125,7 +125,7 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromProc(const ServiceIn
|
||||
|
||||
m_ddsHandler->dts()->publish(info);
|
||||
|
||||
m_unknownPidsWarned.remove(info.pid());
|
||||
m_unknownPidsWarned.remove(info.pid);
|
||||
}
|
||||
|
||||
void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::CurrentRunningState &data, DataModification type)
|
||||
@@ -135,13 +135,13 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr
|
||||
|
||||
TRACE_LOG(m_logger) << "Got new CurrentRunningState: " << data;
|
||||
|
||||
if (!data.pid())
|
||||
if (!data.pid)
|
||||
{
|
||||
INFO_LOG(m_logger) << "PID 0 is not allowed.";
|
||||
return;
|
||||
}
|
||||
|
||||
ServiceProcess *proc = serviceProcessFromPid(data.pid());
|
||||
ServiceProcess *proc = serviceProcessFromPid(data.pid);
|
||||
Core::CurrentRunningState retData = data;
|
||||
|
||||
if (proc == nullptr)
|
||||
@@ -151,11 +151,11 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr
|
||||
{
|
||||
for (ServiceProcess *currentProc : qAsConst(currentService->allProcs()))
|
||||
{
|
||||
if (currentProc->remotePid() == data.pid())
|
||||
if (currentProc->remotePid() == data.pid)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Found my prog " << data.pid() << " to "<< currentProc->pid() << " " << currentProc->serviceName();
|
||||
DEBUG_LOG(m_logger) << "Found my prog " << data.pid << " to "<< currentProc->processId() << " " << currentProc->serviceName();
|
||||
proc = currentProc;
|
||||
retData.pid() = proc->processId();
|
||||
retData.pid = proc->processId();
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -168,11 +168,11 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr
|
||||
|
||||
if (proc == nullptr)
|
||||
{
|
||||
if (!m_unknownPidsWarned.contains(data.pid()))
|
||||
if (!m_unknownPidsWarned.contains(data.pid))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got CurrentRunningState for non existing process with PID "
|
||||
<< data.pid();
|
||||
m_unknownPidsWarned += data.pid();
|
||||
<< data.pid;
|
||||
m_unknownPidsWarned += data.pid;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -232,7 +232,7 @@ void ServiceManagement::ServiceHandler::onHeartBeatObserverTimerTimeout()
|
||||
if (currentProc->failedStartingAttempts() > 3)
|
||||
continue;
|
||||
|
||||
const qint64 minAge = (currentProc->runningState() == Core::RunningState_def::Starting)
|
||||
const qint64 minAge = (currentProc->runningState() == Core::RunningState::Starting)
|
||||
? minHeartbeatAgeStartup
|
||||
: minHeartbeatAge;
|
||||
|
||||
|
||||
Reference in new issue
Block a user