33 lines
733 B
C++
Executable File
33 lines
733 B
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Helper
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Fröbel, NLE, 2019-08-05
|
|
*/
|
|
|
|
#include "helper.h"
|
|
#include <LtsUtilsCore/json_object.h>
|
|
#include <AudioVideoManagement/avm.hpp>
|
|
#include <InfrastructureManagement/ism.hpp>
|
|
#include <QString>
|
|
#include <QJsonDocument>
|
|
|
|
namespace CombatNetRadio
|
|
{
|
|
|
|
int stationId(const InfrastructureManagement::MainStructureElement &radioStation)
|
|
{
|
|
return LtsUtils::JsonObject::fromJson(radioStation.properties()).valueOr<int>("stationId", 0);
|
|
}
|
|
|
|
QString toRcIdString(const AudioVideoManagement::CnrChannel &cnrChannel)
|
|
{
|
|
QString result = QString::fromStdString(cnrChannel.name());
|
|
result.remove(1, 2);
|
|
return result;
|
|
}
|
|
|
|
} // namespace CombatNetRadio
|