[installation] Change to nightly
This commit is contained in:
@ -21,29 +21,28 @@
|
||||
|
||||
using namespace Seiscomp::Processing;
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Applications {
|
||||
namespace Qc {
|
||||
|
||||
typedef std::list<QcParameterCPtr> BufferBase;
|
||||
|
||||
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
using BufferBase = std::list<QcParameterCPtr>;
|
||||
|
||||
|
||||
DEFINE_SMARTPOINTER(QcBuffer);
|
||||
|
||||
class SC_QCPLUGIN_API QcBuffer : public Core::BaseObject, public BufferBase {
|
||||
public:
|
||||
QcBuffer();
|
||||
QcBuffer(double maxBufferSize);
|
||||
|
||||
|
||||
mutable Core::Time lastEvalTime;
|
||||
|
||||
void push_back(const QcParameter *qcp);
|
||||
void push_back(const std::string *streamID, const QcParameter *qcp);
|
||||
|
||||
/*
|
||||
const QcParameter* qcParameter(const Core::Time &time) const;
|
||||
const QcBuffer* qcParameter(const Core::Time &startTime, const Core::Time &endTime) const;
|
||||
*/
|
||||
QcBuffer *qcParameter(const Core::TimeSpan &lastNSeconds) const;
|
||||
//! Return a list of qcParameters for the most recent time span.
|
||||
QcBuffer *qcParameter(const Core::TimeSpan &timeSpan) const;
|
||||
|
||||
void info() const;
|
||||
void dump() const;
|
||||
@ -54,17 +53,10 @@ class SC_QCPLUGIN_API QcBuffer : public Core::BaseObject, public BufferBase {
|
||||
const Core::Time& endTime() const;
|
||||
Core::TimeSpan length() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double _maxBufferSize;
|
||||
bool _recentlyUsed;
|
||||
|
||||
|
||||
bool _recentlyUsed;
|
||||
};
|
||||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -87,22 +87,28 @@ class SC_QCPLUGIN_API QcIndexMap {
|
||||
size_t size() const {
|
||||
return _indexMap.size();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::map<std::string, Core::Time> _indexMap;
|
||||
};
|
||||
|
||||
|
||||
DEFINE_SMARTPOINTER(QcMessenger);
|
||||
|
||||
class SC_QCPLUGIN_API QcMessenger : public Core::BaseObject {
|
||||
public:
|
||||
//! Initializing Constructor
|
||||
QcMessenger(QcApp* app);
|
||||
|
||||
//! Attach object to message and schedule sending
|
||||
QcMessenger(QcApp *app);
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Sets the test mode with respect to sending messages.
|
||||
* @param enable If false then no messages will be sent.
|
||||
*/
|
||||
void setTestMode(bool enable);
|
||||
|
||||
//! Attach object to message and schedule sending
|
||||
//! (if notifier is true send as notifier message; as data message otherwise)
|
||||
bool attachObject(DataModel::Object* obj, bool notifier, Operation operation=OP_UNDEFINED);
|
||||
bool attachObject(DataModel::Object *obj, bool notifier, Operation operation=OP_UNDEFINED);
|
||||
|
||||
//! Scheduler for sending messages (called periodically by application)
|
||||
void scheduler();
|
||||
@ -113,13 +119,14 @@ class SC_QCPLUGIN_API QcMessenger : public Core::BaseObject {
|
||||
void flushMessages();
|
||||
|
||||
private:
|
||||
QcIndexMap _qcIndex;
|
||||
NotifierMessagePtr _notifierMsg;
|
||||
DataMessagePtr _dataMsg;
|
||||
QcApp* _app;
|
||||
Core::TimeSpan _sendInterval;
|
||||
int _maxSize;
|
||||
Util::StopWatch _timer;
|
||||
QcIndexMap _qcIndex;
|
||||
NotifierMessagePtr _notifierMsg;
|
||||
DataMessagePtr _dataMsg;
|
||||
QcApp *_app;
|
||||
Core::TimeSpan _sendInterval{1.0};
|
||||
int _maxSize{500};
|
||||
bool _testMode{false};
|
||||
Util::StopWatch _timer;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -50,8 +50,8 @@ class SC_QCPLUGIN_API QcApp : public Processing::Application {
|
||||
QcApp(int argc, char **argv) : Processing::Application(argc, argv) {}
|
||||
|
||||
virtual bool exitRequested() const { return false; }
|
||||
virtual const QcConfig* qcConfig() const { return NULL; }
|
||||
virtual QcMessenger* qcMessenger() const { return NULL; }
|
||||
virtual const QcConfig *qcConfig() const { return nullptr; }
|
||||
virtual QcMessenger *qcMessenger() const { return nullptr; }
|
||||
|
||||
typedef bsig::signal<void()> TimerSignal;
|
||||
virtual void addTimeout(const TimerSignal::slot_type& onTimeout) const {}
|
||||
@ -80,20 +80,20 @@ class QcPlugin : public Processing::QcProcessorObserver {
|
||||
virtual void update();
|
||||
|
||||
//! Returns the plugin specific name given to plugin registry
|
||||
virtual std::string registeredName() const = 0;
|
||||
virtual std::string registeredName() const;
|
||||
|
||||
//! Returns the plugin specific parameter names
|
||||
virtual std::vector<std::string> parameterNames() const = 0;
|
||||
virtual std::vector<std::string> parameterNames() const;
|
||||
|
||||
//! Returns the corresponding QcProcessor object
|
||||
Processing::QcProcessor* qcProcessor();
|
||||
|
||||
//! Finish the work
|
||||
void done();
|
||||
|
||||
|
||||
protected:
|
||||
void onTimeout();
|
||||
virtual void timeoutTask() = 0;
|
||||
virtual void timeoutTask();
|
||||
|
||||
virtual double mean(const QcBuffer* qcb) const;
|
||||
virtual double stdDev(const QcBuffer* qcb, double mean) const;
|
||||
@ -111,22 +111,23 @@ class QcPlugin : public Processing::QcProcessorObserver {
|
||||
|
||||
void sendMessages(const Core::Time &rectime);
|
||||
|
||||
mutable std::queue<DataModel::ObjectPtr> _objects;
|
||||
std::string _name;
|
||||
std::vector<std::string> _parameterNames;
|
||||
std::string _streamID;
|
||||
QcApp* _app;
|
||||
QcMessenger* _qcMessenger;
|
||||
const QcConfig* _qcConfig;
|
||||
mutable QcBufferPtr _qcBuffer;
|
||||
Processing::QcProcessorPtr _qcProcessor;
|
||||
protected:
|
||||
mutable std::queue<DataModel::ObjectPtr> _objects;
|
||||
std::string _name;
|
||||
std::vector<std::string> _parameterNames;
|
||||
std::string _streamID;
|
||||
QcApp *_app;
|
||||
QcMessenger *_qcMessenger;
|
||||
const QcConfig *_qcConfig;
|
||||
mutable QcBufferPtr _qcBuffer;
|
||||
Processing::QcProcessorPtr _qcProcessor;
|
||||
|
||||
private:
|
||||
mutable Core::Time _lastArchiveTime;
|
||||
mutable Core::Time _lastReportTime;
|
||||
mutable Core::Time _lastAlertTime;
|
||||
mutable bool _firstRecord;
|
||||
mutable Util::StopWatch _timer;
|
||||
mutable Core::Time _lastArchiveTime;
|
||||
mutable Core::Time _lastReportTime;
|
||||
mutable Core::Time _lastAlertTime;
|
||||
mutable bool _firstRecord;
|
||||
mutable Util::StopWatch _timer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user