Install SeisComP and scanloc ARM64 nightly packages

This commit is contained in:
Enrico Ellguth
2025-10-29 12:34:04 +00:00
parent 2ff097f9d1
commit 165b829fb7
606 changed files with 24438 additions and 16358 deletions

View File

@ -11,8 +11,9 @@
* https://www.gnu.org/licenses/agpl-3.0.html. *
***************************************************************************/
#ifndef SEISCOMP_APPLICATIONS_EVENTPROCESSOR_H__
#define SEISCOMP_APPLICATIONS_EVENTPROCESSOR_H__
#ifndef SEISCOMP_APPLICATIONS_EVENTPROCESSOR_H
#define SEISCOMP_APPLICATIONS_EVENTPROCESSOR_H
#include <string>
@ -27,13 +28,17 @@
/******************************************************************************
scevent API Changelog
******************************************************************************
4
- Added preferredMagnitude()
3
- Added newEvent flag to process()
2
- Added list of event journal entries to process()
<undefined>
- Initial API
*/
#define SCEVENT_EVENTPROCESSOR_API_VERSION 2
#define SCEVENT_EVENTPROCESSOR_API_VERSION 4
namespace Seiscomp {
@ -41,6 +46,8 @@ namespace Seiscomp {
namespace DataModel {
class Magnitude;
class Origin;
class Event;
DEFINE_SMARTPOINTER(JournalEntry);
@ -72,15 +79,34 @@ class SC_EVPLUGIN_API EventProcessor : public Seiscomp::Core::BaseObject {
// Virtual public interface
// ----------------------------------------------------------------------
public:
//! Setup all configuration parameters
/**
* @brief Setup all configuration parameters
* @param config The application configuration
* @return Success flag
*/
virtual bool setup(const Config::Config &config) = 0;
//! Processes an event. The preferred object (Origin, Magnitude,
//! FocalMechanism) are guaranteed to be found with *::Find(id)
//! methods.
//! This method should return true if the event objects needs
//! an update.
/**
* @brief Selects the preferred magnitude of an origin.
* @param origin The origin to be processed.
* @return Either the preferred magnitude or nullptr.
*/
virtual DataModel::Magnitude *preferredMagnitude(const DataModel::Origin *origin) = 0;
/**
* @brief Processes an event.
* The preferred object (Origin, Magnitude, FocalMechanism) are
* guaranteed to be found with *::Find(id) methods.
* This method should return true if the event objects needs an
* update.
* @param event The event to be processed.
* @param isNewEvent Whether the event is a new event or an updated event.
* @param journals The list of current event journals.
*/
virtual bool process(DataModel::Event *event,
bool isNewEvent,
const Journal &journals) = 0;
};

View File

@ -0,0 +1,17 @@
#ifndef SC_MAPVIEWX_PLUGIN_API_H
#define SC_MAPVIEWX_PLUGIN_API_H
#if defined(WIN32) && (defined(SC_MAPVIEWX_PLUGIN_SHARED) || defined(SC_ALL_SHARED))
# if defined(SC_MAPVIEWX_PLUGIN_EXPORTS)
# define SC_MAPVIEWX_PLUGIN_API __declspec(dllexport)
# define SC_MAPVIEWX_PLUGIN_TEMPLATE_EXPORT
# else
# define SC_MAPVIEWX_PLUGIN_API __declspec(dllimport)
# define SC_MAPVIEWX_PLUGIN_TEMPLATE_EXPORT extern
# endif
#else
# define SC_MAPVIEWX_PLUGIN_API
# define SC_MAPVIEWX_PLUGIN_TEMPLATE_EXPORT
#endif
#endif

View File

@ -0,0 +1,80 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PLUGINS_MAPVIEWX_GROUNDMOTION_H
#define SEISCOMP_PLUGINS_MAPVIEWX_GROUNDMOTION_H
#include <seiscomp/core/baseobject.h>
#include <seiscomp/core/interfacefactory.h>
#include <seiscomp/gui/core/gradient.h>
#include <seiscomp/plugins/mvx/api.h>
namespace Seiscomp {
namespace MapViewX {
DEFINE_SMARTPOINTER(GroundMotionScale);
class GroundMotionScale : public Core::BaseObject {
public:
GroundMotionScale() = default;
public:
/**
* @brief Converts an input pgv value to an output value.
* The pga value is optional and might be presented.
* @param pgv Input pgv in m/s.
* @param pga Optional input pga in m/s**2
* @return The output value
*/
virtual double convert(double pgv, double *pga) = 0;
/**
* @brief Returns the color gradient of the scale.
* @return The color gradient
*/
virtual Gui::Gradient gradient() = 0;
/**
* @brief Returns the color used for unset values.
* @return The color for unset values.
*/
virtual QColor unset() = 0;
/**
* @brief Returns the title of the scale.
* @return The scale title
*/
virtual std::string title() = 0;
};
DEFINE_INTERFACE_FACTORY(GroundMotionScale);
}
}
#define REGISTER_MAPVIEWX_GROUNDMOTION_SCALE(Class, Service) \
Seiscomp::Core::Generic::InterfaceFactory<Seiscomp::MapViewX::GroundMotionScale, Class> __##Class##InterfaceFactory__(Service)
#endif

View File

@ -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;
};
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}

View File

@ -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;
};

View File

@ -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;
};