Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+70
View File
@@ -0,0 +1,70 @@
/**
* Starts / stops uav ia instances (for tms-if) per uav participant
* $Id$
* $HeadURL$
* $Author$
*
* Created by Mike Wille, ESZS, 2025-05-22
*/
#pragma once
#include <QObject>
namespace NGL
{
class INGLLogger;
}
namespace UAS
{
class UAVCommander;
using UasId = int;
struct UAVInterfaceAdapterConfig
{
public:
UAVInterfaceAdapterConfig(const QString &ip, int port, UasId uasId, bool useTcp)
: m_ip(ip)
, m_port(port)
, m_uasId(uasId)
, m_useTcp(useTcp)
{}
bool operator==(const UAVInterfaceAdapterConfig &o) const
{
return (o.m_ip == m_ip
&& o.m_port == m_port
&& o.m_uasId == m_uasId
&& o.m_useTcp == m_useTcp);
}
QString m_ip;
int m_port;
UasId m_uasId;
bool m_useTcp;
};
class UAVInterfaceAdapter : public QObject
{
Q_OBJECT
public:
UAVInterfaceAdapter(UAVInterfaceAdapterConfig uavConfig, UAVCommander *commander); // copy elision
~UAVInterfaceAdapter();
UAVInterfaceAdapterConfig config() const { return m_config; }
UAVCommander &commander() { return *m_commander; }
private:
UAVInterfaceAdapterConfig m_config;
UAVCommander *m_commander;
NGL::INGLLogger &m_logger;
};
} // namespace UAS