58 lines
1.3 KiB
C++
Executable File
58 lines
1.3 KiB
C++
Executable File
/**
|
|
* Handler ObjectTargetInformation (L400)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by N. Thoden, SLTE, 31.05.2022
|
|
*/
|
|
#pragma once
|
|
|
|
#include "dds_handler.h"
|
|
#include <ParticipantManagement/logger.h>
|
|
|
|
#include <DDS/Core/function_reply_object.h>
|
|
|
|
// Generated
|
|
#include <ParticipantManagement/ppm.hpp>
|
|
#include <ParticipantManagement/ppm_db.h>
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
class MainHandler;
|
|
|
|
class ObjectTargetInformation
|
|
{
|
|
public:
|
|
explicit ObjectTargetInformation(MainHandler *mainHandler);
|
|
~ObjectTargetInformation();
|
|
|
|
Core::FunctionReplyObject createObject(const TargetInformation &data);
|
|
Core::FunctionReplyObject updateObject(const TargetInformation &data);
|
|
Core::FunctionReplyObject removeObject();
|
|
|
|
qint32 getId() const { return m_data.id(); }
|
|
qint32 getParticipantId() const { return m_data.participantId(); }
|
|
const TargetInformation &getData() const { return m_data; }
|
|
|
|
bool isValid() const;
|
|
|
|
// convert methods
|
|
static Database::PpmTargetInformation toDbData(const TargetInformation &ddsData); // dds -> db
|
|
static TargetInformation toDdsData(const Database::PpmTargetInformation &dbData); // db -> dds
|
|
|
|
protected:
|
|
void onPublishData();
|
|
|
|
private:
|
|
MainHandler *m_mainHandler;
|
|
TargetInformation m_data;
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
};
|
|
}
|