<ol><li><a href="#Development">Development</a><ol><li><a href="#Systemsetup">System setup</a><ol><li><a href="#C">C++</a></li><li> <a href="#Python">Python</a></li></ol></li><li> <a href="#Cookbook">Cookbook</a></li></ol></li></ol>

Development

This section leads into the development of extensions and modules for SeisComP3 using the SeisComP3 development framework.
Its libraries can be used either with C++ or Python. Bindings for other languages are possible but not yet implemented.

System setup

To start programming with the SeisComP3 libraries the system has to be prepared depending on the programming language going to be used. Basically an installation of at least the libraries and header files of the trunk package is required containing the following directories:

/home/sysop/seiscomp3/trunk/include
/home/sysop/seiscomp3/trunk/lib

C++

To compile C++ modules point the compiler to the installed header and library files. To run a module LD_LIBRARY_PATH has to be set correctly.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/sysop/seiscomp3/trunk/lib

An example Makefile to build an own module might look like this:

SC3DIR = $(HOME)/seiscomp3/trunk
LIBDIR = $(SC3DIR)/lib
INCDIR = $(SC3DIR)/include
INSTALLDIR = $(HOME)/bin

all: sc3mod

sc3mod: main.cpp
        g++ -o sc3mod main.cpp -I$(INCDIR) -L$(LIBDIR) -lseiscomp3_client

install:
        mkdir -p $(INSTALLDIR)
        cp sc3mod $(INSTALLDIR)

clean:
        rm -f sc3mod *.o

Python

To use the Python bindings it is enough to point LD_LIBRARY_PATH and PYTHON_PATH to the appropriate directories:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/sysop/seiscomp3/trunk/lib
export PYTHON_PATH=$PYTONPATH:/home/sysop/seiscomp3/trunk/lib/python2.5/site-packages:/home/sysop/seiscomp3/trunk/bin

These settings are also part of the environment setup script.

/home/sysop/seiscomp3/lib/env.sh

Cookbook

Instead of a complete API documentation we provide a cookbook with basic examples on how to interact with the system and to get familiar with the concepts behind. This section is going to be extended and improved and users are invited to add their own experiences and examples.