XNSim/XNServices/XNUDPTestService/XNUDPTestService.h

30 lines
715 B
C
Raw Normal View History

2025-04-28 16:41:21 +08:00
#pragma once
#include "XNUDPTestService_global.h"
#include <XNCore/XNServiceObject.h>
#include <QVariant>
class XNUDPTestServicePrivate;
class XNUDPTESTSERVICE_EXPORT XNUDPTestService : public XNServiceObject
{
Q_OBJECT
Q_DISABLE_COPY(XNUDPTestService)
Q_DECLARE_PRIVATE(XNUDPTestService)
XN_DECLARE_DDS_SERVICE()
public:
explicit XNUDPTestService(QObject *parent = nullptr);
virtual ~XNUDPTestService();
protected:
XNUDPTestService(XNUDPTestServicePrivate &dd, QObject *parent = nullptr);
public slots:
virtual void OnInitialize() override;
virtual void OnPrepareForExecute() override;
void HandleIncomingData();
public:
void SendData(const QVariant &data);
};
Q_DECLARE_METATYPE(XNUDPTestService)