Files
qt5-legatus-legacy/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.h
T
2026-08-13 18:33:10 +02:00

62 lines
1.7 KiB
C++
Executable File

/**
* Handler ShootbackTargets (L400)
* $Id$
* $HeadURL$
* $Author$
* Created by N. Thoden, NLE, 06.04.2020
*/
#pragma once
#include <QObject>
#include "dds_handler.h"
#include <ParticipantManagement/logger.h>
#include <ParticipantManagement/ppm_dts.h>
#include <ParticipantManagement/ppm_fts.h>
namespace ParticipantManagement
{
class MainHandler;
class ObjectTargetInformation;
class HandlerTargetInformation final
: protected Interface::Fts::ModifyTargetInformationRequestHandler
, protected Interface::Fts::RemoveTargetInformationRequestHandler
{
public:
explicit HandlerTargetInformation(MainHandler *mainHandler);
~HandlerTargetInformation();
/**
* Initialize the handler to manage information
*/
bool init();
const QHash<int, ObjectTargetInformation *> &getObjectMap() const { return m_objectMap; }
ObjectTargetInformation *data(int id)
{
if (!m_objectMap.contains(id))
return nullptr;
return m_objectMap[id];
}
private: // methods
void onModifyTargetInformationRequest(const rti::core::SampleIdentity &cookie,
const ModifyTargetInformationRequest &request) override;
Core::FunctionReplyObject targetInformationModifyRequest(const ModifyTargetInformationRequest &request);
void onRemoveTargetInformationRequest(const rti::core::SampleIdentity &cookie,
const RemoveTargetInformationRequest &request) override;
private: // attributes
QHash<int, ObjectTargetInformation *> m_objectMap;
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} // namespace ParticipantManagement