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
+13
-13
@@ -58,20 +58,20 @@ bool HandlerNotification::init()
|
||||
// Remove old notifications
|
||||
if (isRemoveable(notif))
|
||||
{
|
||||
INFO_LOG(m_logger) << "Remove old notification " << notif.title() << ", id = " << notif.id();
|
||||
removeNotificationIds.append(notif.id());
|
||||
INFO_LOG(m_logger) << "Remove old notification " << notif.title << ", id = " << notif.id;
|
||||
removeNotificationIds.append(notif.id);
|
||||
return;
|
||||
}
|
||||
|
||||
// alle Addressen zu der NomNotification eintragen
|
||||
for (const Database::NomAddress &addr : qAsConst(dataAddressVec))
|
||||
{
|
||||
if (addr.notificationId == notif.id())
|
||||
if (addr.notificationId == notif.id)
|
||||
{
|
||||
if (addr.isSender)
|
||||
notif.sender(ObjectNotification::toDdsData(addr));
|
||||
notif.sender = ObjectNotification::toDdsData(addr);
|
||||
else
|
||||
notif.recipientIds().push_back(ObjectNotification::toDdsData(addr));
|
||||
notif.recipientIds.push_back(ObjectNotification::toDdsData(addr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void HandlerNotification::onCreateNotificationRequest(const rti::core::SampleIde
|
||||
DEBUG_LOG(m_logger) << "onCreateNotificationRequest: " << request;
|
||||
|
||||
ObjectNotification *ifs(new ObjectNotification(m_ddsHandler, m_db));
|
||||
const Core::FunctionReplyObject ret = ifs->createObject(request.notification());
|
||||
const Core::FunctionReplyObject ret = ifs->createObject(request.notification);
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
@@ -152,7 +152,7 @@ void HandlerNotification::onReadReceiptRequest(const rti::core::SampleIdentity &
|
||||
DEBUG_LOG(m_logger) << "onReadReceiptRequest: " << request;
|
||||
Core::FunctionReplyObject ret;
|
||||
|
||||
for (const auto notificationId : request.notificationIds())
|
||||
for (const auto notificationId : request.notificationIds)
|
||||
{
|
||||
ObjectNotification *ifs = m_objectNotificationMap.value(notificationId);
|
||||
if (ifs == nullptr)
|
||||
@@ -173,7 +173,7 @@ void HandlerNotification::onDeleteMessageRequest(const rti::core::SampleIdentity
|
||||
DEBUG_LOG(m_logger) << "onDeleteMessageRequest: " << request;
|
||||
Core::FunctionReplyObject ret;
|
||||
|
||||
for (const auto notificationId : request.notificationIds())
|
||||
for (const auto notificationId : request.notificationIds)
|
||||
{
|
||||
ObjectNotification *ifs = m_objectNotificationMap.value(notificationId);
|
||||
if (ifs == nullptr)
|
||||
@@ -191,7 +191,7 @@ void HandlerNotification::onDeleteMessageRequest(const rti::core::SampleIdentity
|
||||
void HandlerNotification::onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification modType)
|
||||
{
|
||||
if (modType == DataModification::eAdded ||
|
||||
(modType == DataModification::eModified && data.state() != ExerciseManagement::ExerciseState::Stopped))
|
||||
(modType == DataModification::eModified && data.state != ExerciseManagement::ExerciseState::Stopped))
|
||||
return;
|
||||
|
||||
// Remove notification for given exercise
|
||||
@@ -200,7 +200,7 @@ void HandlerNotification::onExerciseChanged(const ExerciseManagement::Exercise &
|
||||
{
|
||||
it.next();
|
||||
ObjectNotification* obj = it.value();
|
||||
if (obj->notification().exerciseId() != data.id())
|
||||
if (obj->notification().exerciseId != data.id)
|
||||
continue;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Remove notification " << obj->id();
|
||||
@@ -244,15 +244,15 @@ void HandlerNotification::onCheckRemove()
|
||||
bool HandlerNotification::isRemoveable(const NomNotification ¬if)
|
||||
{
|
||||
// NomNotification from exercises will not be removed
|
||||
if (notif.exerciseId() != 0)
|
||||
if (notif.exerciseId != 0)
|
||||
return false;
|
||||
|
||||
qint64 expiryInterval = Settings::expiryIntervalMSec();
|
||||
qint64 currentTime = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
// Remove notification if expiryTime + expiryInterval / processTime + expiryInterval
|
||||
if (currentTime > ( notif.expiryTime() + expiryInterval) ||
|
||||
(notif.processed() > 0 && currentTime > ( notif.processTime() + expiryInterval)))
|
||||
if (currentTime > ( notif.expiryTime + expiryInterval) ||
|
||||
(notif.processed > 0 && currentTime > ( notif.processTime + expiryInterval)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user