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
+42
-42
@@ -29,15 +29,15 @@ std::set<int32_t> mountingPointsOfInterest(const InfrastructureManagement::Mai
|
||||
{
|
||||
std::set<int32_t> mountingPoints;
|
||||
|
||||
for (const auto &se : building.elements())
|
||||
for (const auto &se : building.elements)
|
||||
{
|
||||
if (se.structureElementTypeId() != InfrastructureManagement::StructureElementType::MountingPoint)
|
||||
if (se.structureElementTypeId != InfrastructureManagement::StructureElementType::MountingPoint)
|
||||
continue;
|
||||
|
||||
if (se.mountingPointTypeId() == InfrastructureManagement::MountingPointType::AnnouncementUnit ||
|
||||
se.mountingPointTypeId() == InfrastructureManagement::MountingPointType::IndoorCamera ||
|
||||
se.mountingPointTypeId() == InfrastructureManagement::MountingPointType::OutdoorCamera)
|
||||
mountingPoints.insert(se.id());
|
||||
if (se.mountingPointTypeId == InfrastructureManagement::MountingPointType::AnnouncementUnit ||
|
||||
se.mountingPointTypeId == InfrastructureManagement::MountingPointType::IndoorCamera ||
|
||||
se.mountingPointTypeId == InfrastructureManagement::MountingPointType::OutdoorCamera)
|
||||
mountingPoints.insert(se.id);
|
||||
}
|
||||
|
||||
return mountingPoints;
|
||||
@@ -47,7 +47,7 @@ bool isStreamOfInterest(const AudioVideoManagement::Stream &stream, bool isAudio
|
||||
{
|
||||
using AudioVideoManagement::StreamType;
|
||||
|
||||
switch (stream.type().underlying())
|
||||
switch (stream.type)
|
||||
{
|
||||
case StreamType::Video:
|
||||
return !isAudio;
|
||||
@@ -94,7 +94,7 @@ DefaultAvMenus::~DefaultAvMenus() = default;
|
||||
|
||||
void DefaultAvMenus::onStreamChanged(const Stream &stream)
|
||||
{
|
||||
m_streams[stream.id()] = stream;
|
||||
m_streams[stream.id] = stream;
|
||||
m_timer->start();
|
||||
}
|
||||
|
||||
@@ -109,20 +109,20 @@ void DefaultAvMenus::onMainStructureElementChanged(const InfrastructureManagemen
|
||||
|
||||
if(modType == DataModification::eRemoved)
|
||||
{
|
||||
m_buildingDisplayNameForId.remove(data.id());
|
||||
m_buildingDisplayNameForId.remove(data.id);
|
||||
m_timer->start();
|
||||
}
|
||||
else if(modType == DataModification::eAdded)
|
||||
{
|
||||
m_buildingDisplayNameForId[data.id()] = buildingDisplayName;
|
||||
m_buildingDisplayNameForId[data.id] = buildingDisplayName;
|
||||
m_timer->start();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_buildingDisplayNameForId.value(data.id(),buildingDisplayName) == buildingDisplayName)
|
||||
if(m_buildingDisplayNameForId.value(data.id,buildingDisplayName) == buildingDisplayName)
|
||||
return;
|
||||
|
||||
m_buildingDisplayNameForId[data.id()] = buildingDisplayName;
|
||||
m_buildingDisplayNameForId[data.id] = buildingDisplayName;
|
||||
m_timer->start();
|
||||
}
|
||||
}
|
||||
@@ -150,17 +150,17 @@ void DefaultAvMenus::removeMenus()
|
||||
void DefaultAvMenus::updateMenu(bool isAudio)
|
||||
{
|
||||
MenuStruct menu;
|
||||
menu.id(menuStructId(isAudio));
|
||||
menu.isDefault(true);
|
||||
menu.name("Default");
|
||||
menu.isAudio(isAudio);
|
||||
menu.id = menuStructId(isAudio);
|
||||
menu.isDefault = true;
|
||||
menu.name = "Default";
|
||||
menu.isAudio = isAudio;
|
||||
|
||||
std::vector<AvMenuEntry> allEntries;
|
||||
|
||||
const auto &buildings = m_ismDtc->mainStructureElements();
|
||||
for (const auto &building : buildings)
|
||||
{
|
||||
m_buildingDisplayNameForId[building.id()] = getDisplayNameForBuilding(building);
|
||||
m_buildingDisplayNameForId[building.id] = getDisplayNameForBuilding(building);
|
||||
std::vector<AvMenuEntry> subMenu = subMenuForBuilding(building, isAudio);
|
||||
std::move(subMenu.begin(), subMenu.end(), std::back_inserter(allEntries));
|
||||
}
|
||||
@@ -169,24 +169,24 @@ void DefaultAvMenus::updateMenu(bool isAudio)
|
||||
{
|
||||
bool addMenu = false;
|
||||
AvMenuEntry mvsStreams;
|
||||
mvsStreams.id(1000000);
|
||||
mvsStreams.parentId(menuStructId(isAudio));
|
||||
mvsStreams.name().set("MVS");
|
||||
mvsStreams.isGroup(true);
|
||||
mvsStreams.id = 1000000;
|
||||
mvsStreams.parentId = menuStructId(isAudio);
|
||||
mvsStreams.name = "MVS";
|
||||
mvsStreams.isGroup = true;
|
||||
|
||||
const auto &videoTeams = m_videoTeamHandler->videoTeams();
|
||||
for (const auto &videoTeam : videoTeams)
|
||||
{
|
||||
if (videoTeam.exerciseId() != m_context.id())
|
||||
if (videoTeam.exerciseId != m_context.id())
|
||||
continue;
|
||||
addMenu = true;
|
||||
AvMenuEntry streamEntry;
|
||||
streamEntry.id(videoTeam.id());
|
||||
streamEntry.parentId(mvsStreams.id());
|
||||
streamEntry.mountingPointId(-1*videoTeam.id());
|
||||
streamEntry.id = videoTeam.id;
|
||||
streamEntry.parentId = mvsStreams.id;
|
||||
streamEntry.mountingPointId = -1 * videoTeam.id;
|
||||
// Also set the stream name which makes it easier for the clients.
|
||||
streamEntry.name().set(videoTeam.streamName());
|
||||
streamEntry.isGroup(false);
|
||||
streamEntry.name = videoTeam.streamName;
|
||||
streamEntry.isGroup = false;
|
||||
allEntries.push_back(streamEntry);
|
||||
// What about the rowId?
|
||||
}
|
||||
@@ -196,7 +196,7 @@ void DefaultAvMenus::updateMenu(bool isAudio)
|
||||
}
|
||||
}
|
||||
|
||||
menu.menuEntries(allEntries);
|
||||
menu.menuEntries = allEntries;
|
||||
HandlerMenuStruct::sortEntries(menu);
|
||||
|
||||
m_dts->publish(menu);
|
||||
@@ -210,11 +210,11 @@ void DefaultAvMenus::updateMenu(bool isAudio)
|
||||
|
||||
QString DefaultAvMenus::getDisplayNameForBuilding(const InfrastructureManagement::MainStructureElement &data)
|
||||
{
|
||||
for (auto structure : data.elements()) {
|
||||
if(structure.structureElementTypeId() == InfrastructureManagement::StructureElementType::Building)
|
||||
return QString::fromStdString(structure.displayName());
|
||||
for (auto structure : data.elements) {
|
||||
if(structure.structureElementTypeId == InfrastructureManagement::StructureElementType::Building)
|
||||
return QString::fromStdString(structure.displayName);
|
||||
}
|
||||
return QString::fromStdString(data.name());
|
||||
return QString::fromStdString(data.name);
|
||||
}
|
||||
|
||||
std::vector<AvMenuEntry> DefaultAvMenus::subMenuForBuilding(const InfrastructureManagement::MainStructureElement &building, bool isAudio)
|
||||
@@ -227,10 +227,10 @@ std::vector<AvMenuEntry> DefaultAvMenus::subMenuForBuilding(const Infrastructure
|
||||
entries.reserve(streams.size() + 1);
|
||||
|
||||
AvMenuEntry buildingEntry;
|
||||
buildingEntry.id(building.id());
|
||||
buildingEntry.parentId(menuStructId(isAudio));
|
||||
buildingEntry.name(getDisplayNameForBuilding(building).toStdString());
|
||||
buildingEntry.isGroup(true);
|
||||
buildingEntry.id = building.id;
|
||||
buildingEntry.parentId = menuStructId(isAudio);
|
||||
buildingEntry.name = getDisplayNameForBuilding(building).toStdString();
|
||||
buildingEntry.isGroup = true;
|
||||
// What about the rowId?
|
||||
|
||||
entries.push_back(buildingEntry);
|
||||
@@ -238,12 +238,12 @@ std::vector<AvMenuEntry> DefaultAvMenus::subMenuForBuilding(const Infrastructure
|
||||
for (const auto &stream : streams)
|
||||
{
|
||||
AvMenuEntry streamEntry;
|
||||
streamEntry.id(stream.mountingPointId());
|
||||
streamEntry.parentId(buildingEntry.id());
|
||||
streamEntry.mountingPointId(stream.mountingPointId());
|
||||
streamEntry.id = stream.mountingPointId;
|
||||
streamEntry.parentId = buildingEntry.id;
|
||||
streamEntry.mountingPointId = stream.mountingPointId;
|
||||
// Also set the stream name which makes it easier for the clients.
|
||||
streamEntry.name().set(AudioVideoHandlerImpl::internalStreamName(stream.mountingPointId()).toStdString());
|
||||
streamEntry.isGroup(false);
|
||||
streamEntry.name = AudioVideoHandlerImpl::internalStreamName(stream.mountingPointId).toStdString();
|
||||
streamEntry.isGroup = false;
|
||||
// What about the rowId?
|
||||
|
||||
entries.push_back(streamEntry);
|
||||
@@ -263,7 +263,7 @@ std::vector<Stream> DefaultAvMenus::streamsForBuilding(const InfrastructureManag
|
||||
if (!isStreamOfInterest(stream, isAudio))
|
||||
continue;
|
||||
|
||||
if (!mountingPoints.count(stream.mountingPointId()))
|
||||
if (!mountingPoints.count(stream.mountingPointId))
|
||||
continue;
|
||||
|
||||
streams.push_back(stream);
|
||||
|
||||
Reference in new issue
Block a user