Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
101 lines
2.1 KiB
C++
101 lines
2.1 KiB
C++
/**
|
|
* Messages from/to a SFM (passed through Wls message PayloadMobileToHost / PayloadHostToMobile
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2017-01-10
|
|
*/
|
|
|
|
#include "wls_sfm_message.h"
|
|
|
|
|
|
namespace WirelessLocationSystem
|
|
{
|
|
|
|
/// -------------- SfmMsgGpsControl_tx --------------
|
|
|
|
QByteArray SfmMsgGpsControl_tx::getPayload() const
|
|
{
|
|
QByteArray payload;
|
|
payload.append(isGpsOn() ? 1 : 0);
|
|
return payload;
|
|
}
|
|
|
|
/// ---------- SfmMsgEquipmentId_rx ----------
|
|
bool SfmMsgEquipmentId::setPayload(const QByteArray &p_payload)
|
|
{
|
|
if (p_payload.size() != s_payloadSize)
|
|
return false;
|
|
|
|
m_equipmentNumber = p_payload[0] << 8;
|
|
m_equipmentNumber |= ((unsigned short)p_payload[1]) & 0xFF;
|
|
|
|
return true;
|
|
}
|
|
|
|
QByteArray SfmMsgEquipmentId::getPayload() const
|
|
{
|
|
QByteArray retVal(3, Qt::Uninitialized);
|
|
retVal[0] = (m_equipmentNumber >> 8) & 0xFF;
|
|
retVal[1] = m_equipmentNumber & 0xFF;
|
|
retVal[2] = 0;
|
|
return retVal;
|
|
}
|
|
|
|
/// ---------- SfmMsgTacticalState_rx ----------
|
|
bool SfmMsgTacticalState_rx::setPayload(const QByteArray &p_payload)
|
|
{
|
|
if (p_payload.size() != s_payloadSize)
|
|
return false;
|
|
m_tacticalState = p_payload[0];
|
|
|
|
return true;
|
|
}
|
|
|
|
/// ---------- SfmMsgTetra ----------
|
|
bool SfmMsgTetra_rx::setPayload(const QByteArray &p_data)
|
|
{
|
|
if (p_data.size() < 3)
|
|
return false;
|
|
|
|
m_sendCounter = p_data[0];
|
|
m_fragmentByte = p_data[1];
|
|
m_payload = p_data.mid(2);
|
|
|
|
return true;
|
|
}
|
|
|
|
// ---------- Acknowledge_rx ----------
|
|
bool Acknowledge_rx::setPayload(const QByteArray &p_data)
|
|
{
|
|
if (p_data.size() != s_payloadSize)
|
|
return false;
|
|
m_recvCounter = p_data[0];
|
|
m_ackState = p_data[1];
|
|
return true;
|
|
}
|
|
|
|
// ---------- Acknowledge_tx ----------
|
|
QByteArray Acknowledge_tx::getPayload() const
|
|
{
|
|
QByteArray ba(2, Qt::Uninitialized);
|
|
ba[0] = m_recvCounter;
|
|
ba[1] = m_ackState;
|
|
return ba;
|
|
}
|
|
|
|
|
|
/// ---------- SfmMsgLizensStatus ----------
|
|
bool SfmMsgLicenseState_rx::setPayload(const QByteArray &p_data)
|
|
{
|
|
if (p_data.size() != s_payloadSize)
|
|
return false;
|
|
|
|
if (p_data[0] != 0 && p_data[0] != 1)
|
|
return false;
|
|
m_isLicensed = p_data[0] ? true : false;
|
|
return true;
|
|
}
|
|
|
|
} // namespace WirelessLocationSystem
|