Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+66
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Exercise object
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
|
||||
// Generated
|
||||
#include <GuezIedManagement/gim_db.h>
|
||||
|
||||
|
||||
namespace GuezIedManagement
|
||||
{
|
||||
class ObjectIed final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ObjectIed(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<DatabaseInterface> &db,
|
||||
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
|
||||
QObject *parent = nullptr);
|
||||
~ObjectIed();
|
||||
|
||||
Core::FunctionReplyObject createObject(const Database::GimIed &data);
|
||||
Core::FunctionReplyObject updateDefinition(const Database::GimIed &data);
|
||||
Core::FunctionReplyObject updateState(const Database::GimIed &data);
|
||||
Core::FunctionReplyObject updatePairingState(const Database::GimIed &data);
|
||||
Core::FunctionReplyObject removeObject();
|
||||
|
||||
int getId() const { return m_data.id; }
|
||||
int getEquipmentnumber() const { return m_data.equipmentNumber; }
|
||||
void setPosition(int64_t sampleTime, const Core::GeoPosition &pos);
|
||||
void setPosition(const IedPosition &position);
|
||||
|
||||
protected slots:
|
||||
void onPublishData();
|
||||
|
||||
private slots:
|
||||
void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType);
|
||||
|
||||
private:
|
||||
void assignBaseData(const Database::GimIed &data);
|
||||
void assignPairingState(const Database::GimIed &data);
|
||||
Core::FunctionReplyObject updateObject();
|
||||
inline void publishPosition();
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
Database::GimIed m_data;
|
||||
IedPosition m_position;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user