You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
10 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<title>SeisComP plugins &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Database" href="database.html" />
<link rel="prev" title="SeisComP modules" href="modules.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">5.3.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="database.html" title="Database"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="modules.html" title="SeisComP modules"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<div class="section" id="seiscomp-plugins">
<span id="concepts-plugins"></span><h1>SeisComP plugins<a class="headerlink" href="#seiscomp-plugins" title="Permalink to this headline"></a></h1>
<div class="section" id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this headline"></a></h2>
<p>This chapter describes the general use of plugins in SeisComP.</p>
</div>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>Plugins expand the functionality of <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">applications</span></a>.
They are C++ shared object libraries which are dynamically loaded at runtime
into an application.</p>
<p>Typical plugins provide access to:</p>
<ul class="simple">
<li><p>Databases</p></li>
<li><p><a class="reference internal" href="../../apps/global_recordstream.html#global-recordstream"><span class="std std-ref">Recordstream implementations</span></a></p></li>
<li><p><a class="reference internal" href="../../index.html#sec-index-extensions"><span class="std std-ref">Locator routines</span></a></p></li>
<li><p><a class="reference internal" href="../../index.html#sec-index-extensions"><span class="std std-ref">Magnitude types</span></a>.</p></li>
</ul>
<p>By just loading a plugin an application does not change
its way to function magically. Common plugins just implement a certain
interface (see e.g. messaging or RecordStream) and exhibit that functionality
by adding a new entry to the internal interface factory. As an example an
application makes use of interface <code class="docutils literal notranslate"><span class="pre">DatabaseInterface</span></code>. Technically it
creates a new object implementing a certain interface by calling the C++
method:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">db</span> <span class="o">=</span> DatabaseInterface::Create<span class="o">(</span><span class="s2">&quot;mysql&quot;</span><span class="o">)</span><span class="p">;</span>
</pre></div>
</div>
<p>Without having a plugin loaded the returned object will be NULL or to put it
in other words, there is not implementation for mysql available.</p>
<p>Once the plugin <code class="docutils literal notranslate"><span class="pre">dbmysql</span></code> is loaded into the application, an implementation
for type mysql is added and will be available to the application. It is
still required for the application to explicitly ask for a particular
interface. That is most likely left to the user by adding a corresponding
configuration option to the configuration file.</p>
<p>That means, if an application loads two plugins, e.g. <code class="docutils literal notranslate"><span class="pre">dbmysql</span></code> and
<code class="docutils literal notranslate"><span class="pre">dbpostgresql</span></code> that does not mean that it will not read from two database
at a time. It means the user has now the option to either use a MySQL database
or a PostgreSQL database. He still needs to make his choice in the
configuration file.</p>
<p>Trunk plugins are only supported as shared object libraries and therefore are
required to be written in C++. Implementations for all available interfaces
can be added. An incomplete list of SeisComP C++ interfaces:</p>
<ul class="simple">
<li><p><a class="reference internal" href="messaging.html#concepts-messaging"><span class="std std-ref">Messaging</span></a></p></li>
<li><p><a class="reference internal" href="database.html#concepts-database"><span class="std std-ref">Database</span></a></p></li>
<li><p><a class="reference internal" href="recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a></p></li>
<li><p>Record formats</p></li>
<li><p>Map projections</p></li>
<li><p><a class="reference internal" href="../filter-grammar.html#filter-grammar"><span class="std std-ref">Time domain filters</span></a></p></li>
<li><p>Importer</p></li>
<li><p>Exporter</p></li>
<li><p><strong>Amplitude processors</strong></p></li>
<li><p><strong>Magnitude processors</strong></p></li>
</ul>
<p>This is just a subset of available extensible interface factories. The
emphasized entries refer to the factories which are most commonly extended.</p>
</div>
<div class="section" id="location-and-configuration">
<h2>Location and Configuration<a class="headerlink" href="#location-and-configuration" title="Permalink to this headline"></a></h2>
<p>Plugins are located in <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/share/pugins</span></code>. In order to make a
plugins available for a module it must be added to the configuration of
<a class="reference internal" href="../../apps/global.html#confval-plugins"><code class="xref std std-confval docutils literal notranslate"><span class="pre">plugins</span></code></a> of the global parameters of a module or in
<a class="reference internal" href="../../apps/global.html#id1"><span class="std std-ref">Module Configuration</span></a>.</p>
<p>Configuring <a class="reference internal" href="../../apps/global.html#confval-plugins"><code class="xref std std-confval docutils literal notranslate"><span class="pre">plugins</span></code></a> with the name of a plugin will let the exclusively
use this plugin and no other ones, e.g. default plugins. Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">plugins</span> <span class="o">=</span> <span class="n">evrc</span>
</pre></div>
</div>
<p>In order to add a plugin to the default plugins or plugins loaded by before, e.g.
by the global configuration, load these</p>
</div>
</div>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">SeisComP plugins</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#location-and-configuration">Location and Configuration</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="modules.html"
title="previous chapter">SeisComP modules</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="database.html"
title="next chapter">Database</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/plugins.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>5.3.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>