Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
// $Revision$
|
||||
// $Date$
|
||||
// $Id$
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <DamageStatusEnum32.h>
|
||||
#include <EntityTypeStruct.h>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QtCore/QHash>
|
||||
#include <Common/typestruct.h>
|
||||
|
||||
Q_DECLARE_METATYPE(rpr2::DamageStatusEnum32::ET)
|
||||
|
||||
|
||||
namespace rpr2
|
||||
{
|
||||
inline uint qHash(const rpr2::EntityTypeStruct &ets)
|
||||
{
|
||||
// da es genau 64 belegte Bits sind, geht es so am einfachsten
|
||||
const quint64 *val = reinterpret_cast<const quint64 *>(&ets);
|
||||
return ::qHash(*val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Handle GuezBiteReport Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_guez_bitereport.h"
|
||||
|
||||
/*
|
||||
* ObserverGuezBiteReportCBNotifier
|
||||
*/
|
||||
ObserverGuezBiteReportCBNotifier::ObserverGuezBiteReportCBNotifier()
|
||||
: rpr2::IObserverGuezBiteReportIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.GuezBiteReport"))
|
||||
{}
|
||||
|
||||
void ObserverGuezBiteReportCBNotifier::newGuezBiteReportIntInstance(const rpr2::IObserverGuezBiteReportIntInstance &interaction)
|
||||
{
|
||||
emit newGuezBiteReport(interaction);
|
||||
}
|
||||
|
||||
void ObserverGuezBiteReportCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationIntClassCB::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Handle GuezBiteReport Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverGuezBiteReportIntClassCB.h>
|
||||
#include <IObserverGuezBiteReportIntInstance.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new action requests
|
||||
*/
|
||||
class ObserverGuezBiteReportCBNotifier : public QObject, public rpr2::IObserverGuezBiteReportIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGuezBiteReportCBNotifier();
|
||||
|
||||
void newGuezBiteReportIntInstance(const rpr2::IObserverGuezBiteReportIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newGuezBiteReport(const rpr2::IObserverGuezBiteReportIntInstance &action);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Handle GuezExconEngagement Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_guez_exconengagement.h"
|
||||
|
||||
/*
|
||||
* ObserverGuezExconEngagementCBNotifier
|
||||
*/
|
||||
ObserverGuezExconEngagementCBNotifier::ObserverGuezExconEngagementCBNotifier()
|
||||
: rpr2::IObserverGuezExconEngagementIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.GuezExconEngagement"))
|
||||
{}
|
||||
|
||||
void ObserverGuezExconEngagementCBNotifier::newGuezExconEngagementIntInstance(const rpr2::IObserverGuezExconEngagementIntInstance &interaction)
|
||||
{
|
||||
emit newGuezExconEngagement(interaction);
|
||||
}
|
||||
|
||||
void ObserverGuezExconEngagementCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationIntClassCB::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Handle GuezExconEngagement Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverGuezExconEngagementIntClassCB.h>
|
||||
#include <IObserverGuezExconEngagementIntInstance.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new action requests
|
||||
*/
|
||||
class ObserverGuezExconEngagementCBNotifier : public QObject, public rpr2::IObserverGuezExconEngagementIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGuezExconEngagementCBNotifier();
|
||||
|
||||
void newGuezExconEngagementIntInstance(const rpr2::IObserverGuezExconEngagementIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newGuezExconEngagement(const rpr2::IObserverGuezExconEngagementIntInstance &action);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Handle GuezHit Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_guez_hit.h"
|
||||
|
||||
|
||||
/*
|
||||
* ObserverGuezHitCBNotifier
|
||||
*/
|
||||
ObserverGuezHitCBNotifier::ObserverGuezHitCBNotifier()
|
||||
: rpr2::IObserverGuezHitIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.GuezHit"))
|
||||
{}
|
||||
|
||||
void ObserverGuezHitCBNotifier::newGuezHitIntInstance(const rpr2::IObserverGuezHitIntInstance &interaction)
|
||||
{
|
||||
emit newGuezHit(interaction);
|
||||
}
|
||||
|
||||
void ObserverGuezHitCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationIntClassCB::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Handle GuezHit Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverGuezHitIntClassCB.h>
|
||||
#include <IObserverGuezHitIntInstance.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new action requests
|
||||
*/
|
||||
class ObserverGuezHitCBNotifier : public QObject, public rpr2::IObserverGuezHitIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGuezHitCBNotifier();
|
||||
|
||||
void newGuezHitIntInstance(const rpr2::IObserverGuezHitIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newGuezHit(const rpr2::IObserverGuezHitIntInstance &interaction);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Handle GuezInit Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_guez_init.h"
|
||||
|
||||
/*
|
||||
* ObserverGuezInitCBNotifier
|
||||
*/
|
||||
ObserverGuezInitCBNotifier::ObserverGuezInitCBNotifier()
|
||||
: rpr2::IObserverGuezInitIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.GuezInit"))
|
||||
{}
|
||||
|
||||
void ObserverGuezInitCBNotifier::newGuezInitIntInstance(const rpr2::IObserverGuezInitIntInstance &interaction)
|
||||
{
|
||||
emit newGuezInit(interaction);
|
||||
}
|
||||
|
||||
void ObserverGuezInitCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationIntClassCB::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Handle GuezInit Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverGuezInitIntClassCB.h>
|
||||
#include <IObserverGuezInitIntInstance.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new action requests
|
||||
*/
|
||||
class ObserverGuezInitCBNotifier : public QObject, public rpr2::IObserverGuezInitIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGuezInitCBNotifier();
|
||||
|
||||
void newGuezInitIntInstance(const rpr2::IObserverGuezInitIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newGuezInit(const rpr2::IObserverGuezInitIntInstance &action);
|
||||
};
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Handle GuezRequestBiteReport Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_guez_requestbitereport.h"
|
||||
|
||||
/*
|
||||
* ObserverGuezRequestBiteReportCBNotifier
|
||||
*/
|
||||
ObserverGuezRequestBiteReportCBNotifier::ObserverGuezRequestBiteReportCBNotifier()
|
||||
: rpr2::IObserverGuezRequestBiteReportIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.GuezRequestBiteReport"))
|
||||
{}
|
||||
|
||||
void ObserverGuezRequestBiteReportCBNotifier::newGuezRequestBiteReportIntInstance(const rpr2::IObserverGuezRequestBiteReportIntInstance &interaction)
|
||||
{
|
||||
emit newGuezRequestBiteReport(interaction);
|
||||
}
|
||||
|
||||
void ObserverGuezRequestBiteReportCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationIntClassCB::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Handle GuezRequestBiteReport Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverGuezRequestBiteReportIntClassCB.h>
|
||||
#include <IObserverGuezRequestBiteReportIntInstance.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new action requests
|
||||
*/
|
||||
class ObserverGuezRequestBiteReportCBNotifier : public QObject, public rpr2::IObserverGuezRequestBiteReportIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGuezRequestBiteReportCBNotifier();
|
||||
|
||||
void newGuezRequestBiteReportIntInstance(const rpr2::IObserverGuezRequestBiteReportIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newGuezRequestBiteReport(const rpr2::IObserverGuezRequestBiteReportIntInstance &action);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Handle MunitionDetonation Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_munitiondetonation.h"
|
||||
|
||||
/*
|
||||
* ObserverMunitionDetonationCBNotifier
|
||||
*/
|
||||
ObserverMunitionDetonationCBNotifier::ObserverMunitionDetonationCBNotifier()
|
||||
: rpr2::IObserverMunitionDetonationIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.MunitionDetonation"))
|
||||
{}
|
||||
|
||||
void ObserverMunitionDetonationCBNotifier::newMunitionDetonationIntInstance(const rpr2::IObserverMunitionDetonationIntInstance &interaction)
|
||||
{
|
||||
emit newMunitionDetonation(interaction);
|
||||
}
|
||||
|
||||
void ObserverMunitionDetonationCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationCBNotifier::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Handle MunitionDetonation Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverMunitionDetonationIntClassCB.h>
|
||||
#include <IObserverMunitionDetonationIntInstance.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new munition detonation requests
|
||||
*/
|
||||
class ObserverMunitionDetonationCBNotifier : public QObject, public rpr2::IObserverMunitionDetonationIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverMunitionDetonationCBNotifier();
|
||||
|
||||
void newMunitionDetonationIntInstance(const rpr2::IObserverMunitionDetonationIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newMunitionDetonation(const rpr2::IObserverMunitionDetonationIntInstance &interaction);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Handle WeaponFire Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#include "rpr_ia_weaponfire.h"
|
||||
|
||||
// rpr2 data types
|
||||
#include <EventIdentifierStruct.h>
|
||||
#include <EntityTypeStruct.h>
|
||||
#include <WorldLocationStruct.h>
|
||||
|
||||
|
||||
/*
|
||||
* ObserverWeaponFireCBNotifier
|
||||
*/
|
||||
ObserverWeaponFireCBNotifier::ObserverWeaponFireCBNotifier()
|
||||
: rpr2::IObserverWeaponFireIntClassCB()
|
||||
, m_logger(HighLevelArchitecture::getLogger("Callbacks.Interaction.WeaponFire"))
|
||||
{}
|
||||
|
||||
void ObserverWeaponFireCBNotifier::newWeaponFireIntInstance(const rpr2::IObserverWeaponFireIntInstance &interaction)
|
||||
{
|
||||
emit newWeaponFire(interaction);
|
||||
}
|
||||
|
||||
void ObserverWeaponFireCBNotifier::deleteInterface()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Delete Interface";
|
||||
//rpr2::IObserverMunitionDetonationIntClassCB::deleteInterface();
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Handle WeaponFire Events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
|
||||
#include <IObserverWeaponFireIntClassCB.h>
|
||||
#include <IObserverWeaponFireIntInstance.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <Common/logger.h>
|
||||
|
||||
/**
|
||||
* The notifier for new action requests
|
||||
*/
|
||||
class ObserverWeaponFireCBNotifier : public QObject, public rpr2::IObserverWeaponFireIntClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverWeaponFireCBNotifier();
|
||||
|
||||
void newWeaponFireIntInstance(const rpr2::IObserverWeaponFireIntInstance &interaction) override;
|
||||
void deleteInterface() override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
signals:
|
||||
void newWeaponFire(const rpr2::IObserverWeaponFireIntInstance &interaction);
|
||||
};
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an AggregateEntity instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_aggregateentity_object_cb.h"
|
||||
#include "rpr_observer_aggregateentity_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new AggregateEntity instances
|
||||
*/
|
||||
class ObserverAggregateEntityCBNotifier : public ObserverAggregateEntityObjectCB, public rpr2::IObserverAggregateEntityObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverAggregateEntityCBNotifier()
|
||||
: ObserverAggregateEntityObjectCB("Callbacks.AggregateEntity")
|
||||
, rpr2::IObserverAggregateEntityObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAggregateEntityObjClassCB
|
||||
rpr2::IObserverAggregateEntityObjInstanceCB &newAggregateEntityObjInstance(rpr2::IObserverAggregateEntityObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverAggregateEntityObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* class to handle signals for ObserverPhysicalEntities functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_baseentity_object_cb.h"
|
||||
#include <AggregateMarkingStruct.h>
|
||||
#include <AggregateStateEnum8.h>
|
||||
#include <DimensionStruct.h>
|
||||
#include <RTIObjectIdArrayStruct.h>
|
||||
|
||||
class ObserverAggregateEntityObjectCB : public ObserverBaseEntityObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverAggregateEntityObjectCB(const char *loggerName = "Callbacks.PhysicalEntity")
|
||||
: ObserverBaseEntityObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAggregateMarkingChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::AggregateMarkingStruct &state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit aggregateMarkingChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onAggregateStateChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
rpr2::AggregateStateEnum8::ET state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit aggregateStateChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onDimensionsChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::DimensionStruct &state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit dimensionsChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onEntityIdentifiersChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::RTIObjectIdArrayStruct &state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit entityIdentifiersChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onForceIdentifierChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
rpr2::ForceIdentifierEnum8::ET state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit forceIdentifierChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void aggregateMarkingChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::AggregateMarkingStruct &state, qint64 simTimeMSecs);
|
||||
void aggregateStateChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::AggregateStateEnum8::ET state, qint64 simTimeMSecs);
|
||||
void dimensionsChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::DimensionStruct &state, qint64 simTimeMSecs);
|
||||
void entityIdentifiersChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::RTIObjectIdArrayStruct &state, qint64 simTimeMSecs);
|
||||
void forceIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::ForceIdentifierEnum8::ET state, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* template class to handle IObserverPhysicalEntityObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverAggregateEntityObjClassCB.h>
|
||||
#include <IObserverAggregateEntityObjInstance.h>
|
||||
#include <IObserverAggregateEntityObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_aggregateentity_object_cb.h"
|
||||
#include "rpr_observer_baseentity_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverAggregateEntityObjInstanceCB : public ObserverBaseEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverAggregateEntityObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.PhysicalEntity")
|
||||
: ObserverBaseEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
//
|
||||
// IObserverAggregateEntityObjInstanceCB
|
||||
//
|
||||
void changedAggregateMarking(const rpr2::AggregateMarkingStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onAggregateMarkingChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedAggregateState(rpr2::AggregateStateEnum8::ET value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onAggregateStateChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDimensions(const rpr2::DimensionStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onDimensionsChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedEntityIdentifiers(const rpr2::RTIObjectIdArrayStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onEntityIdentifiersChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedForceIdentifier(rpr2::ForceIdentifierEnum8::ET value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onForceIdentifierChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedFormation(rpr2::FormationEnum32::ET) override {}
|
||||
void changedNumberOfSilentEntities(ngs::INT16) override {}
|
||||
void changedNumberOfVariableDatums(ngs::UINT32) override {}
|
||||
void changedSilentAggregates(const rpr2::ArrayOfSilentAggregateStructDynamicHLAlengthlessVarArray &) override {}
|
||||
void changedSilentEntities(const rpr2::ArrayOfSilentEntityStructDynamicHLAlengthlessVarArray &) override {}
|
||||
void changedSubAggregateIdentifiers(const rpr2::RTIObjectIdArrayStruct &) override {}
|
||||
void changedVariableDatums(const rpr2::ArrayOfVariableDatumStructDynamicHLAlengthlessVarArray &) override {}
|
||||
};
|
||||
|
||||
using ObserverAggregateEntityObjInstanceCBType = ObserverAggregateEntityObjInstanceCB<rpr2::IObserverAggregateEntityObjInstanceCB,
|
||||
rpr2::IObserverAggregateEntityObjInstance,
|
||||
ObserverAggregateEntityObjectCB>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an Aircraft instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_aircraft_object_cb.h"
|
||||
#include "rpr_observer_aircraft_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Aircraft instances
|
||||
*/
|
||||
class ObserverAircraftCBNotifier : public ObserverAircraftObjectCB, public rpr2::IObserverAircraftObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverAircraftCBNotifier()
|
||||
: ObserverAircraftObjectCB("Callbacks.Aircraft")
|
||||
, rpr2::IObserverAircraftObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAircraftObjClassCB
|
||||
rpr2::IObserverAircraftObjInstanceCB &newAircraftObjInstance(rpr2::IObserverAircraftObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverAircraftObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverAircrafts functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_platform_object_cb.h"
|
||||
|
||||
class ObserverAircraftObjectCB : public ObserverPlatformObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverAircraftObjectCB(const char *loggerName = "Callbacks.Aircraft")
|
||||
: ObserverPlatformObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* template class to handle IObserverAircraftObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverAircraftObjClassCB.h>
|
||||
#include <IObserverAircraftObjInstance.h>
|
||||
#include <IObserverAircraftObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_platform_object_instance_cb.h"
|
||||
|
||||
class ObserverAircraftObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverAircraftObjInstanceCB : public ObserverPlatformObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverAircraftObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.Aircraft")
|
||||
: ObserverPlatformObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAfterburnerOn(bool) override {}
|
||||
void changedAntiCollisionLightsOn(bool) override {}
|
||||
void changedBlackOutBrakeLightsOn(bool) override {}
|
||||
void changedBlackOutLightsOn(bool) override {}
|
||||
void changedBrakeLightsOn(bool) override {}
|
||||
void changedFormationLightsOn(bool) override {}
|
||||
void changedHatchState(rpr2::HatchStateEnum32::ET) override {}
|
||||
void changedHeadLightsOn(bool) override {}
|
||||
void changedInteriorLightsOn(bool) override {}
|
||||
void changedLandingLightsOn(bool) override {}
|
||||
void changedLauncherRaised(bool) override {}
|
||||
void changedNavigationLightsOn(bool) override {}
|
||||
void changedRampDeployed(bool) override {}
|
||||
void changedRunningLightsOn(bool) override {}
|
||||
void changedSpotLightsOn(bool) override {}
|
||||
void changedTailLightsOn(bool) override {}
|
||||
|
||||
};
|
||||
|
||||
using ObserverAircraftObjInstanceCBType = ObserverAircraftObjInstanceCB<rpr2::IObserverAircraftObjInstanceCB,
|
||||
rpr2::IObserverAircraftObjInstance,
|
||||
ObserverAircraftObjectCB>;
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* class to handle signals for ObserverBaseEntities functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_environment_object_object_cb.h"
|
||||
|
||||
#include <EntityIdentifierStruct.h>
|
||||
|
||||
namespace rpr2
|
||||
{
|
||||
class WorldLocationStruct;
|
||||
class ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray;
|
||||
}
|
||||
|
||||
class ObserverArealObjectObjectCB : public ObserverEnvironmentObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverArealObjectObjectCB(const char *loggerName = "Callbacks.ArealObject")
|
||||
: ObserverEnvironmentObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onPointsDataChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit pointsDataChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onPercentCompleteChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
ngs::UINT32 value,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit percentCompleteChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onDamagedAppearanceChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
rpr2::DamageStatusEnum32::ET state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit damagedAppearanceChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onObjectPreDistributedChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit objectPreDistributedChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onDeactivatedChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit deactivatedChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onSmokingChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit smokingChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onFlamingChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit flamingChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void pointsDataChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &state, qint64 simTimeMSecs);
|
||||
void percentCompleteChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 state, qint64 simTimeMSecs);
|
||||
void damagedAppearanceChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::DamageStatusEnum32::ET state, qint64 simTimeMSecs);
|
||||
void objectPreDistributedChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
void deactivatedChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
void smokingChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
void flamingChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
|
||||
};
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* template class to handle IObserverArealObjectObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverArealObjectObjInstanceCB.h>
|
||||
#include <EntityIdentifierStruct.h>
|
||||
#include <SpatialStruct.h>
|
||||
#include <WorldLocationStruct.h>
|
||||
|
||||
#include <NGSUtils/SimTime.h>
|
||||
|
||||
#include "rpr_observer_environment_object_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverArealObjectObjInstanceCB : public ObserverEnvironmentObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverArealObjectObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.ArealObject")
|
||||
: ObserverEnvironmentObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
// Declarations for pure virtual functions
|
||||
void changedPointsData(const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onPointsDataChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedPercentComplete(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onPercentCompleteChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDamagedAppearance(rpr2::DamageStatusEnum32::ET value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDamagedAppearanceChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedObjectPreDistributed(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onObjectPreDistributedChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDeactivated(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDeactivatedChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedSmoking(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onSmokingChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedFlaming(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onFlamingChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
protected:
|
||||
// ngs::SimTime m_lastPositionTime;
|
||||
};
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* class to handle signals for ObserverBaseEntities functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_object_cb.h"
|
||||
|
||||
#include <EntityIdentifierStruct.h>
|
||||
|
||||
namespace rpr2
|
||||
{
|
||||
class WorldLocationStruct;
|
||||
}
|
||||
|
||||
class ObserverBaseEntityObjectCB : public ObserverObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverBaseEntityObjectCB(const char *loggerName = "Callbacks.BaseEntity")
|
||||
: ObserverObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onEntityIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::IObserverBaseEntityObjInstance &object)
|
||||
{
|
||||
INFO_LOG(m_logger) << "EntityIdentifier changed for Human Object. New EntityIdentifier: "
|
||||
<< eis.FederateIdentifier.SiteID << "/"
|
||||
<< eis.FederateIdentifier.ApplicationID << "/"
|
||||
<< eis.EntityNumber;
|
||||
emit entityIdentifierChanged(eis, &object);
|
||||
}
|
||||
|
||||
void onSpatialChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &wl, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit spatialChanged(eis, wl, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onEntityTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &ets, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit entityTypeChanged(eis, ets, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onIsPartOfChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::IsPartOfStruct &ipos, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit isPartOfChanged(eis, ipos, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void entityIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::IObserverBaseEntityObjInstance *object);
|
||||
void spatialChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &wl, qint64 simTimeMSecs);
|
||||
void entityTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &ets, qint64 simTimeMSecs);
|
||||
void isPartOfChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::IsPartOfStruct &ipos, qint64 simTimeMSecs);
|
||||
};
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* template class to handle IObserverBaseEntityObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverBaseEntityObjInstanceCB.h>
|
||||
#include <EntityIdentifierStruct.h>
|
||||
#include <SpatialStruct.h>
|
||||
#include <WorldLocationStruct.h>
|
||||
|
||||
#include <NGSUtils/SimTime.h>
|
||||
|
||||
#include "rpr_observer_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverBaseEntityObjInstanceCB : public ObserverObjectInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverBaseEntityObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.BaseEntity")
|
||||
: ObserverObjectInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
//
|
||||
// IObserverObjectInstanceCallback
|
||||
//
|
||||
void changedSpatial(const rpr2::SpatialStruct &data) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
|
||||
rpr2::DeadReckoningAlgorithmEnum8::ET d = data.DeadReckoningAlgorithm__A__Alternatives.discriminant();
|
||||
switch (d)
|
||||
{
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::Other:
|
||||
// nothing
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::Static:
|
||||
{
|
||||
rpr2::WorldLocationStruct wl = data.DeadReckoningAlgorithm__A__Alternatives.SpatialStatic().WorldLocation;
|
||||
try
|
||||
{
|
||||
//Bei anderen Projekten muss ein Mapping stattfinden. Dies wird jetzt im NGSInterface erledigt.
|
||||
//m_pCB->onSpatialChanged(m_pIObject->getEntityIdentifier().EntityNumber, wl, simTimeMSecs);
|
||||
this->m_pCB->onSpatialChanged(this->m_pIObject->getEntityIdentifier(), wl, this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG(this->m_logger) << "Human-Callback threw Exception in 'newTlnPos()";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FPW:
|
||||
{
|
||||
rpr2::WorldLocationStruct wl = data.DeadReckoningAlgorithm__A__Alternatives.SpatialFPW().WorldLocation;
|
||||
try
|
||||
{
|
||||
this->m_pCB->onSpatialChanged(this->m_pIObject->getEntityIdentifier(), wl, this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG(this->m_logger) << "Human-Callback threw Exception in 'newTlnPos()";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPW:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPW";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVW:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVW";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVW:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVW";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FPB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_FPB";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPB";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVB";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVB";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void receivedSpatial(const rpr2::SpatialStruct &, const ngs::SimTime &simTime) override
|
||||
{
|
||||
m_lastPositionTime = simTime;
|
||||
}
|
||||
|
||||
void changedEntityIdentifier(const rpr2::EntityIdentifierStruct &data) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
{
|
||||
ERROR_LOG(this->m_logger) << "No valid Entity.";
|
||||
return;
|
||||
}
|
||||
this->m_pCB->onEntityIdentifierChanged(data, *this->m_pIObject);
|
||||
}
|
||||
|
||||
void changedEntityType(const rpr2::EntityTypeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
|
||||
this->m_pCB->onEntityTypeChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
|
||||
}
|
||||
|
||||
void changedIsPartOf(const rpr2::IsPartOfStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
|
||||
this->m_pCB->onIsPartOfChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
// Declarations for pure virtual functions
|
||||
void changedRelativeSpatial(const rpr2::SpatialStruct &) override {}
|
||||
protected:
|
||||
ngs::SimTime m_lastPositionTime;
|
||||
};
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* class to handle signals for ObserverBaseEntities functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_object_cb.h"
|
||||
|
||||
#include <EntityIdentifierStruct.h>
|
||||
|
||||
namespace rpr2
|
||||
{
|
||||
class WorldLocationStruct;
|
||||
}
|
||||
|
||||
class ObserverEnvironmentObjectObjectCB : public ObserverObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverEnvironmentObjectObjectCB(const char *loggerName = "Callbacks.EnvironmentObject")
|
||||
: ObserverObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onObjectIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::IObserverEnvironmentObjectObjInstance &object)
|
||||
{
|
||||
INFO_LOG(m_logger) << "ObjectIdentifier changed for Environment Object Object. New ObjectIdentifier: "
|
||||
<< eis.FederateIdentifier.ApplicationID << "/"
|
||||
<< eis.FederateIdentifier.SiteID << "/"
|
||||
<< eis.EntityNumber;
|
||||
emit objectIdentifierChanged(eis, &object);
|
||||
}
|
||||
|
||||
void onSpatialChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &wl, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit spatialChanged(eis, wl, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onReferencedObjectIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::RTIObjectIdStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit referencedObjectIdentifierChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onForceIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::ForceIdentifierEnum8::ET value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit forceIdentifierChangedEO(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onObjectTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EnvironmentObjectTypeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit objectTypeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
Q_SIGNALS:
|
||||
void objectIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::IObserverEnvironmentObjectObjInstance *object);
|
||||
void spatialChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &wl, qint64 simTimeMSecs);
|
||||
void referencedObjectIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::RTIObjectIdStruct &value, qint64 simTimeMSecs);
|
||||
void forceIdentifierChangedEO(const rpr2::EntityIdentifierStruct &eis, rpr2::ForceIdentifierEnum8::ET value, qint64 simTimeMSecs);
|
||||
void objectTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EnvironmentObjectTypeStruct &value, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+142
@@ -0,0 +1,142 @@
|
||||
/**
|
||||
* template class to handle IObserverEnvironmentObjectObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverEnvironmentObjectObjClassCB.h>
|
||||
#include <IObserverEnvironmentObjectObjInstance.h>
|
||||
#include <IObserverEnvironmentObjectObjInstanceCB.h>
|
||||
#include <EntityIdentifierStruct.h>
|
||||
#include <SpatialStruct.h>
|
||||
#include <WorldLocationStruct.h>
|
||||
|
||||
#include <NGSUtils/SimTime.h>
|
||||
|
||||
#include "rpr_observer_object_instance_cb.h"
|
||||
|
||||
class ObserverEnvironmentObjectObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverEnvironmentObjectObjInstanceCB : public ObserverObjectInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverEnvironmentObjectObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.EnvironmentObject")
|
||||
: ObserverObjectInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
//
|
||||
// IObserverObjectInstanceCallback
|
||||
//
|
||||
void changedSpatial(const rpr2::SpatialStruct &data)
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
|
||||
rpr2::DeadReckoningAlgorithmEnum8::ET d = data.DeadReckoningAlgorithm__A__Alternatives.discriminant();
|
||||
switch (d)
|
||||
{
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::Other:
|
||||
// nothing
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::Static:
|
||||
{
|
||||
rpr2::WorldLocationStruct wl = data.DeadReckoningAlgorithm__A__Alternatives.SpatialStatic().WorldLocation;
|
||||
try
|
||||
{
|
||||
//Bei anderen Projekten muss ein Mapping stattfinden. Dies wird jetzt im NGSInterface erledigt.
|
||||
//m_pCB->onSpatialChanged(m_pIObject->getEntityIdentifier().EntityNumber, wl, simTimeMSecs);
|
||||
this->m_pCB->onSpatialChanged(this->m_pIObject->getObjectIdentifier(), wl, this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG(this->m_logger) << "Human-Callback threw Exception in 'newTlnPos()";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FPW:
|
||||
{
|
||||
rpr2::WorldLocationStruct wl = data.DeadReckoningAlgorithm__A__Alternatives.SpatialFPW().WorldLocation;
|
||||
try
|
||||
{
|
||||
this->m_pCB->onSpatialChanged(this->m_pIObject->getObjectIdentifier(), wl, this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG(this->m_logger) << "Human-Callback threw Exception in 'newTlnPos()";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPW:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPW";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVW:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVW";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVW:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVW";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FPB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_FPB";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RPB";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_RVB";
|
||||
break;
|
||||
case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVB:
|
||||
DEBUG_LOG(this->m_logger) << "ObserverHumanObjInstanceCB::changedSpatial, case rpr2::DeadReckoningAlgorithmEnum8::DRM_FVB";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void receivedSpatial(const rpr2::SpatialStruct &, const ngs::SimTime &simTime)
|
||||
{
|
||||
m_lastPositionTime = simTime;
|
||||
}
|
||||
|
||||
void changedObjectIdentifier(const rpr2::EntityIdentifierStruct &data) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onObjectIdentifierChanged(data, *this->m_pIObject);
|
||||
}
|
||||
|
||||
void changedReferencedObjectIdentifier(const rpr2::RTIObjectIdStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onReferencedObjectIdentifierChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedForceIdentifier(rpr2::ForceIdentifierEnum8::ET value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onForceIdentifierChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedObjectType(const rpr2::EnvironmentObjectTypeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onObjectTypeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
protected:
|
||||
ngs::SimTime m_lastPositionTime;
|
||||
};
|
||||
|
||||
using ObserverEnvironmentObjInstanceCBType = ObserverEnvironmentObjectObjInstanceCB<rpr2::IObserverEnvironmentObjectObjInstanceCB,
|
||||
rpr2::IObserverEnvironmentObjectObjInstance,
|
||||
ObserverEnvironmentObjectObjectCB>;
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an GroundVehicle instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_groundvehicle_object_cb.h"
|
||||
#include "rpr_observer_groundvehicle_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new ground vehicle instances
|
||||
*/
|
||||
class ObserverGroundVehicleCBNotifier : public ObserverGroundVehicleObjectCB, public rpr2::IObserverGroundVehicleObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGroundVehicleCBNotifier()
|
||||
: ObserverGroundVehicleObjectCB("Callbacks.GroundVehicle")
|
||||
, rpr2::IObserverGroundVehicleObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverGroundVehicleObjClassCB
|
||||
rpr2::IObserverGroundVehicleObjInstanceCB &newGroundVehicleObjInstance(rpr2::IObserverGroundVehicleObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGroundVehicleObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverHumans functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_platform_object_cb.h"
|
||||
|
||||
class ObserverGroundVehicleObjectCB : public ObserverPlatformObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGroundVehicleObjectCB(const char *loggerName = "Callbacks.GroundVehicle")
|
||||
: ObserverPlatformObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* template class to handle IObserverGroundVehicleObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGroundVehicleObjClassCB.h>
|
||||
#include <IObserverGroundVehicleObjInstance.h>
|
||||
#include <IObserverGroundVehicleObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_platform_object_instance_cb.h"
|
||||
|
||||
class ObserverGroundVehicleObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGroundVehicleObjInstanceCB : public ObserverPlatformObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGroundVehicleObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GroundVehicle")
|
||||
: ObserverPlatformObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
};
|
||||
|
||||
using ObserverGroundVehicleObjInstanceCBType = ObserverGroundVehicleObjInstanceCB<rpr2::IObserverGroundVehicleObjInstanceCB,
|
||||
rpr2::IObserverGroundVehicleObjInstance,
|
||||
ObserverGroundVehicleObjectCB>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Aircraft instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_aircraft_object_cb.h"
|
||||
#include "rpr_observer_guez_aircraft_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Aircraft instances
|
||||
*/
|
||||
class ObserverGuezAircraftCBNotifier : public ObserverGuezAircraftObjectCB, public rpr2::IObserverGuezAircraftObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezAircraftCBNotifier()
|
||||
: ObserverGuezAircraftObjectCB("Callbacks.GuezAircraft")
|
||||
, rpr2::IObserverGuezAircraftObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAircraftObjClassCB
|
||||
rpr2::IObserverGuezAircraftObjInstanceCB &newGuezAircraftObjInstance(rpr2::IObserverGuezAircraftObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezAircraftObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ Aircrafts functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <TacticalStatusStruct.h>
|
||||
|
||||
#include "rpr_observer_aircraft_object_cb.h"
|
||||
|
||||
class ObserverGuezAircraftObjectCB : public ObserverAircraftObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezAircraftObjectCB(const char *loggerName = "Callbacks.GuezAircraft")
|
||||
: ObserverAircraftObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onTacticalStatusChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::TacticalStatusStruct &state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit tacticalStatusChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void tacticalStatusChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::TacticalStatusStruct &state, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezAircraftObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezAircraftObjClassCB.h>
|
||||
#include <IObserverGuezAircraftObjInstance.h>
|
||||
#include <IObserverGuezAircraftObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_aircraft_object_instance_cb.h"
|
||||
#include <TacticalStatusStruct.h>
|
||||
|
||||
class ObserverGuezAircraftObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezAircraftObjInstanceCB : public ObserverAircraftObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezAircraftObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezAircraft")
|
||||
: ObserverAircraftObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedTacticalStatus(const rpr2::TacticalStatusStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onTacticalStatusChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
using ObserverGuezAircraftObjInstanceCBType = ObserverGuezAircraftObjInstanceCB<rpr2::IObserverGuezAircraftObjInstanceCB,
|
||||
rpr2::IObserverGuezAircraftObjInstance,
|
||||
ObserverGuezAircraftObjectCB>;
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Aircraft instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_chemical_agent_area_object_cb.h"
|
||||
#include "rpr_observer_guez_chemical_agent_area_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Aircraft instances
|
||||
*/
|
||||
class ObserverGuezChemicalAgentAreaCBNotifier : public ObserverGuezChemicalAgentAreaObjectCB, public rpr2::IObserverGuezChemicalAgentAreaObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezChemicalAgentAreaCBNotifier()
|
||||
: ObserverGuezChemicalAgentAreaObjectCB("Callbacks.GuezChemicalAgentArea")
|
||||
, rpr2::IObserverGuezChemicalAgentAreaObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAircraftObjClassCB
|
||||
rpr2::IObserverGuezChemicalAgentAreaObjInstanceCB &newGuezChemicalAgentAreaObjInstance(rpr2::IObserverGuezChemicalAgentAreaObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezChemicalAgentAreaObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ ChemicalAgentAreas functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_cb.h"
|
||||
#include <ChemicalAgentTypeEnum8.h>
|
||||
#include <ClockTimeStruct.h>
|
||||
#include <OMT13string.h>
|
||||
|
||||
class ObserverGuezChemicalAgentAreaObjectCB : public ObserverOtherArealObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezChemicalAgentAreaObjectCB(const char *loggerName = "Callbacks.GuezChemicalAgentArea")
|
||||
: ObserverOtherArealObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAreaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit areaEffectSimulationNameChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onActivationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit activationTimeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onDurationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit durationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onDetonationLocationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit detonationLocationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onRadiusChanged(const rpr2::EntityIdentifierStruct &eis, ngs::FLOAT64 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit radiusChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onChemicalAgentTypeChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::ChemicalAgentTypeEnum8::ET value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit chemicalAgentTypeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onIsPermanentAgentChanged(const rpr2::EntityIdentifierStruct &eis, bool value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit isPermanentAgentChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void areaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, qint64 simTimeMSecs);
|
||||
void activationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, qint64 simTimeMSecs);
|
||||
void durationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void detonationLocationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &value, qint64 simTimeMSecs);
|
||||
void radiusChanged(const rpr2::EntityIdentifierStruct &eis, ngs::FLOAT64 value, qint64 simTimeMSecs);
|
||||
void chemicalAgentTypeChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::ChemicalAgentTypeEnum8::ET value, qint64 simTimeMSecs);
|
||||
void isPermanentAgentChanged(const rpr2::EntityIdentifierStruct &eis, bool value, qint64 simTimeMSecs);
|
||||
};
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezChemicalAgentAreaObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezChemicalAgentAreaObjClassCB.h>
|
||||
#include <IObserverGuezChemicalAgentAreaObjInstance.h>
|
||||
#include <IObserverGuezChemicalAgentAreaObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezChemicalAgentAreaObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezChemicalAgentAreaObjInstanceCB : public ObserverOtherArealObjectObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezChemicalAgentAreaObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezChemicalAgentArea")
|
||||
: ObserverOtherArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAreaEffectSimulationName(const rpr2::OMT13string &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onAreaEffectSimulationNameChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedActivationTime(const rpr2::ClockTimeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onActivationTimeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDuration(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDurationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDetonationLocation(const rpr2::WorldLocationStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDetonationLocationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedRadius(ngs::FLOAT64 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onRadiusChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedChemicalAgentType(rpr2::ChemicalAgentTypeEnum8::ET value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onChemicalAgentTypeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedIsPermanentAgent(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onIsPermanentAgentChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
};
|
||||
|
||||
using ObserverGuezChemicalAgentAreaObjInstanceCBType = ObserverGuezChemicalAgentAreaObjInstanceCB<rpr2::IObserverGuezChemicalAgentAreaObjInstanceCB,
|
||||
rpr2::IObserverGuezChemicalAgentAreaObjInstance,
|
||||
ObserverGuezChemicalAgentAreaObjectCB>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Aircraft instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_fire_support_object_cb.h"
|
||||
#include "rpr_observer_guez_fire_support_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Guez Fire Support instances
|
||||
*/
|
||||
class ObserverGuezFireSupportCBNotifier : public ObserverGuezFireSupportObjectCB, public rpr2::IObserverGuezFireSupportObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezFireSupportCBNotifier()
|
||||
: ObserverGuezFireSupportObjectCB("Callbacks.GuezFireSupport")
|
||||
, rpr2::IObserverGuezFireSupportObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAircraftObjClassCB
|
||||
rpr2::IObserverGuezFireSupportObjInstanceCB &newGuezFireSupportObjInstance(rpr2::IObserverGuezFireSupportObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezFireSupportObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ OtherArealObjects functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_cb.h"
|
||||
#include <ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array.h>
|
||||
#include <ClockTimeStruct.h>
|
||||
#include <OMT13string.h>
|
||||
|
||||
class ObserverGuezFireSupportObjectCB : public ObserverOtherArealObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezFireSupportObjectCB(const char *loggerName = "Callbacks.GuezFireSupport")
|
||||
: ObserverOtherArealObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAreaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit areaEffectSimulationNameChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onActivationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit activationTimeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onDurationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit durationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onRoundsChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit roundsChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onMunitionTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit munitionTypeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onFirePositionsChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit firePositionsChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onFireStateChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit fireStateChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void areaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, qint64 simTimeMSecs);
|
||||
void activationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, qint64 simTimeMSecs);
|
||||
void durationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void roundsChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void munitionTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &value, qint64 simTimeMSecs);
|
||||
void firePositionsChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value, qint64 simTimeMSecs);
|
||||
void fireStateChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array &value, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* template class to handle IObserverFireSupportObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezFireSupportObjClassCB.h>
|
||||
#include <IObserverGuezFireSupportObjInstance.h>
|
||||
#include <IObserverGuezFireSupportObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezFireSupportObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezFireSupportObjInstanceCB : public ObserverOtherArealObjectObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezFireSupportObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezFireSupport")
|
||||
: ObserverOtherArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAreaEffectSimulationName(const rpr2::OMT13string &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onAreaEffectSimulationNameChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedActivationTime(const rpr2::ClockTimeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onActivationTimeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDuration(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDurationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedRounds(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onRoundsChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMunitionType(const rpr2::EntityTypeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onMunitionTypeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedFirePositions(const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onFirePositionsChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedFireState(const rpr2::ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onFireStateChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
using ObserverGuezFireSupportObjInstanceCBType = ObserverGuezFireSupportObjInstanceCB<rpr2::IObserverGuezFireSupportObjInstanceCB,
|
||||
rpr2::IObserverGuezFireSupportObjInstance,
|
||||
ObserverGuezFireSupportObjectCB>;
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Aircraft instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_fire_support_single_shot_object_cb.h"
|
||||
#include "rpr_observer_guez_fire_support_single_shot_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Guez Fire Support instances
|
||||
*/
|
||||
class ObserverGuezFireSupportSingleShotCBNotifier : public ObserverGuezFireSupportSingleShotObjectCB, public rpr2::IObserverGuezFireSupportSingleShotObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezFireSupportSingleShotCBNotifier()
|
||||
: ObserverGuezFireSupportSingleShotObjectCB("Callbacks.GuezFireSupportSingleShot")
|
||||
, rpr2::IObserverGuezFireSupportSingleShotObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAircraftObjClassCB
|
||||
rpr2::IObserverGuezFireSupportSingleShotObjInstanceCB &newGuezFireSupportSingleShotObjInstance(rpr2::IObserverGuezFireSupportSingleShotObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezFireSupportSingleShotObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ OtherPointObjects functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_other_point_object_object_cb.h"
|
||||
#include <ClockTimeStruct.h>
|
||||
#include <OMT13string.h>
|
||||
|
||||
class ObserverGuezFireSupportSingleShotObjectCB : public ObserverOtherPointObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezFireSupportSingleShotObjectCB(const char *loggerName = "Callbacks.GuezFireSupportSingleShot")
|
||||
: ObserverOtherPointObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAreaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit areaEffectSimulationNameChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onActivationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit activationTimeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onDetonationLocationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit detonationLocationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onRadiusChanged(const rpr2::EntityIdentifierStruct &eis, ngs::FLOAT64 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit radiusChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onMunitionTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit munitionTypeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void areaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, qint64 simTimeMSecs);
|
||||
void activationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, qint64 simTimeMSecs);
|
||||
void detonationLocationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &value, qint64 simTimeMSecs);
|
||||
void radiusChanged(const rpr2::EntityIdentifierStruct &eis, ngs::FLOAT64 value, qint64 simTimeMSecs);
|
||||
void munitionTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &value, qint64 simTimeMSecs);
|
||||
};
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* template class to handle IObserverFireSupportObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezFireSupportSingleShotObjClassCB.h>
|
||||
#include <IObserverGuezFireSupportSingleShotObjInstance.h>
|
||||
#include <IObserverGuezFireSupportSingleShotObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_other_point_object_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezFireSupportSingleShotObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezFireSupportSingleShotObjInstanceCB : public ObserverOtherPointObjectObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezFireSupportSingleShotObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezFireSupportSingleShot")
|
||||
: ObserverOtherPointObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAreaEffectSimulationName(const rpr2::OMT13string &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onAreaEffectSimulationNameChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedActivationTime(const rpr2::ClockTimeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onActivationTimeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDetonationLocation(const rpr2::WorldLocationStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDetonationLocationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedRadius(ngs::FLOAT64 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onRadiusChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMunitionType(const rpr2::EntityTypeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onMunitionTypeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
using ObserverGuezFireSupportSingleShotObjInstanceCBType = ObserverGuezFireSupportSingleShotObjInstanceCB<rpr2::IObserverGuezFireSupportSingleShotObjInstanceCB,
|
||||
rpr2::IObserverGuezFireSupportSingleShotObjInstance,
|
||||
ObserverGuezFireSupportSingleShotObjectCB>;
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an GUEZ GroundVehicle instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_groundvehicle_object_cb.h"
|
||||
#include "rpr_observer_guez_groundvehicle_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new ground vehicle instances
|
||||
*/
|
||||
class ObserverGuezGroundVehicleCBNotifier : public ObserverGuezGroundVehicleObjectCB, public rpr2::IObserverGuezGroundVehicleObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverGuezGroundVehicleCBNotifier()
|
||||
: ObserverGuezGroundVehicleObjectCB("Callbacks.GuezGroundVehicle")
|
||||
, rpr2::IObserverGuezGroundVehicleObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverGroundVehicleObjClassCB
|
||||
rpr2::IObserverGuezGroundVehicleObjInstanceCB &newGuezGroundVehicleObjInstance(rpr2::IObserverGuezGroundVehicleObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezGroundVehicleObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ Humans functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_groundvehicle_object_cb.h"
|
||||
#include <TacticalStatusStruct.h>
|
||||
|
||||
class ObserverGuezGroundVehicleObjectCB : public ObserverGroundVehicleObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezGroundVehicleObjectCB(const char *loggerName = "Callbacks.GuezGroundVehicle")
|
||||
: ObserverGroundVehicleObjectCB(loggerName)
|
||||
{}
|
||||
~ObserverGuezGroundVehicleObjectCB() {}
|
||||
|
||||
void onTacticalStatusChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::TacticalStatusStruct &state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit tacticalStatusChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void tacticalStatusChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::TacticalStatusStruct &state, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezGroundVehicleObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezGroundVehicleObjClassCB.h>
|
||||
#include <IObserverGuezGroundVehicleObjInstance.h>
|
||||
#include <IObserverGuezGroundVehicleObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_groundvehicle_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezGroundVehicleObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezGroundVehicleObjInstanceCB : public ObserverGroundVehicleObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezGroundVehicleObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezGroundVehicle")
|
||||
: ObserverGroundVehicleObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedTacticalStatus(const rpr2::TacticalStatusStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onTacticalStatusChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
};
|
||||
|
||||
using ObserverGuezGroundVehicleObjInstanceCBType = ObserverGuezGroundVehicleObjInstanceCB<rpr2::IObserverGuezGroundVehicleObjInstanceCB,
|
||||
rpr2::IObserverGuezGroundVehicleObjInstance,
|
||||
ObserverGuezGroundVehicleObjectCB>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an GUEZ Human instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_human_object_cb.h"
|
||||
#include "rpr_observer_guez_human_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new human instances
|
||||
*/
|
||||
class ObserverGuezHumanCBNotifier : public ObserverGuezHumanObjectCB, public rpr2::IObserverGuezHumanObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezHumanCBNotifier()
|
||||
: ObserverGuezHumanObjectCB("Callbacks.GuezHuman")
|
||||
, rpr2::IObserverGuezHumanObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverHumanObjClassCB
|
||||
rpr2::IObserverGuezHumanObjInstanceCB &newGuezHumanObjInstance(rpr2::IObserverGuezHumanObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezHumanObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ Humans functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_human_object_cb.h"
|
||||
#include <TacticalStatusStruct.h>
|
||||
|
||||
class ObserverGuezHumanObjectCB : public ObserverHumanObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezHumanObjectCB(const char *loggerName = "Callbacks.GuezHuman")
|
||||
: ObserverHumanObjectCB(loggerName)
|
||||
{}
|
||||
~ObserverGuezHumanObjectCB() {}
|
||||
|
||||
void onTacticalStatusChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::TacticalStatusStruct &state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit tacticalStatusChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void tacticalStatusChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::TacticalStatusStruct &state, qint64 simTimeMSecs);
|
||||
};
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezHumanObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezHumanObjClassCB.h>
|
||||
#include <IObserverGuezHumanObjInstance.h>
|
||||
#include <IObserverGuezHumanObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_human_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezHumanObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezHumanObjInstanceCB : public ObserverHumanObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezHumanObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezHuman")
|
||||
: ObserverHumanObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedTacticalStatus(const rpr2::TacticalStatusStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onTacticalStatusChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
};
|
||||
|
||||
using ObserverGuezHumanObjInstanceCBType = ObserverGuezHumanObjInstanceCB<rpr2::IObserverGuezHumanObjInstanceCB,
|
||||
rpr2::IObserverGuezHumanObjInstance,
|
||||
ObserverGuezHumanObjectCB>;
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Minefield instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_minefield_breach_object_cb.h"
|
||||
#include "rpr_observer_guez_minefield_breach_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Minefield instances
|
||||
*/
|
||||
class ObserverGuezMineFieldBreachCBNotifier : public ObserverGuezMineFieldBreachObjectCB, public rpr2::IObserverGuezMineFieldBreachObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezMineFieldBreachCBNotifier()
|
||||
: ObserverGuezMineFieldBreachObjectCB("Callbacks.GuezMineFieldBreach")
|
||||
, rpr2::IObserverGuezMineFieldBreachObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverMinefieldObjClassCB
|
||||
rpr2::IObserverGuezMineFieldBreachObjInstanceCB &newGuezMineFieldBreachObjInstance(rpr2::IObserverGuezMineFieldBreachObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezMineFieldBreachObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ Minefields functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_cb.h"
|
||||
#include <ClockTimeStruct.h>
|
||||
#include <OMT13string.h>
|
||||
|
||||
class ObserverGuezMineFieldBreachObjectCB : public ObserverOtherArealObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezMineFieldBreachObjectCB(const char *loggerName = "Callbacks.GuezMineFieldBreach")
|
||||
: ObserverOtherArealObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAreaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit areaEffectSimulationNameChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onActivationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit activationTimeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void areaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, qint64 simTimeMSecs);
|
||||
void activationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezMineFieldBreachObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezMineFieldBreachObjClassCB.h>
|
||||
#include <IObserverGuezMineFieldBreachObjInstance.h>
|
||||
#include <IObserverGuezMineFieldBreachObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezMineFieldBreachObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezMineFieldBreachObjInstanceCB : public ObserverOtherArealObjectObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezMineFieldBreachObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezMineFieldBreach")
|
||||
: ObserverOtherArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAreaEffectSimulationName(const rpr2::OMT13string &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onAreaEffectSimulationNameChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedActivationTime(const rpr2::ClockTimeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onActivationTimeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
using ObserverGuezMineFieldBreachObjInstanceCBType = ObserverGuezMineFieldBreachObjInstanceCB<rpr2::IObserverGuezMineFieldBreachObjInstanceCB,
|
||||
rpr2::IObserverGuezMineFieldBreachObjInstance,
|
||||
ObserverGuezMineFieldBreachObjectCB>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Minefield instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_minefield_object_cb.h"
|
||||
#include "rpr_observer_guez_minefield_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Minefield instances
|
||||
*/
|
||||
class ObserverGuezMineFieldCBNotifier : public ObserverGuezMineFieldObjectCB, public rpr2::IObserverGuezMineFieldObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezMineFieldCBNotifier()
|
||||
: ObserverGuezMineFieldObjectCB("Callbacks.GuezMineField")
|
||||
, rpr2::IObserverGuezMineFieldObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverMinefieldObjClassCB
|
||||
rpr2::IObserverGuezMineFieldObjInstanceCB &newGuezMineFieldObjInstance(rpr2::IObserverGuezMineFieldObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezMineFieldObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ Minefields functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_cb.h"
|
||||
#include <OMT13string.h>
|
||||
|
||||
namespace rpr2
|
||||
{
|
||||
class ClockTimeStruct;
|
||||
class ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array;
|
||||
}
|
||||
|
||||
class ObserverGuezMineFieldObjectCB : public ObserverOtherArealObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezMineFieldObjectCB(const char *loggerName = "Callbacks.GuezMineField")
|
||||
: ObserverOtherArealObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAreaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit areaEffectSimulationNameChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onActivationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit activationTimeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onDurationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit durationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onMineTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit mineTypeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onMineCountChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit mineCountChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onMinePositionsChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit minePositionsChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onMineStateChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit mineStateChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onWidthChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit widthChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onLengthChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit lengthChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void areaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, qint64 simTimeMSecs);
|
||||
void activationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, qint64 simTimeMSecs);
|
||||
void durationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void mineTypeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::EntityTypeStruct &value, qint64 simTimeMSecs);
|
||||
void mineCountChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void minePositionsChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value, qint64 simTimeMSecs);
|
||||
void mineStateChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array &value, qint64 simTimeMSecs);
|
||||
void widthChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void lengthChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezMineFieldObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezMineFieldObjClassCB.h>
|
||||
#include <IObserverGuezMineFieldObjInstance.h>
|
||||
#include <IObserverGuezMineFieldObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezMineFieldObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezMineFieldObjInstanceCB : public ObserverOtherArealObjectObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezMineFieldObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezMineField")
|
||||
: ObserverOtherArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAreaEffectSimulationName(const rpr2::OMT13string &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onAreaEffectSimulationNameChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedActivationTime(const rpr2::ClockTimeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onActivationTimeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
void changedDuration(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDurationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMineType(const rpr2::EntityTypeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onMineTypeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMineCount(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onMineCountChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMinePositions(const rpr2::ArrayOfWorldLocationStructDynamicHLAlengthlessVarArray &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onMinePositionsChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMineState(const rpr2::ArrayOfHLAoctetN_slsh_AperfectalwaysN_slsh_ADynamicHLApaddingTo32Array &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onMineStateChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedWidth(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onWidthChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedLength(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onLengthChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
};
|
||||
|
||||
using ObserverGuezMineFieldObjInstanceCBType = ObserverGuezMineFieldObjInstanceCB<rpr2::IObserverGuezMineFieldObjInstanceCB,
|
||||
rpr2::IObserverGuezMineFieldObjInstance,
|
||||
ObserverGuezMineFieldObjectCB>;
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in a GUEZ Aircraft instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_nuclear_agent_area_object_cb.h"
|
||||
#include "rpr_observer_guez_nuclear_agent_area_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new Aircraft instances
|
||||
*/
|
||||
class ObserverGuezNuclearAgentAreaCBNotifier : public ObserverGuezNuclearAgentAreaObjectCB, public rpr2::IObserverGuezNuclearAgentAreaObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezNuclearAgentAreaCBNotifier()
|
||||
: ObserverGuezNuclearAgentAreaObjectCB("Callbacks.GuezNuclearAgentArea")
|
||||
, rpr2::IObserverGuezNuclearAgentAreaObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverAircraftObjClassCB
|
||||
rpr2::IObserverGuezNuclearAgentAreaObjInstanceCB &newGuezNuclearAgentAreaObjInstance(rpr2::IObserverGuezNuclearAgentAreaObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezNuclearAgentAreaObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* class to handle signals for Observer GUEZ NuclearAgentAreas functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_cb.h"
|
||||
#include <ClockTimeStruct.h>
|
||||
#include <OMT13string.h>
|
||||
|
||||
class ObserverGuezNuclearAgentAreaObjectCB : public ObserverOtherArealObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezNuclearAgentAreaObjectCB(const char *loggerName = "Callbacks.GuezNuclearAgentArea")
|
||||
: ObserverOtherArealObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onAreaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit areaEffectSimulationNameChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onActivationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit activationTimeChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onDurationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit durationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onDetonationLocationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit detonationLocationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onRadiusChanged(const rpr2::EntityIdentifierStruct &eis, ngs::FLOAT64 value, const ngs::SimTime &simTime)
|
||||
{
|
||||
emit radiusChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void areaEffectSimulationNameChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OMT13string &value, qint64 simTimeMSecs);
|
||||
void activationTimeChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::ClockTimeStruct &value, qint64 simTimeMSecs);
|
||||
void durationChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 value, qint64 simTimeMSecs);
|
||||
void detonationLocationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &value, qint64 simTimeMSecs);
|
||||
void radiusChanged(const rpr2::EntityIdentifierStruct &eis, ngs::FLOAT64 value, qint64 simTimeMSecs);
|
||||
};
|
||||
Lts/Proxies/HighLevelArchitecture/Guez/rpr/rpr_observer_guez_nuclear_agent_area_object_instance_cb.h
Executable
+76
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezNuclearAgentAreaObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezNuclearAgentAreaObjClassCB.h>
|
||||
#include <IObserverGuezNuclearAgentAreaObjInstance.h>
|
||||
#include <IObserverGuezNuclearAgentAreaObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_other_areal_object_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezNuclearAgentAreaObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezNuclearAgentAreaObjInstanceCB : public ObserverOtherArealObjectObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezNuclearAgentAreaObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezNuclearAgentArea")
|
||||
: ObserverOtherArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
void changedAreaEffectSimulationName(const rpr2::OMT13string &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onAreaEffectSimulationNameChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedActivationTime(const rpr2::ClockTimeStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onActivationTimeChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDuration(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDurationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDetonationLocation(const rpr2::WorldLocationStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDetonationLocationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedRadius(ngs::FLOAT64 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onRadiusChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
};
|
||||
|
||||
using ObserverGuezNuclearAgentAreaObjInstanceCBType = ObserverGuezNuclearAgentAreaObjInstanceCB<rpr2::IObserverGuezNuclearAgentAreaObjInstanceCB,
|
||||
rpr2::IObserverGuezNuclearAgentAreaObjInstance,
|
||||
ObserverGuezNuclearAgentAreaObjectCB>;
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an GuezObserverController instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_guez_observer_controller_object_cb.h"
|
||||
#include "rpr_observer_guez_observer_controller_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new guez observer controller instances
|
||||
*/
|
||||
class ObserverGuezObserverControllerCBNotifier : public ObserverGuezObserverControllerObjectCB, public rpr2::IObserverGuezObserverControllerObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezObserverControllerCBNotifier()
|
||||
: ObserverGuezObserverControllerObjectCB("Callbacks.GuezObserverController")
|
||||
, rpr2::IObserverGuezObserverControllerObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverGuezObserverControllerObjClassCB
|
||||
rpr2::IObserverGuezObserverControllerObjInstanceCB &newGuezObserverControllerObjInstance(rpr2::IObserverGuezObserverControllerObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverGuezObserverControllerObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverGuezObserverControllers functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_human_object_cb.h"
|
||||
|
||||
class ObserverGuezObserverControllerObjectCB : public ObserverHumanObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverGuezObserverControllerObjectCB(const char *loggerName = "Callbacks.GuezObserverController")
|
||||
: ObserverHumanObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* template class to handle IObserverGuezObserverControllerObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverGuezObserverControllerObjClassCB.h>
|
||||
#include <IObserverGuezObserverControllerObjInstance.h>
|
||||
#include <IObserverGuezObserverControllerObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_human_object_instance_cb.h"
|
||||
|
||||
class ObserverGuezObserverControllerObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverGuezObserverControllerObjInstanceCB : public ObserverHumanObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverGuezObserverControllerObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.GuezObserverController")
|
||||
: ObserverHumanObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
};
|
||||
|
||||
using ObserverGuezObserverControllerObjInstanceCBType = ObserverGuezObserverControllerObjInstanceCB<rpr2::IObserverGuezObserverControllerObjInstanceCB,
|
||||
rpr2::IObserverGuezObserverControllerObjInstance,
|
||||
ObserverGuezObserverControllerObjectCB>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an Human instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_human_object_cb.h"
|
||||
#include "rpr_observer_human_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new human instances
|
||||
*/
|
||||
class ObserverHumanCBNotifier : public ObserverHumanObjectCB, public rpr2::IObserverHumanObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverHumanCBNotifier()
|
||||
: ObserverHumanObjectCB("Callbacks.Human")
|
||||
, rpr2::IObserverHumanObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverHumanObjClassCB
|
||||
rpr2::IObserverHumanObjInstanceCB &newHumanObjInstance(rpr2::IObserverHumanObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverHumanObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverHumans functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_lifeform_object_cb.h"
|
||||
|
||||
class ObserverHumanObjectCB : public ObserverLifeformObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverHumanObjectCB(const char *loggerName = "Callbacks.Human")
|
||||
: ObserverLifeformObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* template class to handle IObserverHumanObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverHumanObjClassCB.h>
|
||||
#include <IObserverHumanObjInstance.h>
|
||||
#include <IObserverHumanObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_lifeform_object_instance_cb.h"
|
||||
|
||||
class ObserverHumanObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverHumanObjInstanceCB : public ObserverLifeformObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverHumanObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.Human")
|
||||
: ObserverLifeformObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
};
|
||||
|
||||
using ObserverHumanObjInstanceCBType = ObserverHumanObjInstanceCB<rpr2::IObserverHumanObjInstanceCB,
|
||||
rpr2::IObserverHumanObjInstance,
|
||||
ObserverHumanObjectCB>;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverLifeforms functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_physicalentity_object_cb.h"
|
||||
|
||||
class ObserverLifeformObjectCB : public ObserverPhysicalEntityObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverLifeformObjectCB(const char *loggerName = "Callbacks.Lifeform")
|
||||
: ObserverPhysicalEntityObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* template class to handle IObserverLifeformObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverLifeformObjClassCB.h>
|
||||
#include <IObserverLifeformObjInstance.h>
|
||||
#include <IObserverLifeformObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_physicalentity_object_instance_cb.h"
|
||||
|
||||
class ObserverLifeformObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverLifeformObjInstanceCB : public ObserverPhysicalEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverLifeformObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.Lifeform")
|
||||
: ObserverPhysicalEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
//
|
||||
// IObserverLifeformObjInstanceCB
|
||||
//
|
||||
// Declarations for pure virtual functions
|
||||
void changedFlashLightsOn(bool) override {}
|
||||
void changedStanceCode(rpr2::StanceCodeEnum32::ET) override {}
|
||||
void changedPrimaryWeaponState(rpr2::WeaponStateEnum32::ET) override {}
|
||||
void changedSecondaryWeaponState(rpr2::WeaponStateEnum32::ET) override {}
|
||||
void changedComplianceState(rpr2::ComplianceStateEnum32::ET) override {}
|
||||
};
|
||||
|
||||
using ObserverLifeformObjInstanceCBType = ObserverLifeformObjInstanceCB<rpr2::IObserverLifeformObjInstanceCB,
|
||||
rpr2::IObserverLifeformObjInstance,
|
||||
ObserverLifeformObjectCB>;
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* class to handle signals for ObserverObjects functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <IObserverBaseEntityObjInstance.h>
|
||||
#include <IObserverEnvironmentObjectObjInstance.h>
|
||||
|
||||
#include <Common/logger.h>
|
||||
|
||||
class ObserverObjectCB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverObjectCB(const char *loggerName = "Callbacks.Object")
|
||||
: m_logger(HighLevelArchitecture::getLogger(loggerName))
|
||||
{}
|
||||
|
||||
template<typename T>
|
||||
typename T::IObjectCallback &newObjectInstance(typename T::Object &object)
|
||||
{
|
||||
typedef typename T::ObjectCallback OBJ_CB;
|
||||
|
||||
OBJ_CB *that = dynamic_cast<OBJ_CB *>(this);
|
||||
T *cb = new T(*that); //Neues Observer-Objekt erstellen
|
||||
cb->setInterface(&object); //Merken des Objekts, falls man die get-Funktionen nutzen möchte
|
||||
emit newObjectInstance2(object); //Bekannt machen, das ein neues Objekt gemeldet wurde
|
||||
return *cb; //Hier wird der Observer für dieses Objekt zurückgegeben.
|
||||
}
|
||||
|
||||
void deleteObjectInstance(const ngs::IObserverObjectInstance &object)
|
||||
{
|
||||
emit objectInstanceDeleted(object);
|
||||
}
|
||||
Q_SIGNALS:
|
||||
void newObjectInstance(const ngs::IObserverObjectInstance &object);
|
||||
void newObjectInstance2(const ngs::IObserverObjectInstance &object);
|
||||
void objectInstanceDeleted(const ngs::IObserverObjectInstance &object);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* template class to handle IObserverBaseEntityObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverObjectInstanceCallback.h>
|
||||
|
||||
#include <Common/logger.h>
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverObjectInstanceCB : public IOBJ_CB
|
||||
{
|
||||
public:
|
||||
explicit ObserverObjectInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.Object")
|
||||
: m_pIObject(nullptr)
|
||||
, m_pCB(&hoicb)
|
||||
, m_logger(HighLevelArchitecture::getLogger(loggerName))
|
||||
{}
|
||||
|
||||
void setInterface(OBJ *_piobject) { m_pIObject = _piobject; }
|
||||
|
||||
//
|
||||
// IObserverObjectInstanceCallback
|
||||
//
|
||||
// Declarations for pure virtual functions
|
||||
void deleteObjectInstance() override
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "deleteObjectInstance";
|
||||
if (m_pCB && m_pIObject)
|
||||
m_pCB->deleteObjectInstance(*m_pIObject);
|
||||
delete this;
|
||||
}
|
||||
|
||||
void anyAttributesChanged() override
|
||||
{
|
||||
//DEBUG_LOG(m_logger) << "anyAttributeChanged on EntityID:"<< m_pIObject->getEntityIdentifier().EntityNumber;
|
||||
}
|
||||
|
||||
typedef OBJ Object;
|
||||
typedef OBJ_CB ObjectCallback;
|
||||
typedef IOBJ_CB IObjectCallback;
|
||||
|
||||
protected:
|
||||
OBJ *m_pIObject;
|
||||
OBJ_CB *m_pCB;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverArealObject functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_areal_object_object_cb.h"
|
||||
|
||||
class ObserverOtherArealObjectObjectCB : public ObserverArealObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverOtherArealObjectObjectCB(const char *loggerName = "Callbacks.OtherArealObject")
|
||||
: ObserverArealObjectObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* template class to handle IObserverArealObjectObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverOtherArealObjectObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_areal_object_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverOtherArealObjectObjInstanceCB : public ObserverArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverOtherArealObjectObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.OtherArealObject")
|
||||
: ObserverArealObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverPointObject functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_point_object_object_cb.h"
|
||||
|
||||
class ObserverOtherPointObjectObjectCB : public ObserverPointObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverOtherPointObjectObjectCB(const char *loggerName = "Callbacks.OtherPointObject")
|
||||
: ObserverPointObjectObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* template class to handle IObserverPointObjectObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverOtherPointObjectObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_point_object_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverOtherPointObjectObjInstanceCB : public ObserverPointObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverOtherPointObjectObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.OtherPointObject")
|
||||
: ObserverPointObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
};
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* class to handle signals for ObserverPhysicalEntities functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_baseentity_object_cb.h"
|
||||
#include <MarkingStruct.h>
|
||||
|
||||
class ObserverPhysicalEntityObjectCB : public ObserverBaseEntityObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverPhysicalEntityObjectCB(const char *loggerName = "Callbacks.PhysicalEntity")
|
||||
: ObserverBaseEntityObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onForceIdentifierChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
rpr2::ForceIdentifierEnum8::ET identifier,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit forceIdentifierChanged(eis, identifier, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
void onMarkingChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::MarkingStruct &marking,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit markingChanged(eis, marking, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void forceIdentifierChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::ForceIdentifierEnum8::ET state, qint64 simTimeMSecs);
|
||||
void markingChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::MarkingStruct &marking, qint64 simTimeMSecs);
|
||||
};
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* template class to handle IObserverPhysicalEntityObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverPhysicalEntityObjInstanceCB.h>
|
||||
#include <MarkingStruct.h>
|
||||
|
||||
#include "rpr_observer_baseentity_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverPhysicalEntityObjInstanceCB : public ObserverBaseEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverPhysicalEntityObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.PhysicalEntity")
|
||||
: ObserverBaseEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
//
|
||||
// IObserverPhysicalEntityObjInstanceCB
|
||||
//
|
||||
void changedForceIdentifier(rpr2::ForceIdentifierEnum8::ET data) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onForceIdentifierChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
data,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedMarking(const rpr2::MarkingStruct &data) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidEntityType())
|
||||
return;
|
||||
this->m_pCB->onMarkingChanged(this->m_pIObject->getEntityIdentifier(),
|
||||
data,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
// Declarations for pure virtual functions
|
||||
void changedDamageState(rpr2::DamageStatusEnum32::ET) override {}
|
||||
void changedFirePowerDisabled(bool) override {}
|
||||
void changedImmobilized(bool) override {}
|
||||
void changedAcousticSignatureIndex(short) override {}
|
||||
void changedAlternateEntityType(const rpr2::EntityTypeStruct &) override {}
|
||||
void changedArticulatedParametersArray(const rpr2::ArrayOfArticulatedParameterStructDynamicHLAunpaddedLengthlessVarArray &) override {}
|
||||
void receivedArticulatedParametersArray(const rpr2::ArrayOfArticulatedParameterStructDynamicHLAunpaddedLengthlessVarArray &, const ngs::SimTime &) override {}
|
||||
void changedCamouflageType(rpr2::CamouflageEnum32::ET) override {}
|
||||
void changedEngineSmokeOn(bool) override {}
|
||||
void changedFlamesPresent(bool) override {}
|
||||
void changedHasAmmunitionSupplyCap(bool) override {}
|
||||
void changedHasFuelSupplyCap(bool) override {}
|
||||
void changedHasRecoveryCap(bool) override {}
|
||||
void changedHasRepairCap(bool) override {}
|
||||
void changedInfraredSignatureIndex(short) override {}
|
||||
void changedIsConcealed(bool) override {}
|
||||
void changedLiveEntityMeasuredSpeed(unsigned short) override {}
|
||||
void changedPowerPlantOn(bool) override {}
|
||||
void changedPropulsionSystemsData(const rpr2::ArrayOfPropulsionSystemDataStructDynamicHLAlengthlessVarArray &) override {}
|
||||
void changedRadarCrossSectionSignatureIndex(short) override {}
|
||||
void changedSmokePlumePresent(bool) override {}
|
||||
void changedTentDeployed(bool) override {}
|
||||
void changedTrailingEffectsCode(rpr2::TrailingEffectsCodeEnum32::ET) override {}
|
||||
void changedVectoringNozzleSystemData(const rpr2::ArrayOfVectoringNozzleSystemDataStructDynamicHLAlengthlessVarArray &) override {}
|
||||
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverPlatforms functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_physicalentity_object_cb.h"
|
||||
|
||||
class ObserverPlatformObjectCB : public ObserverPhysicalEntityObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverPlatformObjectCB(const char *loggerName = "Callbacks.Platform")
|
||||
: ObserverPhysicalEntityObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* template class to handle IObserverPlatformObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverPlatformObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_physicalentity_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverPlatformObjInstanceCB : public ObserverPhysicalEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverPlatformObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.Platform")
|
||||
: ObserverPhysicalEntityObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
//
|
||||
// IObserverPlatformObjInstanceCB
|
||||
//
|
||||
// Declarations for pure virtual functions
|
||||
void changedAfterburnerOn(bool) override {}
|
||||
void changedAntiCollisionLightsOn(bool) override {}
|
||||
void changedBlackOutBrakeLightsOn(bool) override {}
|
||||
void changedBlackOutLightsOn(bool) override {}
|
||||
void changedBrakeLightsOn(bool) override {}
|
||||
void changedFormationLightsOn(bool) override {}
|
||||
void changedHatchState(rpr2::HatchStateEnum32::ET) override {}
|
||||
void changedHeadLightsOn(bool) override {}
|
||||
void changedInteriorLightsOn(bool) override {}
|
||||
void changedLandingLightsOn(bool) override {}
|
||||
void changedLauncherRaised(bool) override {}
|
||||
void changedNavigationLightsOn(bool) override {}
|
||||
void changedRampDeployed(bool) override {}
|
||||
void changedRunningLightsOn(bool) override {}
|
||||
void changedSpotLightsOn(bool) override {}
|
||||
void changedTailLightsOn(bool) override {}
|
||||
};
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* class to handle signals for ObserverBaseEntities functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_environment_object_object_cb.h"
|
||||
|
||||
#include <EntityIdentifierStruct.h>
|
||||
|
||||
namespace rpr2
|
||||
{
|
||||
class WorldLocationStruct;
|
||||
class OrientationStruct;
|
||||
}
|
||||
|
||||
class ObserverPointObjectObjectCB : public ObserverEnvironmentObjectObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverPointObjectObjectCB(const char *loggerName = "Callbacks.PointObject")
|
||||
: ObserverEnvironmentObjectObjectCB(loggerName)
|
||||
{}
|
||||
|
||||
void onLocationChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::WorldLocationStruct &value,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit locationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onOrientationChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
const rpr2::OrientationStruct &value,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit orientationChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onPercentCompleteChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
ngs::UINT32 value,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit percentCompleteChanged(eis, value, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onDamagedAppearanceChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
rpr2::DamageStatusEnum32::ET state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit damagedAppearanceChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onObjectPreDistributedChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit objectPreDistributedChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onDeactivatedChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit deactivatedChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onSmokingChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit smokingChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
void onFlamingChanged(const rpr2::EntityIdentifierStruct &eis,
|
||||
bool state,
|
||||
const ngs::SimTime &simTime)
|
||||
{
|
||||
emit flamingChanged(eis, state, simTime.getSeconds() * 1000ULL + simTime.getMicroSeconds() / 1000ULL);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void locationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::WorldLocationStruct &location, qint64 simTimeMSecs);
|
||||
void orientationChanged(const rpr2::EntityIdentifierStruct &eis, const rpr2::OrientationStruct &orientation, qint64 simTimeMSecs);
|
||||
|
||||
void percentCompleteChanged(const rpr2::EntityIdentifierStruct &eis, ngs::UINT32 state, qint64 simTimeMSecs);
|
||||
void damagedAppearanceChanged(const rpr2::EntityIdentifierStruct &eis, rpr2::DamageStatusEnum32::ET state, qint64 simTimeMSecs);
|
||||
void objectPreDistributedChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
void deactivatedChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
void smokingChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
void flamingChanged(const rpr2::EntityIdentifierStruct &eis, bool state, qint64 simTimeMSecs);
|
||||
|
||||
};
|
||||
Executable
+100
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* template class to handle IObserverPointObjectObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverPointObjectObjInstanceCB.h>
|
||||
#include <EntityIdentifierStruct.h>
|
||||
#include <SpatialStruct.h>
|
||||
#include <WorldLocationStruct.h>
|
||||
|
||||
#include <NGSUtils/SimTime.h>
|
||||
|
||||
#include "rpr_observer_environment_object_object_instance_cb.h"
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverPointObjectObjInstanceCB : public ObserverEnvironmentObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverPointObjectObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.PointObject")
|
||||
: ObserverEnvironmentObjectObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
|
||||
// Declarations for pure virtual functions
|
||||
|
||||
void changedLocation(const rpr2::WorldLocationStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onLocationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedOrientation(const rpr2::OrientationStruct &value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onOrientationChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedPercentComplete(ngs::UINT32 value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onPercentCompleteChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDamagedAppearance(rpr2::DamageStatusEnum32::ET value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDamagedAppearanceChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedObjectPreDistributed(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onObjectPreDistributedChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedDeactivated(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onDeactivatedChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedSmoking(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onSmokingChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
|
||||
void changedFlaming(bool value) override
|
||||
{
|
||||
if (!this->m_pIObject->isValidObjectType())
|
||||
return;
|
||||
this->m_pCB->onFlamingChanged(this->m_pIObject->getObjectIdentifier(),
|
||||
value,
|
||||
this->m_pIObject->getLatestTimeStamp());
|
||||
}
|
||||
};
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* A notifier to inform NGSConnector about changes in an SurfaceVessel instance
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_global.h"
|
||||
#include "rpr_observer_surfacevessel_object_cb.h"
|
||||
#include "rpr_observer_surfacevessel_object_instance_cb.h"
|
||||
|
||||
/**
|
||||
* The notifier for new ground vehicle instances
|
||||
*/
|
||||
class ObserverSurfaceVesselCBNotifier : public ObserverSurfaceVesselObjectCB, public rpr2::IObserverSurfaceVesselObjClassCB
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ObserverSurfaceVesselCBNotifier()
|
||||
: ObserverSurfaceVesselObjectCB("Callbacks.SurfaceVessel")
|
||||
, rpr2::IObserverSurfaceVesselObjClassCB()
|
||||
{}
|
||||
|
||||
//Abstract functions realized from IObserverSurfaceVesselObjClassCB
|
||||
rpr2::IObserverSurfaceVesselObjInstanceCB &newSurfaceVesselObjInstance(rpr2::IObserverSurfaceVesselObjInstance &object) override
|
||||
{
|
||||
return newObjectInstance<ObserverSurfaceVesselObjInstanceCBType>(object);
|
||||
}
|
||||
|
||||
void deleteInterface() override {}
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* class to handle signals for ObserverHumans functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpr_observer_platform_object_cb.h"
|
||||
|
||||
class ObserverSurfaceVesselObjectCB : public ObserverPlatformObjectCB
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObserverSurfaceVesselObjectCB(const char *loggerName = "Callbacks.SurfaceVessel")
|
||||
: ObserverPlatformObjectCB(loggerName)
|
||||
{}
|
||||
};
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* template class to handle IObserverSurfaceVesselObjInstanceCB functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IObserverSurfaceVesselObjClassCB.h>
|
||||
#include <IObserverSurfaceVesselObjInstance.h>
|
||||
#include <IObserverSurfaceVesselObjInstanceCB.h>
|
||||
|
||||
#include "rpr_observer_platform_object_instance_cb.h"
|
||||
|
||||
class ObserverSurfaceVesselObjectCB;
|
||||
|
||||
template<typename IOBJ_CB, typename OBJ, typename OBJ_CB>
|
||||
class ObserverSurfaceVesselObjInstanceCB : public ObserverPlatformObjInstanceCB<IOBJ_CB,
|
||||
OBJ,
|
||||
OBJ_CB>
|
||||
{
|
||||
public:
|
||||
explicit ObserverSurfaceVesselObjInstanceCB(OBJ_CB &hoicb, const char *loggerName = "Observer.SurfaceVessel")
|
||||
: ObserverPlatformObjInstanceCB<IOBJ_CB, OBJ, OBJ_CB>(hoicb, loggerName)
|
||||
{}
|
||||
};
|
||||
|
||||
using ObserverSurfaceVesselObjInstanceCBType = ObserverSurfaceVesselObjInstanceCB<rpr2::IObserverSurfaceVesselObjInstanceCB,
|
||||
rpr2::IObserverSurfaceVesselObjInstance,
|
||||
ObserverSurfaceVesselObjectCB>;
|
||||
Reference in new issue
Block a user