Deletes the two stub-header trees (249 files) that shadowed the real
rtiddsgen-generated DDS headers, and removes every reference to them.
CMake (15 include-path entries):
root CMakeLists.txt include_directories(.../forward-declarations);
NGL_TARGET_INCLUDE_DIRECTORIES entries in 7 service CMakeLists
(ServiceManagement, SoundManagement, SituationMap, ScreenRecording,
SituationReplayManagement, SituationReplay, ServiceMonitor)
Source includes that resolved to the root-level stubs (only 2, repointed to the
module-prefixed generated headers the rest of the tree already uses):
Lts/Services/AreaEffectSimulation/object_charge_effect.h
<aes_dtc.h> -> <AreaEffectSimulation/aes_dtc.h>
Lts/Proxies/TrainingAreaBaseOC/websocket_handler.h
<taboc_dtc.h> -> <TrainingAreaBaseOC/taboc_dtc.h>
(generic_dtc_impl.h needs no change: its quote-include "generic_dtc.h"
resolves to the real Lts/DDS/DTC/generic_dtc.h in the same directory)
Tests:
tests/test_migration_stubs.cpp: remove the redundant root-level stub test
(AesDtcCompiles) - the module-prefixed AreaEffectSimulationDtcCompiles test
already exercises the same AreaEffectSimulation::Interface header.
tests/test_skl_dtc.cpp: delete (removed-module compile test, already filtered
out of the build) and remove its now-obsolete CMake list(FILTER) exclusion.
Validation: full rebuild (build4, make -j4 -k) with the removal - 0 new compile
errors vs the pre-existing base-state baseline (77 unique real-error signatures
identical to baseline; all 15 'No such file' headers pre-existing).
56 lines
1.3 KiB
C++
Executable File
56 lines
1.3 KiB
C++
Executable File
#pragma once
|
|
|
|
#include "dds_handler.h"
|
|
#include "logger.h"
|
|
#include <TrainingAreaBaseOC/taboc_dtc.h>
|
|
#include <QtWebSockets/QWebSocket>
|
|
|
|
class QTimer;
|
|
|
|
namespace TrainingAreaBaseOC {
|
|
|
|
enum class WebSocketState {
|
|
DISCONNECTED = 0,
|
|
CONNECTEDTOSERVER,
|
|
CONNECTTOPPM,
|
|
CONNECTEDTOPPM,
|
|
};
|
|
|
|
class WebsocketHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
WebsocketHandler(QObject *parent, int exerciseId,
|
|
const std::shared_ptr<Interface::Dts> dtsTabOc, const std::shared_ptr<Interface::Dtc> dtcTabOc);
|
|
|
|
private slots:
|
|
void onTryConnectionTimerTimeout();
|
|
void onFetchPositionTimerTimeout();
|
|
void onNewSocketState(QAbstractSocket::SocketState state);
|
|
void onNewTextMessageFromSocket(const QString &message);
|
|
|
|
private:
|
|
void connectToExPPM(int exPort);
|
|
void sendPositionRequest();
|
|
void onSendOwnPosition(const QString &message);
|
|
|
|
void connectToServer();
|
|
void sendServicePortRequest();
|
|
void parseServices(const QString &message);
|
|
|
|
WebSocketState m_state = WebSocketState::DISCONNECTED;
|
|
int m_exerciseId = 0;
|
|
int m_ownEquipmentId = 0;
|
|
std::shared_ptr<Interface::Dts> m_dtsTaboc;
|
|
std::shared_ptr<Interface::Dtc> m_dtcTaboc;
|
|
QTimer *m_tryConnectionTimer = nullptr;
|
|
QTimer *m_fetchPositionTimer = nullptr;
|
|
QWebSocket *m_socket = nullptr;
|
|
|
|
LOGGER_T &m_logger;
|
|
|
|
};
|
|
|
|
|
|
}
|