Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+10
-10
@@ -109,7 +109,7 @@ Core::FunctionReplyObject HandlerOperatorMessage::createOperatorMessageRequest(c
|
||||
newMsg.recipientText = recipientText;
|
||||
// Only Operator messages
|
||||
Core::FunctionReplyObject ret(newMsg.id);
|
||||
if (newMsg.senderType == Messaging::AddressType::type::Operator)
|
||||
if (newMsg.senderType == Messaging::AddressType::Operator)
|
||||
ret = insertInDbAndPublish(newMsg);
|
||||
|
||||
const int correspondingOutboxMsgId = ret.id();
|
||||
@@ -192,12 +192,12 @@ OperatorMessage HandlerOperatorMessage::toDdsData(const Database::MsgMessageData
|
||||
Core::FunctionReplyObject HandlerOperatorMessage::insertInDbAndPublish(Database::MsgMessageData newMsg)
|
||||
{
|
||||
// Length Check:
|
||||
if (newMsg.recipientType == Messaging::AddressType::type::ObserverController)
|
||||
if (newMsg.recipientType == Messaging::AddressType::ObserverController)
|
||||
{
|
||||
newMsg.subject = newMsg.subject.left(m_maxSubjectLength);
|
||||
newMsg.message = newMsg.message.left(m_maxOcContentLength);
|
||||
}
|
||||
if (newMsg.recipientType == Messaging::AddressType::type::Participant)
|
||||
if (newMsg.recipientType == Messaging::AddressType::Participant)
|
||||
{
|
||||
newMsg.subject = newMsg.subject.left(m_maxSubjectLength);
|
||||
newMsg.message.clear();
|
||||
@@ -208,8 +208,8 @@ Core::FunctionReplyObject HandlerOperatorMessage::insertInDbAndPublish(Database:
|
||||
|
||||
m_dbOperatorMessageData.insert(newMsg.id, newMsg);
|
||||
|
||||
if ((newMsg.recipientType == Messaging::AddressType::type::ObserverController)
|
||||
|| (newMsg.recipientType == Messaging::AddressType::type::Participant))
|
||||
if ((newMsg.recipientType == Messaging::AddressType::ObserverController)
|
||||
|| (newMsg.recipientType == Messaging::AddressType::Participant))
|
||||
{
|
||||
|
||||
int32_t equipmentNumber = m_exercisesHandler->findEquipmentNumber(newMsg.recipientId, newMsg.exerciseId);
|
||||
@@ -236,7 +236,7 @@ Core::FunctionReplyObject HandlerOperatorMessage::insertInDbAndPublish(Database:
|
||||
<< " subject=" << subject
|
||||
<< " message=" << message;
|
||||
static int s_requestId = 1;
|
||||
if (newMsg.recipientType == Messaging::AddressType::type::ObserverController)
|
||||
if (newMsg.recipientType == Messaging::AddressType::ObserverController)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Send to OC senderId=" << newMsg.senderId << " sendertype: " << newMsg.senderType << " subject " << subject;
|
||||
m_exercisesHandler->sendOcEquipmentMessage({s_requestId++,
|
||||
@@ -267,7 +267,7 @@ Core::FunctionReplyObject HandlerOperatorMessage::insertInDbAndPublish(Database:
|
||||
m_ddsHandler->dts()->publish(toDdsData(newMsg));
|
||||
|
||||
INFO_LOG(m_logger) << "insertInDbAndPublish id=" << newMsg.id;
|
||||
if (newMsg.recipientType == Messaging::AddressType::type::ObserverController && newMsg.recipientId > 0)
|
||||
if (newMsg.recipientType == Messaging::AddressType::ObserverController && newMsg.recipientId > 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "O/C-Message in Member-Variable kopieren: id = " << newMsg.id;
|
||||
}
|
||||
@@ -317,10 +317,10 @@ void HandlerOperatorMessage::onEquipmentMessageChanged(const TrainingAreaBase::E
|
||||
CreateOperatorMessageRequest request;
|
||||
DEBUG_LOG(m_logger) << "onEquipmentMessageChanged: " << data;
|
||||
|
||||
request.senderType = Messaging::AddressType::type::Participant;
|
||||
request.senderType = Messaging::AddressType::Participant;
|
||||
request.senderId = data.sender;
|
||||
DEBUG_LOG(m_logger) << "request.senderId = " << request.senderId;
|
||||
request.recipientType = Messaging::AddressType::type::Operator;
|
||||
request.recipientType = Messaging::AddressType::Operator;
|
||||
request.recipientIds.push_back(data.receiver);
|
||||
request.subject = data.subject;
|
||||
request.message = data.text;
|
||||
@@ -357,7 +357,7 @@ QString HandlerOperatorMessage::toAddressStr(const AddressType addressType, cons
|
||||
default:
|
||||
result = QString::fromStdString("No valid addressType:");
|
||||
QString numberStr ;
|
||||
numberStr.setNum(addressType);
|
||||
numberStr = QString::number(static_cast<int>(addressType));
|
||||
result.append(numberStr);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user