0001-Added-description-of-plugins-in-specification-plugin.patch
common.rst | ||
---|---|---|
189 | 189 |
Common Environment Variables |
190 | 190 |
============================ |
191 | 191 | |
192 |
Plugins |
|
193 | ||
194 |
.. seealso:: |
|
195 | ||
196 |
:ref:`specification-plugin` |
|
197 |
Details about :term:`plugin` s |
|
198 | ||
199 |
.. envvar:: RSB_PLUGINS_CPP_PATH |
|
200 | ||
201 |
A list of ``:``-separated directory names which should be |
|
202 |
searched to locate |project| :term:`plugin` s. |
|
203 | ||
204 |
.. envvar:: RSB_PLUGINS_CPP_LOAD |
|
205 | ||
206 |
A list of ``:``-separated :term:`plugin` names which should be |
|
207 |
loaded during |project| initialization. |
|
208 | ||
209 |
TODO other languages |
|
210 | ||
192 | 211 |
In-process Transport |
193 | 212 | |
194 | 213 |
.. seealso:: |
glossary.rst | ||
---|---|---|
122 | 122 | |
123 | 123 |
Example(C++,protocol buffers,spread): an object of type ``IplImage*`` |
124 | 124 | |
125 |
plugin |
|
126 | ||
127 |
A particular extension of |project|'s functionality, such as a |
|
128 |
:term:`transport` implementation or a :term:`converter`, packaged |
|
129 |
as runtime-loadable code. |
|
130 | ||
131 |
See :ref:`specification-plugin`. |
|
132 | ||
125 | 133 |
scope |
126 | 134 | |
127 | 135 |
Descriptor for a :term:`channel` of the unified bus. The |
specification-plugin.rst | ||
---|---|---|
1 |
.. _specification-plugin: |
|
2 | ||
3 |
========= |
|
4 |
Plugins |
|
5 |
========= |
|
6 | ||
7 |
Overview |
|
8 |
======== |
|
9 | ||
10 |
Plugins are loaded at initialization time |
|
11 | ||
12 |
* This means, registration of provided :term:`converter` s and |
|
13 |
:term:`connector` s happens during initialization |
|
14 |
* This is required in order for |project| to be able inquire about |
|
15 |
capabilities and configuration of :term:`converter` s and |
|
16 |
:term:`connector` s |
|
17 | ||
18 |
Selection and loading of plugins is configured using the usual |
|
19 |
mechanism |
|
20 | ||
21 |
An implementation-language-specific section configures |
|
22 | ||
23 |
* Means of locating plugins (e.g. searchpath, classpath, |
|
24 |
:envvar:`PYTHONPATH`) |
|
25 |
* Names of the plugins that should be loaded |
|
26 | ||
27 |
C++ Plugins |
|
28 |
=========== |
|
29 | ||
30 |
* Are shared objects |
|
31 |
* Configuration via options |
|
32 | ||
33 |
``plugins.cpp.path`` |
|
34 | ||
35 |
Colon separated list of directories in which expanded |
|
36 |
(e.g. ``rsbspread`` -> :samp:`{DIRECTORY}/librsbspread.so` on |
|
37 |
Linux) plugin libraries will be searched. |
|
38 | ||
39 |
``plugins.cpp.load`` |
|
40 | ||
41 |
Colon separated list of plugins that should be loaded. (Names do |
|
42 |
not include prefixes like ``lib`` of suffixes like ``.so`` or |
|
43 |
``.dll``) |
|
44 | ||
45 |
Configuration Examples: |
|
46 | ||
47 |
.. code-block:: ini |
|
48 | ||
49 |
[plugins.cpp] |
|
50 |
path = /vol/vampire/lib:/vol/cor/lib |
|
51 |
load = rsbspread:rsbvampire # no "libX" or filetype suffix like ".so" |
|
52 | ||
53 |
.. code-block:: sh |
|
54 | ||
55 |
RSB_PLUGINS_CPP_PATH=/vol/cor/lib |
|
56 | ||
57 |
Java Plugins |
|
58 |
============ |
|
59 | ||
60 |
* Are Jar files? |
|
61 |
* Configuration via options |
|
62 | ||
63 |
``plugins.java.path`` |
|
64 | ||
65 |
TODO |
|
66 |
``plugins.java.load`` |
|
67 | ||
68 |
Colon-separated list of plugins that should be loaded. |
|
69 | ||
70 |
Python Plugins |
|
71 |
============== |
|
72 | ||
73 |
* Are eggs? |
|
74 |
* Configuration via options |
|
75 | ||
76 |
plugins.python.path: Colon separated list of directories which get added to sys.path? |
|
77 |
plugins.python.load: Colon separated list of plugins that should be loaded. |
|
78 | ||
79 |
Common Lisp Plugins |
|
80 |
=================== |
|
81 | ||
82 |
Are ASDF-Systems |
|
83 |
Configuration via options |
|
84 |
plugins.lisp.path |
|
85 |
plugins.lisp.load: Colon separated list of plugins that should be loaded. |
|
86 | ||
87 |
Default Plugin Searchpath |
|
88 |
========================= |
|
89 | ||
90 |
#. :samp:`{HOME}/.rsb{VERSION}/plugins` |
|
91 |
#. :samp:`{PREFIX}/lib/rsb{VERSION}/plugins` |
|
92 | ||
93 |
where :samp:`{HOME}` is the home directory of the current user, |
|
94 |
:samp:`{PREFIX}` is the prefix into which |project| has been installed |
|
95 |
and :samp:`{VERSION}` are the major and minor components of the |
|
96 |
current |project| version (|version| for this version). Example: |
|
97 | ||
98 |
#. :file:`/homes/juser/.rsb0.8/plugins` |
|
99 |
#. :file:`/usr/lib/rsb0.8/plugins` |
|
100 | ||
101 |
Implementations |
|
102 |
=============== |
|
103 | ||
104 |
=========== ================================================================== |
|
105 |
Language File(s) |
|
106 |
=========== ================================================================== |
|
107 |
C++ *implemented as part of the RSC library* |
|
108 |
Java *not yet implemented* |
|
109 |
Python *not yet implemented* |
|
110 |
Common Lisp *not yet implemented* |
|
111 |
=========== ================================================================== |
specification.rst | ||
---|---|---|
12 | 12 |
specification-scope |
13 | 13 |
specification-event |
14 | 14 |
specification-uris |
15 |
specification-plugin |
|
15 | 16 | |
16 | 17 |
.. _specification-transports: |
17 | 18 |
tutorial-plugins.rst | ||
---|---|---|
1 |
.. _tutorial-plugins: |
|
2 | ||
3 |
================= |
|
4 |
Writing Plugins |
|
5 |
================= |
|
6 | ||
7 |
.. seealso:: |
|
8 | ||
9 |
:ref:`specification-plugin` |
|
10 |
:term:`Plugin` specification |
|
11 | ||
12 |
C++ |
|
13 |
=== |
|
14 | ||
15 |
In the C++ implementation of |project|, a :term:`plugin` is a |
|
16 |
dynamically loadable library which defines the two symbols |
|
17 | ||
18 |
#. ``rsc_plugin_init`` |
|
19 |
#. ``rsc_plugin_shutdown`` |
|
20 | ||
21 |
Any library can be made into an |project| plugin by adding file, |
|
22 |
usually called :file:`Plugin.cc`, defining these two symbols. The |
|
23 |
:file:`Plugin.cc` file of a minimal |project| :term:`plugin` looks |
|
24 |
like this: |
|
25 | ||
26 |
.. literalinclude:: /../rsb-cpp/examples/plugin/Plugin.cpp |
|
27 |
:language: c++ |
|
28 |
:lines: 26- |
tutorial.rst | ||
---|---|---|
70 | 70 |
:language: cl |
71 | 71 |
:linenos: |
72 | 72 | |
73 |
Extension Points |
|
74 |
================ |
|
73 |
Extending |project| |
|
74 |
=================== |
|
75 | ||
76 |
Various aspects (called "extension points" here) of |project| can be |
|
77 |
extended. This is usually achieved by writing :term:`plugin` s, each |
|
78 |
of which adds a specific capability such as a new :term:`converter` or |
|
79 |
:term:`transport`. |
|
80 | ||
81 |
.. toctree:: |
|
82 |
:maxdepth: 1 |
|
83 | ||
84 |
tutorial-plugins |
|
85 | ||
75 | 86 | |
76 | 87 |
Writing Converters |
77 | 88 |
------------------ |
78 |
- |