67 lines
1.7 KiB
C++
Executable File
67 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* RtProfileObserver
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2016-08-17
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AudioVideoManagement/ava_types.h>
|
|
#include <AudioVideoManagement/rt_state.h>
|
|
#include <AudioVideoManagement/avm.hpp>
|
|
#include <QObject>
|
|
#include <QVector>
|
|
#include <boost/optional.hpp>
|
|
|
|
enum class DataModification;
|
|
|
|
|
|
namespace AudioVideoManagement
|
|
{
|
|
|
|
namespace Interface
|
|
{
|
|
class Dtc;
|
|
}
|
|
|
|
class AvaSession;
|
|
class AvaControl;
|
|
class TvcConfig;
|
|
class CnrConfig;
|
|
class CnrTvcProfile;
|
|
|
|
class RtProfileObserver : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
RtProfileObserver(Interface::Dtc *dtc, AvaSession *avaSession, RtState *rtState, int exerciseId, int operatorId);
|
|
|
|
private slots:
|
|
void onSessionEstablished();
|
|
void onTvcConfigChanged(const TvcConfig &tvcConfig, DataModification modType);
|
|
void onCnrConfigChanged(const CnrConfig &cnrConfig, DataModification modType);
|
|
void onCnrTvcProfileChanged(const CnrTvcProfile &profile, DataModification modType);
|
|
|
|
private:
|
|
void loadVoiceRadioCommunicationMenu();
|
|
QVector<RtState::RadioCircuit> defaultRtChannels() const;
|
|
boost::optional<CnrTvcProfile> getProfile() const;
|
|
bool isInProfile(const CnrConfig &cnrConfig) const;
|
|
bool isInProfile(const TvcConfig &tvcConfig) const;
|
|
bool isInProfile(RadioSystem radioSystem, int32_t id) const;
|
|
|
|
const int m_exerciseId;
|
|
const int m_operatorId;
|
|
boost::optional<CnrTvcProfile> m_profile;
|
|
Interface::Dtc *m_dtc;
|
|
AvaSession *m_avaSession;
|
|
AvaControl *m_avaControl;
|
|
RtState *m_rtState;
|
|
};
|
|
|
|
} //namespace AudioVideoManagement
|