Index: tools/AgentSim/AgentSimController.h =================================================================== diff -u -rf9c6b488aa4135e8cd47ccd3fdc6c3ae1cd831aa -ra5781739bcbe58c754aff8861561495624bc5b67 --- tools/AgentSim/AgentSimController.h (.../AgentSimController.h) (revision f9c6b488aa4135e8cd47ccd3fdc6c3ae1cd831aa) +++ tools/AgentSim/AgentSimController.h (.../AgentSimController.h) (revision a5781739bcbe58c754aff8861561495624bc5b67) @@ -19,31 +19,18 @@ #include #include -#include "AgentMessage.h" +#include "RtMessage.h" /*! - * \brief Simulates the server side of the LeahiRt ↔ Agent UDS connection. - * \details Listens on a Unix domain socket, accepts one client at a time, parses - * inbound AgentMessage frames, logs them, and replies with an Ack frame. - * Parser state is cleared automatically when the client disconnects. + * \brief Simulates the Agent app that connects the Leahi device to the Cloud System */ class AgentSimController : public QObject { Q_OBJECT public: - /*! - * \brief Construct an AgentSimController. - * \param configPath Path to the INI configuration file. - * \param parent Optional QObject parent. - */ explicit AgentSimController(const QString &configPath, QObject *parent = nullptr); - /*! - * \brief Begin listening on the configured socket path. - * \details Removes any stale socket file before binding. - * \return true on success, false if the server could not bind. - */ bool listen(); private Q_SLOTS: @@ -52,12 +39,12 @@ void onReadyRead(); private: - void handleMessage(const AgentMessage &msg); - void logMessage(AgentMessage::MsgId msgId, quint16 sequence, const QByteArray &payload); + void handleMessage(const RtMessage &msg); + void logMessage(RtMessage::MsgId msgId, quint16 sequence, const QByteArray &payload); QSettings _settings; QLocalServer _server; QLocalSocket *_client = nullptr; QByteArray _rxBuf; - AgentMessage _rxMsg; + RtMessage _rxMsg; };