├── .clabot ├── .gitignore ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── apps ├── 3rd-party │ ├── CMakeLists.txt │ ├── slarchive │ │ ├── CMakeLists.txt │ │ ├── ChangeLog │ │ ├── Makefile │ │ ├── README │ │ ├── config │ │ │ ├── slarchive.cfg │ │ │ └── slarchive.py │ │ ├── descriptions │ │ │ ├── slarchive.rst │ │ │ └── slarchive.xml │ │ ├── doc │ │ │ └── slarchive.1 │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── archive.c │ │ │ ├── archive.h │ │ │ ├── dsarchive.c │ │ │ ├── dsarchive.h │ │ │ ├── slarchive.c │ │ │ └── uthash.h │ │ └── templates │ │ │ └── purge_datafiles.tpl │ └── slinktool │ │ ├── CMakeLists.txt │ │ ├── ChangeLog │ │ ├── Makefile │ │ ├── README │ │ ├── descriptions │ │ ├── slinktool.rst │ │ └── slinktool.xml │ │ ├── doc │ │ └── slinktool.1 │ │ └── src │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── archive.c │ │ ├── archive.h │ │ ├── dsarchive.c │ │ ├── dsarchive.h │ │ ├── slinktool.c │ │ ├── slinkxml.c │ │ └── slinkxml.h ├── CMakeLists.txt ├── seedlink │ ├── CMakeLists.txt │ ├── Makefile │ ├── bitstring.h │ ├── buffer.h │ ├── cbuf.h │ ├── config │ │ ├── seedlink.cfg │ │ └── seedlink.py │ ├── descriptions │ │ ├── media │ │ │ └── seedlink │ │ │ │ └── Handshaking_uni_multi_station_mode.jpg │ │ ├── seedlink.rst │ │ └── seedlink.xml │ ├── encoder.h │ ├── filter.h │ ├── filterimpl.h │ ├── format.h │ ├── iosystem.cc │ ├── iosystem.h │ ├── monitor.cc │ ├── monitor.h │ ├── mseed.cc │ ├── mseed.h │ ├── seedlink.cc │ ├── spclock.h │ ├── sproc.cc │ ├── sproc.h │ ├── steim1.cc │ ├── steim1.h │ ├── steim2.cc │ ├── steim2.h │ └── wstools.h └── utils │ ├── CMakeLists.txt │ └── load_timetable.cc ├── libs ├── 3rd-party │ ├── CMakeLists.txt │ └── libslink │ │ ├── CMakeLists.txt │ │ ├── ChangeLog │ │ ├── Makefile │ │ ├── Makefile.wat │ │ ├── Makefile.win │ │ ├── README │ │ ├── config.c │ │ ├── doc │ │ ├── UsersGuide-libslink │ │ ├── sl_addstream.3 │ │ ├── sl_collect.3 │ │ ├── sl_collect_nb.3 │ │ ├── sl_doy2md.3 │ │ ├── sl_dtime.3 │ │ ├── sl_freeslcd.3 │ │ ├── sl_log.3 │ │ ├── sl_log_r.3 │ │ ├── sl_log_rl.3 │ │ ├── sl_loginit.3 │ │ ├── sl_loginit_r.3 │ │ ├── sl_loginit_rl.3 │ │ ├── sl_msr_depochstime.3 │ │ ├── sl_msr_dnomsamprate.3 │ │ ├── sl_msr_dsamprate.3 │ │ ├── sl_msr_free.3 │ │ ├── sl_msr_new.3 │ │ ├── sl_msr_parse.3 │ │ ├── sl_msr_print.3 │ │ ├── sl_newslcd.3 │ │ ├── sl_packettype.3 │ │ ├── sl_parse_streamlist.3 │ │ ├── sl_ping.3 │ │ ├── sl_read_streamlist.3 │ │ ├── sl_recoverstate.3 │ │ ├── sl_request_info.3 │ │ ├── sl_savestate.3 │ │ ├── sl_sequence.3 │ │ ├── sl_setuniparams.3 │ │ ├── sl_strncpclean.3 │ │ ├── sl_terminate.3 │ │ └── sl_utils.3 │ │ ├── example │ │ ├── Makefile │ │ ├── Makefile.wat │ │ ├── Makefile.win │ │ ├── README │ │ ├── slclient.c │ │ └── streamlist.conf │ │ ├── genutils.c │ │ ├── globmatch.c │ │ ├── globmatch.h │ │ ├── gswap.c │ │ ├── libslink.h │ │ ├── logging.c │ │ ├── msrecord.c │ │ ├── network.c │ │ ├── slplatform.c │ │ ├── slplatform.h │ │ ├── slutils.c │ │ ├── statefile.c │ │ ├── strutils.c │ │ ├── unpack.c │ │ └── unpack.h ├── CMakeLists.txt ├── plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── plugin.c │ ├── plugin.h │ ├── plugin_channel.cc │ ├── plugin_channel.h │ ├── plugin_exceptions.h │ └── plugin_module.h └── slutils │ ├── CMakeLists.txt │ ├── Makefile │ ├── big-endian.h │ ├── byteorder_swap.h │ ├── conf_ini.h │ ├── conf_ini.l │ ├── conf_xml.cc │ ├── conf_xml.h │ ├── confattr.h │ ├── confbase.cc │ ├── confbase.h │ ├── cppstreams.h │ ├── descriptor.h │ ├── diag.h │ ├── flex │ ├── FlexLexer.h │ └── lex.ini.cc.patch │ ├── little-endian.h │ ├── qtime.cc │ ├── qtime.h │ ├── utils.cc │ └── utils.h ├── plugins ├── CMakeLists.txt ├── Makefile ├── README ├── caps_plugin │ ├── CMakeLists.txt │ ├── app.cpp │ ├── app.h │ ├── descriptions │ │ └── caps_plugin.xml │ ├── libs │ │ └── gempa │ │ │ └── caps │ │ │ ├── application.cpp │ │ │ ├── application.h │ │ │ ├── connection.cpp │ │ │ ├── connection.h │ │ │ ├── datetime.cpp │ │ │ ├── datetime.h │ │ │ ├── endianess.h │ │ │ ├── log.cpp │ │ │ ├── log.h │ │ │ ├── mseedpacket.cpp │ │ │ ├── mseedpacket.h │ │ │ ├── packet.cpp │ │ │ ├── packet.h │ │ │ ├── rawpacket.cpp │ │ │ ├── rawpacket.h │ │ │ ├── riff.cpp │ │ │ ├── riff.h │ │ │ ├── sessiontable.cpp │ │ │ ├── sessiontable.h │ │ │ ├── socket.cpp │ │ │ ├── socket.h │ │ │ ├── strptime.c │ │ │ ├── strptime.h │ │ │ ├── utils.h │ │ │ └── version.h │ └── main.cpp ├── chain_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── bitstring.h │ ├── chain.xml │ ├── chain_plugin.cc │ ├── descriptions │ │ └── seedlink_chain.xml │ ├── schedule.c │ └── schedule.h ├── descriptions │ ├── seedlink_antelope.xml │ ├── seedlink_dr24.xml │ ├── seedlink_echopro_3ch100hz.xml │ ├── seedlink_echopro_6ch200hz.xml │ ├── seedlink_edata.xml │ ├── seedlink_fs_mseed.xml │ ├── seedlink_gmeteo.xml │ ├── seedlink_hrd24.xml │ ├── seedlink_liss.xml │ ├── seedlink_m24.xml │ ├── seedlink_maram.xml │ ├── seedlink_minilogger.xml │ ├── seedlink_miscScript.xml │ ├── seedlink_miscSerial.xml │ ├── seedlink_mk6.xml │ ├── seedlink_mppt.xml │ ├── seedlink_mseedfifo.xml │ ├── seedlink_mseedscan.xml │ ├── seedlink_mws.xml │ ├── seedlink_naqs.xml │ ├── seedlink_nmxp.xml │ ├── seedlink_ps2400_eth.xml │ ├── seedlink_sadc.xml │ ├── seedlink_vaisala.xml │ ├── seedlink_wago.xml │ └── seedlink_wave24.xml ├── echopro_plugin │ ├── CMakeLists.txt │ ├── README │ └── echopro_plugin.c ├── ewexport_pasv_plugin │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── Makefile │ ├── README │ ├── descriptions │ │ └── seedlink_ewexport_pasv.xml │ ├── ewdefs.h │ ├── ewexport_pasv_plugin.c │ ├── network.c │ ├── network.h │ ├── swap.c │ ├── swap.h │ ├── trace_buf.h │ ├── trheadconv.c │ ├── trheadconv.h │ ├── util.c │ └── util.h ├── ewexport_plugin │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── Makefile │ ├── README │ ├── descriptions │ │ └── seedlink_ewexport.xml │ ├── ewdefs.h │ ├── ewexport_plugin.c │ ├── network.c │ ├── network.h │ ├── swap.c │ ├── swap.h │ ├── trheadconv.c │ ├── trheadconv.h │ ├── util.c │ └── util.h ├── fs_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── fs_decode_mseed.cc │ ├── fs_decode_seisan.cc │ ├── fs_decode_titan.cc │ ├── fs_input_ddb.cc │ ├── fs_input_edr.cc │ ├── fs_input_irae.cc │ ├── fs_plugin.cc │ ├── fs_plugin.h │ ├── hack_proto.h │ ├── hack_titan.h │ ├── my_printf.cc │ ├── read_titan.c │ └── read_titan.h ├── gdrt_plugin │ ├── CMakeLists.txt │ ├── app.cpp │ ├── app.h │ ├── channel.h │ ├── channel.ipp │ ├── config │ │ └── gdrt_plugin.cfg │ ├── descriptions │ │ └── gdrt_plugin.xml │ ├── ecef.cpp │ ├── ecef.h │ ├── main.cpp │ ├── settings.cpp │ ├── settings.h │ ├── station.cpp │ ├── station.h │ ├── udpclient.cpp │ └── udpclient.h ├── lib330 │ ├── libarchive.c │ ├── libarchive.h │ ├── libclient.c │ ├── libclient.h │ ├── libcmds.c │ ├── libcmds.h │ ├── libcompress.c │ ├── libcompress.h │ ├── libcont.c │ ├── libcont.h │ ├── libctrldet.c │ ├── libctrldet.h │ ├── libcvrt.c │ ├── libcvrt.h │ ├── libdetect.c │ ├── libdetect.h │ ├── libdss.c │ ├── libdss.h │ ├── libfilters.c │ ├── libfilters.h │ ├── liblogs.c │ ├── liblogs.h │ ├── libmd5.c │ ├── libmd5.h │ ├── libmsgs.c │ ├── libmsgs.h │ ├── libnetserv.c │ ├── libnetserv.h │ ├── libopaque.c │ ├── libopaque.h │ ├── libpoc.c │ ├── libpoc.h │ ├── libsampcfg.c │ ├── libsampcfg.h │ ├── libsampglob.h │ ├── libsample.c │ ├── libsample.h │ ├── libseed.c │ ├── libseed.h │ ├── libslider.c │ ├── libslider.h │ ├── libstats.c │ ├── libstats.h │ ├── libstrucs.c │ ├── libstrucs.h │ ├── libsupport.c │ ├── libsupport.h │ ├── libtokens.c │ ├── libtokens.h │ ├── libtypes.c │ ├── libtypes.h │ ├── libverbose.c │ ├── libverbose.h │ ├── makefile.nt │ ├── makefile.unix │ ├── pascal.h │ ├── platform.h │ ├── q330cvrt.c │ ├── q330cvrt.h │ ├── q330io.c │ ├── q330io.h │ └── q330types.h ├── minilogger_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── mini_logger_writer.c │ ├── mini_logger_writer.h │ ├── minisepdevice.c │ ├── minisepdevice.h │ ├── seismo_interface.pdf │ └── settings │ │ ├── Makefile │ │ ├── settings.c │ │ ├── settings.h │ │ ├── settings.html │ │ ├── strmap.c │ │ ├── strmap.h │ │ └── style.css ├── mseedfifo_plugin │ ├── CMakeLists.txt │ ├── Makefile │ └── mseedfifo_plugin.c ├── mseedscan_plugin │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── Makefile │ ├── README │ ├── mseedscan.c │ ├── rbtree.c │ ├── rbtree.h │ ├── seedutil.c │ ├── seedutil.h │ ├── stack.c │ └── stack.h ├── naqsplugin │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── Makefile │ ├── README │ ├── naqs_plugin.c │ ├── naqs_utils.c │ ├── naqs_utils.h │ ├── plugin.c │ └── plugin.h ├── optodas_plugin │ ├── CMakeLists.txt │ ├── descriptions │ │ └── seedlink_optodas.xml │ ├── optodas_inventory │ └── optodas_plugin ├── plugin.c ├── plugin.h ├── plugin.py ├── q330plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── descriptions │ │ └── seedlink_q330.xml │ └── q330_plugin.cc ├── reftek_libs │ ├── Makefile │ ├── Makefile.reftek │ ├── archive │ │ ├── Makefile │ │ ├── Makefile.reftek │ │ ├── archive.c │ │ ├── archive.dsp │ │ ├── archive.h │ │ ├── create.c │ │ ├── errors.c │ │ ├── errors.h │ │ ├── evnfiles.c │ │ ├── find.c │ │ ├── linklist.c │ │ ├── open.c │ │ ├── purge.c │ │ ├── rate.c │ │ ├── rate.h │ │ ├── read.c │ │ ├── recfmt.c │ │ ├── serialize.c │ │ ├── state.c │ │ ├── streams.c │ │ ├── strlist.c │ │ ├── unix.c │ │ ├── version.h │ │ ├── win32.c │ │ ├── win32.h │ │ └── write.c │ ├── include │ │ ├── arc_api.h │ │ ├── keys.h │ │ ├── linklist.h │ │ ├── msgq.h │ │ ├── mstime.h │ │ ├── platform.h │ │ ├── recfmt.h │ │ ├── reftek.h │ │ ├── rt461.h │ │ ├── rtp.h │ │ ├── si.h │ │ ├── stdtypes.h │ │ ├── timer.h │ │ └── util.h │ ├── msgq │ │ ├── Makefile │ │ ├── Makefile.reftek │ │ ├── msgq.c │ │ └── msgq.dsp │ ├── reftek │ │ ├── Makefile │ │ ├── Makefile.reftek │ │ ├── ad.c │ │ ├── cd.c │ │ ├── com.c │ │ ├── dcomp.c │ │ ├── ds.c │ │ ├── dt.c │ │ ├── eh.c │ │ ├── et.c │ │ ├── om.c │ │ ├── private.h │ │ ├── reftek.dsp │ │ ├── sc.c │ │ ├── sh.c │ │ ├── steim.c │ │ ├── steim.h │ │ ├── string.c │ │ ├── testlib.c │ │ └── type.c │ ├── rtp │ │ ├── Makefile │ │ ├── Makefile.reftek │ │ ├── accept.c │ │ ├── attr.c │ │ ├── close.c │ │ ├── cmdpkt.c │ │ ├── log.c │ │ ├── misc.c │ │ ├── open.c │ │ ├── pid.c │ │ ├── recv.c │ │ ├── rtp.dsp │ │ ├── send.c │ │ ├── server.c │ │ ├── soh.c │ │ ├── stat.c │ │ └── version.c │ ├── si │ │ ├── Makefile │ │ ├── Makefile.reftek │ │ ├── si.c │ │ └── si.dsp │ └── util │ │ ├── Makefile │ │ ├── Makefile.reftek │ │ ├── bcd2long.c │ │ ├── dump.c │ │ ├── find.c │ │ ├── getline.c │ │ ├── mstime.c │ │ ├── parse.c │ │ ├── string.c │ │ ├── swap.c │ │ ├── timefunc.c │ │ ├── timer.c │ │ ├── timer_test.dsp │ │ └── util.dsp ├── reftek_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── descriptions │ │ └── seedlink_reftek.xml │ └── reftek_plugin.cc ├── scream2_plugin │ ├── CMakeLists.txt │ ├── config.h │ ├── descriptions │ │ └── seedlink_scream_ring.xml │ ├── dispatch.h │ ├── dispatch_ring.c │ ├── gcf.c │ ├── gcf.h │ ├── gputil.c │ ├── gputil.h │ ├── main.c │ ├── map.c │ ├── map.h │ ├── mapping.c │ ├── oscompat.h │ ├── project.h │ ├── scream.c │ ├── scream.h │ ├── scream2ew.d │ ├── scream2ew.desc │ ├── util.c │ └── util.h ├── scream_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── config.h │ ├── descriptions │ │ └── seedlink_scream.xml │ ├── dispatch.c │ ├── dispatch.h │ ├── gcf.c │ ├── gcf.h │ ├── gputil.c │ ├── gputil.h │ ├── main.c │ ├── map.c │ ├── map.h │ ├── oscompat.h │ ├── project.h │ ├── scream.c │ ├── scream.h │ ├── scream2ew.d │ ├── scream2ew.desc │ ├── util.c │ └── util.h ├── serial_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── linux2300.c │ ├── linux2300.h │ ├── proto_dr24.cc │ ├── proto_edata.cc │ ├── proto_edata2.cc │ ├── proto_gmeteo.cc │ ├── proto_guralp2.cc │ ├── proto_hrd24.cc │ ├── proto_maram.cc │ ├── proto_miscScript.cc │ ├── proto_miscSerial.cc │ ├── proto_miscString.cc │ ├── proto_miscString.h │ ├── proto_modbus.cc │ ├── proto_mws.cc │ ├── proto_prema.cc │ ├── proto_prema.cc.timesync │ ├── proto_sadc.cc │ ├── proto_solar.cc │ ├── proto_vaisala.cc │ ├── proto_ws2300.cc │ ├── rw2300.c │ ├── rw2300.h │ ├── serial_plugin.cc │ └── serial_plugin.h ├── sockplugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── README │ ├── seedutils.c │ ├── seedutils.h │ └── sock_plugin.c ├── wave24_plugin │ ├── CMakeLists.txt │ ├── Wave24Drv.cpp │ ├── Wave24Exception.h │ ├── Wave24Logger.cpp │ ├── Wave24Logger.h │ ├── Wave24Messages.cpp │ ├── Wave24Messages.h │ ├── Wave24Seed.cpp │ ├── Wave24Seed.h │ └── makefile └── win_plugin │ ├── CMakeLists.txt │ ├── Makefile │ ├── descriptions │ └── seedlink_win.xml │ └── win_plugin.c └── templates ├── CMakeLists.txt ├── antelope ├── seedlink_plugin.tpl └── setup.py ├── backup_seqfiles.tpl ├── caps ├── seedlink_plugin.tpl └── setup.py ├── chain ├── chain_head.tpl ├── chain_head_notimetable.tpl ├── seedlink_plugin.tpl └── setup.py ├── dr24 ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_dr24_50.tpl ├── echopro_3ch100hz ├── seedlink_plugin.tpl ├── setup.py └── streams_echopro_100.tpl ├── echopro_6ch200hz ├── seedlink_plugin.tpl ├── setup.py └── streams_echopro_200.tpl ├── edata ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_edata_100.tpl ├── ewexport ├── seedlink_plugin.tpl └── setup.py ├── ewexport_pasv ├── seedlink_plugin.tpl └── setup.py ├── filters.fir.tpl ├── fs_mseed ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_generic_3x50.tpl ├── gdrt ├── seedlink_plugin.tpl └── setup.py ├── gmeteo ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_gmeteo.tpl ├── hrd24 ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_hrd24_100.tpl ├── liss ├── seedlink_plugin.tpl └── setup.py ├── m24 ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_m24_100.tpl ├── maram ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_maram.tpl ├── minilogger ├── minilogger.prop.tpl ├── seedlink_plugin.tpl └── setup.py ├── miscScript ├── plugins.ini.tpl ├── scripts │ ├── MCP342X.py │ └── fakeScript.py ├── seedlink_plugin.tpl ├── setup.py └── streams_auto.tpl ├── miscSerial ├── plugins.ini.tpl ├── scripts │ └── fake_miscSerial.py ├── seedlink_plugin.tpl ├── setup.py └── streams_auto.tpl ├── mk6 ├── seedlink_plugin.tpl └── setup.py ├── mppt ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_mppt.tpl ├── mseedfifo ├── seedlink_plugin.tpl └── setup.py ├── mseedscan ├── seedlink_plugin.tpl └── setup.py ├── mws ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_mws.tpl ├── naqs ├── seedlink_plugin.tpl ├── setup.py └── streams_naqs_bb40_sm100.tpl ├── nmxp ├── seedlink_plugin.tpl ├── setup.py └── streams_naqs_bb40_sm100.tpl ├── optodas ├── seedlink_plugin.tpl ├── setup.py └── streams_auto.tpl ├── ps2400_eth ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_ps2400_eth_edata_100.tpl ├── q330 ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_q330_100.tpl ├── reftek ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py ├── streams_reftek.tpl └── streams_reftek_6x40.tpl ├── sadc ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_sadc_100.tpl ├── scream ├── scream2sl.map ├── seedlink_plugin.tpl └── setup.py ├── scream_ring ├── scream2sl.map ├── seedlink_plugin.tpl └── setup.py ├── seedlink_head.tpl ├── seedlink_sproc.tpl ├── seedlink_station_head.tpl ├── streams_stream100.tpl ├── vaisala ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_vaisala.tpl ├── wago ├── plugins.ini.tpl ├── seedlink_plugin.tpl ├── setup.py └── streams_wago.tpl ├── wave24 ├── seedlink_plugin.tpl ├── setup.py └── streams_wave24bb.tpl └── win ├── seedlink_plugin.tpl ├── setup.py └── streams_win.tpl /.clabot: -------------------------------------------------------------------------------- 1 | { 2 | "contributors": "https://api.github.com/repos/GEOFON/CLA/contents/.contributors", 3 | "label": "cla-signed", 4 | "message": "We require contributors to sign our Contributor License Agreement, and we don't have {{usersWithoutCLA}} on file. Please follow https://github.com/GEOFON/CLA/blob/master/README.md to get yourself added." 5 | } 6 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SC_BEGIN_PACKAGE(SEEDLINK) 2 | 3 | INCLUDE(CheckFunctionExists) 4 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types") 5 | 6 | SUBDIRS(libs apps plugins templates) 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SeisComP SeedLink repository 2 | 3 | This repository contains the SeedLink application. 4 | 5 | The repository cannot be built standalone. It needs to be integrated 6 | into the `seiscomp` build environment and checked out into 7 | `src/base/seedlink`. 8 | 9 | ``` 10 | $ git clone [host]/seiscomp.git 11 | $ cd seiscomp/src/base 12 | $ git clone [host]/seedlink.git 13 | ``` 14 | 15 | # Build 16 | 17 | ## Compilation 18 | 19 | Follow the build instructions from the `seiscomp` repository. 20 | -------------------------------------------------------------------------------- /apps/3rd-party/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS(slinktool slarchive) -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS(src) 2 | 3 | SC_INSTALL_INIT(slarchive config/slarchive.py) 4 | INSTALL(FILES config/slarchive.cfg DESTINATION ${SC3_PACKAGE_CONFIG_DIR}) 5 | 6 | INSTALL( 7 | DIRECTORY templates/ 8 | DESTINATION ${SC3_PACKAGE_SHARE_DIR}/templates/slarchive 9 | PATTERN ".svn" EXCLUDE 10 | PATTERN "CMakeLists.txt" EXCLUDE 11 | ) 12 | 13 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 14 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 15 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/Makefile: -------------------------------------------------------------------------------- 1 | DIRS = src 2 | 3 | all: $(DIRS) 4 | 5 | .PHONY: $(DIRS) $(DIRS:%=depend_%) $(DIRS:%=clean_%) all depend clean 6 | 7 | depend: $(DIRS:%=depend_%) 8 | 9 | clean: $(DIRS:%=clean_%) 10 | 11 | $(DIRS): 12 | $(MAKE) -C $@ 13 | 14 | $(DIRS:%=depend_%): 15 | -$(MAKE) -C $(@:depend_%=%) depend 16 | 17 | $(DIRS:%=clean_%): 18 | -$(MAKE) -C $(@:clean_%=%) clean 19 | 20 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/README: -------------------------------------------------------------------------------- 1 | 2 | slarchive, a SeedLink client for archiving data streams 3 | 4 | For usage information see the slarchive(1) man page in the 'doc' 5 | directory. 6 | 7 | -- Building/Installing -- 8 | 9 | In most environments a simple 'make' will compile slarchive. 10 | 11 | Using GCC, running 'make static' will compile a static version of slarchive 12 | if possible. 13 | 14 | GCC can be explicitly used by running 'make gcc'. 15 | 16 | SunOS/Solaris: 17 | 18 | In order to compile under Solaris the 'src/Makefile' needs to be edited. 19 | See the file for instructions. 20 | 21 | For further installation simply copy the resulting binary and man page 22 | (in the 'doc' directory) to appropriate system directories. 23 | 24 | -- Licensing -- 25 | 26 | This program is free software; you can redistribute it and/or modify 27 | it under the terms of the GNU General Public License as published by 28 | the Free Software Foundation; either version 2 of the License, or (at 29 | your option) any later version. 30 | 31 | This program is distributed in the hope that it will be useful, but 32 | WITHOUT ANY WARRANTY; without even the implied warranty of 33 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 34 | General Public License (GNU-GPL) for more details. The GNU-GPL and 35 | further information can be found here: http://www.gnu.org/ 36 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FIND_PACKAGE(OpenSSL REQUIRED) 2 | 3 | SET(SLARCHIVE_SOURCES 4 | archive.c 5 | dsarchive.c 6 | slarchive.c 7 | ) 8 | 9 | INCLUDE_DIRECTORIES(../../../../libs/3rd-party/libslink) 10 | 11 | ADD_EXECUTABLE(slarchive ${SLARCHIVE_SOURCES}) 12 | 13 | TARGET_LINK_LIBRARIES(slarchive slink crypto) 14 | 15 | INSTALL(TARGETS slarchive 16 | RUNTIME DESTINATION ${SC3_PACKAGE_BIN_DIR}) 17 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/src/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR = ../.. 2 | BINDIR = $(BASEDIR)/bin 3 | SLINKDIR = $(BASEDIR)/libslink 4 | SLINKLIB = $(SLINKDIR)/libslink.a 5 | 6 | CC = gcc 7 | CFLAGS = -O2 -Wall 8 | 9 | # For using another compiler (e.g. the Sun compiler) 10 | #CC = cc 11 | #CFLAGS = -O 12 | 13 | LDFLAGS = 14 | LDLIBS = 15 | 16 | # For SunOS/Solaris uncomment the following line 17 | #LDLIBS = -lsocket -lnsl -lrt 18 | 19 | OBJS = dsarchive.o archive.o slarchive.o 20 | 21 | all: $(BINDIR)/slarchive 22 | 23 | .PHONY: all clean install depend 24 | 25 | $(BINDIR)/slarchive: $(OBJS) $(SLINKLIB) 26 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 27 | 28 | $(OBJS): %.o: %.c 29 | $(CC) $(CFLAGS) -I$(SLINKDIR) -c $< -o $@ 30 | 31 | $(SLINKLIB): 32 | $(MAKE) -C $(SLINKDIR) 33 | 34 | depend: 35 | $(CC) $(CFLAGS) -I$(SLINKDIR) -MM *.c > .depend 36 | 37 | clean: 38 | $(RM) $(OBJS) .depend 39 | 40 | install: 41 | @echo 42 | @echo "No install method, copy the binary and man page yourself" 43 | @echo 44 | 45 | -include .depend 46 | 47 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/src/archive.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ARCHIVE_H 3 | #define ARCHIVE_H 4 | 5 | #include 6 | 7 | #include "dsarchive.h" 8 | 9 | #define ARCH 1 10 | #define SDS 2 11 | #define BUD 3 12 | #define DLOG 4 13 | 14 | extern int archstream_proc (DataStream *datastream, SLMSrecord *msr, 15 | int reclen); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/src/dsarchive.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DSARCHIVE_H 3 | #define DSARCHIVE_H 4 | 5 | #include 6 | #include 7 | #include 8 | #include "uthash.h" 9 | 10 | #define MAX_FILENAME_LEN 400 11 | extern int DS_BUFSIZE; 12 | 13 | typedef struct DataStreamGroup_s 14 | { 15 | char *defkey; 16 | int filed; 17 | time_t modtime; 18 | double lastsample; 19 | char futurecontprint; 20 | char futureinitprint; 21 | char filename[MAX_FILENAME_LEN]; 22 | char *buf; 23 | int bp; 24 | UT_hash_handle hh; 25 | } 26 | DataStreamGroup; 27 | 28 | typedef struct DataStream_s 29 | { 30 | char *path; 31 | char archivetype; 32 | char packettype; 33 | int idletimeout; 34 | char futurecontflag; 35 | int futurecont; 36 | char futureinitflag; 37 | int futureinit; 38 | struct DataStreamGroup_s *grouphash; 39 | } 40 | DataStream; 41 | 42 | extern int ds_streamproc (DataStream *datastream, char *pathformat, 43 | SLMSrecord *msr, int reclen); 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /apps/3rd-party/slarchive/templates/purge_datafiles.tpl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Generated at $date - Do not edit! 4 | # template: $template 5 | 6 | CFGDIR="$slarchive._config_dir" 7 | ARCHIVE="$archive" 8 | 9 | for rc in `find $$CFGDIR -name "rc_*"`; do 10 | station=$${rc##*_} 11 | source $$rc 12 | find "$$ARCHIVE"/*/"$$NET/$$STATION" -type f -follow -mtime +$$ARCH_KEEP -exec rm -f '{}' \; 13 | done 14 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS(src) 2 | 3 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 4 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 5 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/Makefile: -------------------------------------------------------------------------------- 1 | DIRS = src 2 | 3 | all: $(DIRS) 4 | 5 | .PHONY: $(DIRS) $(DIRS:%=depend_%) $(DIRS:%=clean_%) all depend clean 6 | 7 | depend: $(DIRS:%=depend_%) 8 | 9 | clean: $(DIRS:%=clean_%) 10 | 11 | $(DIRS): 12 | $(MAKE) -C $@ 13 | 14 | $(DIRS:%=depend_%): 15 | -$(MAKE) -C $(@:depend_%=%) depend 16 | 17 | $(DIRS:%=clean_%): 18 | -$(MAKE) -C $(@:clean_%=%) clean 19 | 20 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SLINKTOOL_SOURCES 2 | archive.c 3 | dsarchive.c 4 | slinktool.c 5 | slinkxml.c 6 | ) 7 | 8 | INCLUDE_DIRECTORIES(../../../../libs/3rd-party/libslink) 9 | INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) 10 | 11 | ADD_EXECUTABLE(slinktool ${SLINKTOOL_SOURCES}) 12 | 13 | TARGET_LINK_LIBRARIES( 14 | slinktool 15 | ${LIBXML2_LIBRARIES} 16 | slink 17 | ) 18 | 19 | INSTALL(TARGETS slinktool 20 | RUNTIME DESTINATION ${SC3_PACKAGE_BIN_DIR} 21 | ) 22 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/src/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR = ../.. 2 | BINDIR = $(BASEDIR)/bin 3 | SLINKDIR = $(BASEDIR)/libslink 4 | SLINKLIB = $(SLINKDIR)/libslink.a 5 | 6 | XML_INCL := $(shell xml2-config --cflags) 7 | XML_LIBS := $(shell xml2-config --libs) 8 | 9 | CC = gcc 10 | CFLAGS = -Wall -O2 11 | 12 | # For using another compiler (e.g. the Sun compiler) 13 | #CC = cc 14 | #CFLAGS = -O 15 | 16 | LDFLAGS = 17 | LDLIBS = 18 | 19 | # For SunOS/Solaris uncomment the following line 20 | #LDLIBS = -lsocket -lnsl -lrt 21 | 22 | OBJS = dsarchive.o archive.o slinkxml.o slinktool.o 23 | 24 | all: $(BINDIR)/slinktool 25 | 26 | .PHONY: all clean install depend 27 | 28 | $(BINDIR)/slinktool: $(OBJS) $(SLINKLIB) 29 | $(CC) $(LDFLAGS) $+ $(XML_LIBS) $(LDLIBS) -o $@ 30 | 31 | $(OBJS): %.o: %.c 32 | $(CC) $(CFLAGS) $(XML_INCL) -I$(SLINKDIR) -c $< -o $@ 33 | 34 | $(SLINKLIB): 35 | $(MAKE) -C $(SLINKDIR) 36 | 37 | depend: 38 | $(CC) $(CFLAGS) $(XML_INCL) -I$(SLINKDIR) -MM *.c > .depend 39 | 40 | clean: 41 | $(RM) $(OBJS) .depend 42 | 43 | install: 44 | @echo 45 | @echo "No install method, copy the binary and man page yourself" 46 | @echo 47 | 48 | -include .depend 49 | 50 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/src/archive.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ARCHIVE_H 3 | #define ARCHIVE_H 4 | 5 | #include 6 | 7 | extern int arch_streamproc (const char *archformat, const SLMSrecord *msr, 8 | int reclen, int type, int idletimeout); 9 | extern int sds_streamproc (const char *sdsdir, const SLMSrecord *msr, 10 | int reclen, int type, int idletimeout); 11 | extern int bud_streamproc (const char *buddir, const SLMSrecord *msr, 12 | int reclen, int idletimeout); 13 | extern int dlog_streamproc (const char *sdsdir, const SLMSrecord *msr, 14 | int reclen, int type, int idletimeout); 15 | #endif 16 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/src/dsarchive.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DSARCHIVE_H 3 | #define DSARCHIVE_H 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #if defined (SLP_WIN32) 10 | #include 11 | #include 12 | #define mkdir _mkdir 13 | #define access _access 14 | #endif 15 | 16 | /* For the data stream chains */ 17 | typedef struct DataStream_s 18 | { 19 | char *defkey; 20 | FILE *filep; 21 | time_t modtime; 22 | struct DataStream_s *next; 23 | } 24 | DataStream; 25 | 26 | 27 | extern int ds_streamproc (DataStream **streamroot, char *pathformat, 28 | const SLMSrecord *msr, int reclen, int type, 29 | int idletimeout); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /apps/3rd-party/slinktool/src/slinkxml.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SLINKXML_H 3 | #define SLINKXML_H 4 | 5 | #include 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" 10 | { 11 | #endif 12 | 13 | extern void prtinfo_identification(xmlDocPtr doc); 14 | extern void prtinfo_stations(xmlDocPtr doc); 15 | extern void prtinfo_streams(xmlDocPtr doc); 16 | extern void prtinfo_gaps(xmlDocPtr doc); 17 | extern void prtinfo_connections(xmlDocPtr doc); 18 | 19 | /* Interface functions for libxml2 */ 20 | extern xmlParserCtxtPtr xml_begin (); 21 | extern int xml_parse_chunk (xmlParserCtxtPtr ctxt, const char *chunk, int size, 22 | int terminate); 23 | extern xmlDocPtr xml_end (xmlParserCtxtPtr ctxt); 24 | extern void xml_free_doc (xmlDocPtr doc); 25 | extern const char *xml_get_prop (xmlNodePtr node, const char *name); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* SLINKXML_H */ 32 | -------------------------------------------------------------------------------- /apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS(seedlink utils 3rd-party) 2 | -------------------------------------------------------------------------------- /apps/seedlink/buffer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) GFZ Potsdam * 3 | * All rights reserved. * 4 | * * 5 | * GNU Affero General Public License Usage * 6 | * This file may be used under the terms of the GNU Affero * 7 | * Public License version 3.0 as published by the Free Software Foundation * 8 | * and appearing in the file LICENSE included in the packaging of this * 9 | * file. Please review the following information to ensure the GNU Affero * 10 | * Public License version 3.0 requirements will be met: * 11 | * https://www.gnu.org/licenses/agpl-3.0.html. * 12 | ***************************************************************************/ 13 | 14 | #ifndef BUFFER_H 15 | #define BUFFER_H 16 | 17 | class Buffer 18 | { 19 | protected: 20 | Buffer(int size_init): size(size_init) {} 21 | virtual ~Buffer() {} 22 | 23 | public: 24 | const int size; 25 | 26 | virtual void *data() const =0; 27 | }; 28 | 29 | class BufferStore 30 | { 31 | public: 32 | virtual Buffer *get_buffer() =0; 33 | virtual void queue_buffer(Buffer *buf) =0; 34 | virtual int size() const { return 0; } 35 | virtual void enlarge(int newsize) {} 36 | virtual ~BufferStore() {} 37 | }; 38 | 39 | #endif // BUFFER_H 40 | 41 | -------------------------------------------------------------------------------- /apps/seedlink/descriptions/media/seedlink/Handshaking_uni_multi_station_mode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeisComP/seedlink/ea18b513c8969653a8fee91dd8e81a07f4356686/apps/seedlink/descriptions/media/seedlink/Handshaking_uni_multi_station_mode.jpg -------------------------------------------------------------------------------- /apps/seedlink/encoder.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) GFZ Potsdam * 3 | * All rights reserved. * 4 | * * 5 | * GNU Affero General Public License Usage * 6 | * This file may be used under the terms of the GNU Affero * 7 | * Public License version 3.0 as published by the Free Software Foundation * 8 | * and appearing in the file LICENSE included in the packaging of this * 9 | * file. Please review the following information to ensure the GNU Affero * 10 | * Public License version 3.0 requirements will be met: * 11 | * https://www.gnu.org/licenses/agpl-3.0.html. * 12 | ***************************************************************************/ 13 | 14 | #ifndef ENCODER_H 15 | #define ENCODER_H 16 | 17 | #include 18 | 19 | #include "spclock.h" 20 | 21 | namespace SProc_private { 22 | 23 | class Encoder 24 | { 25 | public: 26 | virtual void send_data(int32_t sample_val) =0; 27 | virtual void sync_time(const SPClock &clk) =0; 28 | virtual void flush() =0; 29 | virtual ~Encoder() {} 30 | }; 31 | 32 | } // namespace SProc_private 33 | 34 | #endif // ENCODER_H 35 | 36 | -------------------------------------------------------------------------------- /apps/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) 2 | INCLUDE_DIRECTORIES(../../libs/slutils) 3 | INCLUDE_DIRECTORIES(../../libs/3rd-party/libslink) 4 | 5 | ADD_EXECUTABLE(load_timetable load_timetable.cc) 6 | TARGET_LINK_LIBRARIES(load_timetable ${LIBXML2_LIBRARIES} slutils slink m) 7 | 8 | INSTALL(TARGETS load_timetable 9 | RUNTIME DESTINATION ${SC3_PACKAGE_BIN_DIR}) 10 | -------------------------------------------------------------------------------- /libs/3rd-party/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS(libslink) 2 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SLINK_SOURCES 2 | gswap.c 3 | unpack.c 4 | msrecord.c 5 | genutils.c 6 | strutils.c 7 | logging.c 8 | network.c 9 | statefile.c 10 | config.c 11 | slplatform.c 12 | slutils.c 13 | globmatch.c 14 | ) 15 | 16 | ADD_LIBRARY(slink STATIC ${SLINK_SOURCES}) 17 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/Makefile.win: -------------------------------------------------------------------------------- 1 | # 2 | # Nmake file For libslink - MS Visual C/C++ 3 | # Use 'nmake -f Makefile.win' 4 | 5 | NODEBUG=1 6 | 7 | INCS = /I. 8 | OPTS = -D_CRT_SECURE_NO_WARNINGS 9 | LIB = libslink.lib 10 | DLL = libslink.dll 11 | 12 | OBJS= gswap.obj \ 13 | unpack.obj \ 14 | msrecord.obj \ 15 | genutils.obj \ 16 | strutils.obj \ 17 | logging.obj \ 18 | network.obj \ 19 | statefile.obj \ 20 | config.obj \ 21 | slplatform.obj \ 22 | slutils.obj \ 23 | globmatch.obj 24 | 25 | all: lib 26 | 27 | lib: $(OBJS) 28 | link.exe /lib /nologo /out:$(LIB) $(OBJS) 29 | 30 | dll: $(OBJS) 31 | link.exe /dll /nologo /out:$(DLL) $(OBJS) 32 | 33 | .c.obj: 34 | $(CC) /nologo $(CFLAGS) $(INCS) $(OPTS) /c $< 35 | 36 | # Clean-up directives 37 | clean: 38 | -del a.out core *.o *.obj *% *~ $(LIB) $(DLL) 39 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_collect_nb.3: -------------------------------------------------------------------------------- 1 | sl_collect.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_doy2md.3: -------------------------------------------------------------------------------- 1 | sl_utils.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_dtime.3: -------------------------------------------------------------------------------- 1 | sl_utils.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_freeslcd.3: -------------------------------------------------------------------------------- 1 | sl_newslcd.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_log_r.3: -------------------------------------------------------------------------------- 1 | sl_log.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_log_rl.3: -------------------------------------------------------------------------------- 1 | sl_log.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_loginit.3: -------------------------------------------------------------------------------- 1 | sl_log.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_loginit_r.3: -------------------------------------------------------------------------------- 1 | sl_log.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_loginit_rl.3: -------------------------------------------------------------------------------- 1 | sl_log.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_msr_depochstime.3: -------------------------------------------------------------------------------- 1 | sl_msr_new.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_msr_dnomsamprate.3: -------------------------------------------------------------------------------- 1 | sl_msr_new.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_msr_dsamprate.3: -------------------------------------------------------------------------------- 1 | sl_msr_new.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_msr_free.3: -------------------------------------------------------------------------------- 1 | sl_msr_new.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_msr_parse.3: -------------------------------------------------------------------------------- 1 | sl_msr_new.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_msr_print.3: -------------------------------------------------------------------------------- 1 | sl_msr_new.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_parse_streamlist.3: -------------------------------------------------------------------------------- 1 | sl_read_streamlist.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_ping.3: -------------------------------------------------------------------------------- 1 | .TH SL_PING 3 2004/08/06 2 | .SH NAME 3 | 4 | sl_ping \- Test the existence of a SeedLink server 5 | 6 | .SH SYNOPSIS 7 | .nf 8 | .B #include 9 | .sp 10 | .BI "int \fBsl_ping\fP (SLCD * " slconn ", char *" serverid ", char *" site "); 11 | .fi 12 | .SH DESCRIPTION 13 | \fBsl_ping\fP connects to a SeedLink server and issues the 'HELLO' 14 | command. If a valid response is received is will be parsed and copied 15 | into the \fIserverid\fP and \fIsite\fP strings. Each string should have 16 | room for at least 100 characters. 17 | 18 | .SH RETURN VALUES 19 | \fBsl_ping\fP returns 0 on success, -1 when a socket connection was 20 | opened but no valid response to the 'HELLO' command was received and -2 21 | when the socket conneciton could not be opened. 22 | 23 | .SH AUTHOR 24 | .nf 25 | Chad Trabant 26 | IRIS Data Management Center 27 | .fi 28 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_recoverstate.3: -------------------------------------------------------------------------------- 1 | sl_savestate.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_request_info.3: -------------------------------------------------------------------------------- 1 | .TH SL_REQUEST_INFO 3 2004/06/16 2 | .SH NAME 3 | sl_request_info \- add INFO request to SeedLink Connection Description 4 | 5 | .SH SYNOPSIS 6 | .nf 7 | .B #include 8 | .sp 9 | .BI "int \fBsl_request_info\fP (SLCD *" slconn ", char *" infostr "); 10 | .fi 11 | .SH DESCRIPTION 12 | Designed to work in conjuntion with \fBsl_collect\fP, the 13 | \fBsl_request_info\fP function adds an INFO request to the connection 14 | description \fIslconn\fP. The INFO request specified with 15 | \fIinfostr\fP will be sent to the server during the next iteration of 16 | \fBsl_collect\fP. Important: this function simply redirects the 17 | \fIslconn->info\fP pointer to the \fIinfostr\fP pointer; this means 18 | that the content of the string pointed to by \fIinfostr\fP must not be 19 | destroyed or changed until the INFO request has been sent. 20 | 21 | Only one request can be "queued up" at a time, \fBsl_request_info\fP 22 | will complain if it is used while a previous request is still waiting 23 | to be sent. The \fIslconn->info\fP pointer will be NULL if no 24 | requests are pending. 25 | 26 | .SH RETURN VALUES 27 | Returns 0 on success and -1 on error. 28 | 29 | .SH EXAMPLE 30 | See \fBsl_collect\fP(3) for an example. 31 | 32 | .SH SEE ALSO 33 | \fBsl_collect\fP(3), libslink Users Guide 34 | 35 | .SH AUTHOR 36 | .nf 37 | Chad Trabant 38 | Developed while at ORFEUS Data Center/EC-Project MEREDIAN 39 | Currently at IRIS Data Management Center 40 | .fi 41 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_sequence.3: -------------------------------------------------------------------------------- 1 | sl_packettype.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_setuniparams.3: -------------------------------------------------------------------------------- 1 | sl_addstream.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_strncpclean.3: -------------------------------------------------------------------------------- 1 | sl_utils.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/doc/sl_terminate.3: -------------------------------------------------------------------------------- 1 | sl_collect.3 -------------------------------------------------------------------------------- /libs/3rd-party/libslink/example/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # Build environment can be configured the following 3 | # environment variables: 4 | # CC : Specify the C compiler to use 5 | # CFLAGS : Specify compiler options to use 6 | 7 | # GCC specific parameters 8 | GCC = gcc 9 | GCCFLAGS = -O2 -Wall -I.. 10 | 11 | # Required compiler parameters 12 | CFLAGS += -I.. 13 | 14 | LDFLAGS = -L.. 15 | LDLIBS = -lslink 16 | 17 | # For Windows w/ Unix-like build environments uncomment the following line 18 | # This is needed for MinGW but not for Cygwin 19 | #LDLIBS = -lslink -lws2_32 20 | 21 | # For SunOS/Solaris uncomment the following line 22 | #LDLIBS = -lslink -lsocket -lnsl -lrt 23 | 24 | BIN = slclient 25 | 26 | OBJS = slclient.o 27 | 28 | all: $(BIN) 29 | 30 | $(BIN): $(OBJS) 31 | $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS) $(LDLIBS) 32 | 33 | static: $(OBJS) 34 | $(CC) -static $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS) $(LDLIBS) 35 | 36 | cc: 37 | @$(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)" 38 | 39 | gcc: 40 | @$(MAKE) "CC=$(GCC)" "CFLAGS=$(GCCFLAGS)" 41 | 42 | debug: 43 | $(MAKE) "CC=$(CC)" "CFLAGS=-g $(CFLAGS)" 44 | 45 | gccdebug: 46 | $(MAKE) "CC=$(GCC)" "CFLAGS=-g $(GCCFLAGS)" 47 | 48 | clean: 49 | rm -f $(OBJS) $(BIN) 50 | 51 | # Implicit rule for building object files 52 | %.o: %.c 53 | $(CC) $(CFLAGS) -c $< 54 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/example/Makefile.wat: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # Wmake File for libslink example client - For Watcom's wmake 4 | # Use 'wmake -f Makefile.wat' 5 | 6 | .BEFORE 7 | @set INCLUDE=.;$(%watcom)\H;$(%watcom)\H\NT 8 | @set LIB=.;$(%watcom)\LIB386 9 | 10 | cc = wcc386 11 | cflags = -zq 12 | lflags = OPT quiet OPT map LIBRARY ..\libslink.lib LIBRARY ws2_32.lib 13 | cvars = $+$(cvars)$- -DWIN32 14 | 15 | BIN = slclient.exe 16 | 17 | INCS = -I.. 18 | 19 | OBJS= slclient.obj 20 | 21 | all: $(BIN) 22 | 23 | $(BIN): $(OBJS) 24 | wlink $(lflags) name slclient file {$(OBJS)} 25 | 26 | # Source dependencies: 27 | slclient.obj: slclient.c 28 | 29 | # How to compile sources: 30 | .c.obj: 31 | $(cc) $(cflags) $(cvars) $(INCS) $[@ -fo=$@ 32 | 33 | # Clean-up directives: 34 | clean: .SYMBOLIC 35 | del *.obj *.map 36 | del $(BIN) 37 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/example/Makefile.win: -------------------------------------------------------------------------------- 1 | # 2 | # Nmake file for libslink example client - Windows version 3 | # Use 'nmake -f Makefile.win' 4 | 5 | INCS = /I.. 6 | OPTS = -D_CRT_SECURE_NO_WARNINGS 7 | LIBS = ../libslink.lib ws2_32.lib 8 | BIN = slclient.exe 9 | 10 | OBJS = slclient.obj 11 | 12 | all: slclient 13 | 14 | slclient: $(OBJS) 15 | link.exe /nologo /out:$(BIN) $(LIBS) $(OBJS) 16 | 17 | .c.obj: 18 | $(CC) /nologo $(CFLAGS) $(INCS) $(OPTS) /c $< 19 | 20 | # Clean-up directives 21 | clean: 22 | -del a.out core *.o *.obj *% *~ $(BIN) 23 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/example/README: -------------------------------------------------------------------------------- 1 | 2 | Documentation of the libslink interfaces can be found in the 'doc' 3 | directory. 4 | 5 | -- slclient.c -- 6 | 7 | An example SeedLink client written in C that demonstrates general 8 | usage of libslink. A Makefile is provided to build the client. The 9 | client does not exercise all of the functionality of libslink. For a 10 | more comprehensive example the developer is referred to the source 11 | code for slinktool. 12 | 13 | Solaris: to compile slclient.c the Makefile needs to be edited 14 | (comments are included in the Makefile). 15 | 16 | Windows: to compile slclient.c use the Nmake compatible Makefile.win 17 | (e.g. >nmake -f Makefile.win) or Watcom's Wmake with Makefile.wat 18 | (e.g. >wmake -f Makefile.wat). 19 | 20 | 21 | -- streamlist.conf -- 22 | 23 | An example stream list that can be used with the -l argument of 24 | slclient or with the sl_read_streamlist() function from libslink. 25 | 26 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/example/streamlist.conf: -------------------------------------------------------------------------------- 1 | # Comment lines begin with a '#' or '*' 2 | # Example stream list file for use with the -l argument of slclient or 3 | # with the sl_read_streamlist() libslink function. 4 | GE ISP BH?.D 5 | NL HGN 6 | MN AQU BH? HH? 7 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/globmatch.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SL_GLOBMATCH_H 3 | #define SL_GLOBMATCH_H 1 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | #ifndef SL_GLOBMATCH_NEGATE 11 | #define SL_GLOBMATCH_NEGATE '^' /* std char set negation char */ 12 | #endif 13 | 14 | 15 | int sl_globmatch(char *string, char *pattern); 16 | 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* globmatch.h */ 23 | -------------------------------------------------------------------------------- /libs/3rd-party/libslink/unpack.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * unpack.h: 3 | * 4 | * Interface declarations for the Mini-SEED unpacking routines in unpack.c 5 | * 6 | * Written by Chad Trabant, ORFEUS/EC-Project MEREDIAN 7 | * 8 | * modified: 2006.336 9 | ***************************************************************************/ 10 | 11 | 12 | #ifndef UNPACK_H 13 | #define UNPACK_H 1 14 | 15 | #include "libslink.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | extern int sl_msr_unpack (SLlog * log, SLMSrecord * msr, int swapflag); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /libs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS(3rd-party slutils plugin) 2 | -------------------------------------------------------------------------------- /libs/plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SLPLUGIN_HEADERS 2 | plugin.h 3 | plugin_channel.h 4 | plugin_exceptions.h 5 | plugin_module.h 6 | ) 7 | 8 | 9 | SET(SLPLUGIN_SOURCES 10 | plugin.c 11 | plugin_channel.cc 12 | ) 13 | 14 | INCLUDE_DIRECTORIES(../slutils) 15 | INCLUDE_DIRECTORIES(../3rd-party/qlib2) 16 | 17 | ADD_LIBRARY(slplugin STATIC ${SLPLUGIN_SOURCES}) 18 | -------------------------------------------------------------------------------- /libs/plugin/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR = .. 2 | SLUTILSDIR = $(BASEDIR)/libslutils 3 | QDIR = $(BASEDIR)/qlib2 4 | 5 | CXX_OBJ = plugin_channel.o 6 | CC_OBJ = plugin.o 7 | 8 | CXX = g++ 9 | CXXFLAGS = -Wall -O2 10 | CC = gcc 11 | CFLAGS = -Wall -Wstrict-prototypes -O2 12 | 13 | all: libslplugin.a 14 | 15 | .PHONY: all depend clean 16 | 17 | libslplugin.a: $(CXX_OBJ) $(CC_OBJ) 18 | ar -cr $@ $+ 19 | 20 | $(CXX_OBJ): %.o: %.cc 21 | $(CXX) $(CXXFLAGS) -I$(SLUTILSDIR) -I$(QDIR) -c $< -o $@ 22 | 23 | $(CC_OBJ): %.o: %.c 24 | $(CC) $(CFLAGS) -I$(QDIR) -c $< -o $@ 25 | 26 | depend: 27 | $(CXX) -I$(SLUTILSDIR) -I$(QDIR) -MM *.cc *.c > .depend 28 | 29 | clean: 30 | $(RM) libslplugin.a $(CXX_OBJ) $(CC_OBJ) .depend 31 | 32 | -include .depend 33 | 34 | -------------------------------------------------------------------------------- /libs/slutils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | INCLUDE(flex) 2 | FIND_FLEX() 3 | 4 | SET(SLUTILS_HEADERS 5 | big-endian.h 6 | byteorder_swap.h 7 | little-endian.h 8 | confattr.h 9 | confbase.h 10 | conf_ini.h 11 | conf_xml.h 12 | cppstreams.h 13 | descriptor.h 14 | diag.h 15 | utils.h 16 | qtime.h 17 | ) 18 | 19 | SET(SLUTILS_SOURCES 20 | utils.cc 21 | qtime.cc 22 | conf_xml.cc 23 | confbase.cc 24 | ) 25 | 26 | IF (CMAKE_COMPILER_IS_GNUCC) 27 | REMOVE_DEFINITIONS(-pedantic) 28 | ENDIF (CMAKE_COMPILER_IS_GNUCC) 29 | 30 | INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) 31 | INCLUDE_DIRECTORIES(.) 32 | 33 | ADD_FLEX_FILES(SLUTILS_SOURCES conf_ini.l) 34 | ADD_LIBRARY(slutils STATIC ${SLUTILS_SOURCES}) 35 | -------------------------------------------------------------------------------- /libs/slutils/Makefile: -------------------------------------------------------------------------------- 1 | XML_INCL := $(shell xml2-config --cflags) 2 | 3 | OBJS = utils.o lex.ini.o conf_xml.o confbase.o 4 | 5 | CXX = g++ 6 | CXXFLAGS = -Wall -O2 7 | LEX = flex 8 | 9 | all: libslutils.a 10 | 11 | .PHONY: all depend clean 12 | 13 | libslutils.a: $(OBJS) 14 | ar -cr $@ $+ 15 | 16 | $(OBJS): %.o: %.cc 17 | $(CXX) $(CXXFLAGS) $(XML_INCL) -c $< -o $@ 18 | 19 | lex.ini.cc: conf_ini.l 20 | $(LEX) -o$@ $< 21 | 22 | depend: 23 | $(CXX) $(XML_INCL) -MM *.cc > .depend 24 | 25 | clean: 26 | $(RM) libslutils.a lex.ini.cc $(OBJS) .depend 27 | 28 | -include .depend 29 | 30 | -------------------------------------------------------------------------------- /libs/slutils/flex/lex.ini.cc.patch: -------------------------------------------------------------------------------- 1 | --- lex.ini.cc.orig Sat Apr 8 19:43:57 2000 2 | +++ lex.ini.cc Sat Apr 8 19:44:58 2000 3 | @@ -1,3 +1,5 @@ 4 | +#include 5 | +using namespace std; 6 | #define yyFlexLexer INIFlexLexer 7 | 8 | #line 4 "lex.ini.cc" 9 | @@ -24,7 +26,6 @@ 10 | #ifdef __cplusplus 11 | 12 | #include 13 | -class istream; 14 | #include 15 | 16 | /* Use prototypes in function declarations. */ 17 | -------------------------------------------------------------------------------- /plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | INCLUDE_DIRECTORIES(../libs/slutils) 2 | 3 | SET( 4 | _DIR_LIST 5 | mseedfifo_plugin 6 | chain_plugin 7 | ) 8 | 9 | IF ( NOT MACOSX ) 10 | SET( 11 | _DIR_LIST 12 | ${_DIR_LIST} 13 | caps_plugin 14 | echopro_plugin 15 | ewexport_plugin 16 | ewexport_pasv_plugin 17 | fs_plugin 18 | minilogger_plugin 19 | mseedscan_plugin 20 | naqsplugin 21 | optodas_plugin 22 | q330plugin 23 | reftek_plugin 24 | scream_plugin 25 | scream2_plugin 26 | serial_plugin 27 | sockplugin 28 | wave24_plugin 29 | win_plugin 30 | ) 31 | ENDIF ( NOT MACOSX ) 32 | 33 | IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../common) 34 | SET(_DIR_LIST ${_DIR_LIST} gdrt_plugin) 35 | ENDIF() 36 | 37 | SET(SEEDLINK_PLUGIN_OUTPUT_DIR ${SC3_PACKAGE_SHARE_DIR}/plugins/seedlink) 38 | 39 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 40 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 41 | INSTALL(FILES plugin.py DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 42 | 43 | SUBDIRS(${_DIR_LIST}) 44 | -------------------------------------------------------------------------------- /plugins/Makefile: -------------------------------------------------------------------------------- 1 | DIRS = serial_plugin chain_plugin sockplugin naqsplugin nrts_plugin \ 2 | q330plugin reftek_plugin ewexport_plugin scream_plugin wave24_plugin \ 3 | mseedscan_plugin mseedfifo_plugin fs_plugin win_plugin 4 | 5 | LIBS = reftek_libs/archive reftek_libs/msgq reftek_libs/reftek \ 6 | reftek_libs/rtp reftek_libs/si reftek_libs/util lib330 7 | 8 | SPECIAL_LIBS = ISI_Toolkit_1_3_0 libgcf2-2.3.2 9 | 10 | all: $(DIRS) 11 | 12 | .PHONY: $(DIRS) $(DIRS:%=depend_%) $(DIRS:%=clean_%) $(LIBS:%=clean_%) \ 13 | $(SPECIAL_LIBS:%=clean_%) all depend clean 14 | 15 | depend: $(DIRS:%=depend_%) 16 | 17 | clean: $(DIRS:%=clean_%) $(LIBS:%=clean_%) $(SPECIAL_LIBS:%=clean_%) 18 | 19 | $(DIRS): 20 | $(MAKE) -C $@ 21 | 22 | $(DIRS:%=depend_%): 23 | -$(MAKE) -C $(@:depend_%=%) depend 24 | 25 | $(DIRS:%=clean_%) $(LIBS:%=clean_%): 26 | -$(MAKE) -C $(@:clean_%=%) clean 27 | 28 | clean_ISI_Toolkit_1_3_0: 29 | $(RM) ISI_Toolkit_1_3_0/lib/libisi.a 30 | $(RM) ISI_Toolkit_1_3_0/lib/makestamp 31 | 32 | clean_libgcf2-2.3.2: 33 | -$(MAKE) -C libgcf2-2.3.2 distclean 34 | 35 | -------------------------------------------------------------------------------- /plugins/README: -------------------------------------------------------------------------------- 1 | 2 | The code for the Seedlink plugin interface resides in this directory. 3 | 4 | The code for plugins are in subdirectories (i.e. ./sockplugin) 5 | 6 | At the moment the plugin interface code in this directory is incomplete, 7 | that is, there is only enough code to be able to use the send_mseed() 8 | function. 9 | -------------------------------------------------------------------------------- /plugins/caps_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(LIBCAPS_SOURCES 2 | libs/gempa/caps/application.cpp 3 | libs/gempa/caps/connection.cpp 4 | libs/gempa/caps/datetime.cpp 5 | libs/gempa/caps/log.cpp 6 | libs/gempa/caps/mseedpacket.cpp 7 | libs/gempa/caps/packet.cpp 8 | libs/gempa/caps/rawpacket.cpp 9 | libs/gempa/caps/riff.cpp 10 | libs/gempa/caps/sessiontable.cpp 11 | libs/gempa/caps/socket.cpp 12 | libs/gempa/caps/strptime.c 13 | ) 14 | 15 | SET(CAPSPLUGIN_SOURCES 16 | app.cpp 17 | main.cpp 18 | ${LIBCAPS_SOURCES} 19 | ) 20 | 21 | INCLUDE_DIRECTORIES(.) 22 | INCLUDE_DIRECTORIES(../../libs/plugin) 23 | INCLUDE_DIRECTORIES(../../libs/3rd-party/libslink) 24 | INCLUDE_DIRECTORIES(libs) 25 | INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) 26 | INCLUDE_DIRECTORIES(${SC_SYSTEM_LIB_DIR}/3rd-party/libmseed) 27 | 28 | ADD_EXECUTABLE(caps_plugin ${CAPSPLUGIN_SOURCES}) 29 | 30 | FIND_PACKAGE(OpenSSL REQUIRED) 31 | FIND_PACKAGE(Boost REQUIRED COMPONENTS system program_options) 32 | 33 | TARGET_LINK_LIBRARIES( 34 | caps_plugin 35 | slink 36 | slplugin 37 | slutils 38 | mseed 39 | ${Boost_system_LIBRARY} 40 | ${Boost_program_options_LIBRARY} 41 | ${CRYPTO} 42 | ${SSL} 43 | ) 44 | 45 | INSTALL(TARGETS caps_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 46 | 47 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 48 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 49 | -------------------------------------------------------------------------------- /plugins/caps_plugin/libs/gempa/caps/log.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * libcapsclient 3 | * Copyright (C) 2016 gempa GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | ***************************************************************************/ 18 | 19 | 20 | #include 21 | #include 22 | 23 | 24 | namespace Gempa { 25 | namespace CAPS { 26 | 27 | 28 | void SetLogHandler(LogLevel l, LogOutput o) { 29 | LogHandler[l] = o; 30 | } 31 | 32 | LogOutput LogHandler[LL_QUANTITY] = { NULL, NULL, NULL, NULL, NULL, NULL }; 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /plugins/caps_plugin/libs/gempa/caps/strptime.h: -------------------------------------------------------------------------------- 1 | #ifndef __STRPTIME_H__ 2 | #define __STRPTIME_H__ 3 | 4 | /* 5 | * Version of "strptime()", for the benefit of OSes that don't have it. 6 | */ 7 | extern char *strptime(const char *, const char *, struct tm *); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /plugins/caps_plugin/libs/gempa/caps/version.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * libcapsclient 3 | * Copyright (C) 2016 gempa GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | ***************************************************************************/ 18 | 19 | 20 | #define LIB_CAPS_VERSION 2019.021 21 | #define LIB_CAPS_BUILD_YEAR 2019 22 | #define LIB_CAPS_BUILD_DAY 21 23 | #define STR_VALUE_0(X) #X 24 | #define STR_VALUE(X) STR_VALUE_0(X) 25 | #define LIB_CAPS_VERSION_NAME STR_VALUE(LIB_CAPS_VERSION) 26 | -------------------------------------------------------------------------------- /plugins/caps_plugin/main.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * seedlink caps_plugin 3 | * Copyright (C) 2016 gempa GmbH 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | ***************************************************************************/ 18 | 19 | 20 | #include "app.h" 21 | 22 | 23 | int main(int argc, char **argv) { 24 | Gempa::CAPS::App app(argc, argv); 25 | return app(); 26 | } 27 | -------------------------------------------------------------------------------- /plugins/chain_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(CHAINPLUGIN_SOURCES 2 | chain_plugin.cc 3 | schedule.c 4 | ) 5 | 6 | INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) 7 | INCLUDE_DIRECTORIES(../../libs/plugin) 8 | INCLUDE_DIRECTORIES(../../libs/3rd-party/libslink) 9 | 10 | SET(OPTIONS "-DSYSLOG_FACILITY=LOG_LOCAL0") 11 | 12 | ADD_DEFINITIONS(${OPTIONS}) 13 | ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) 14 | 15 | ADD_EXECUTABLE(chain_plugin ${CHAINPLUGIN_SOURCES}) 16 | 17 | TARGET_LINK_LIBRARIES( 18 | chain_plugin 19 | slink 20 | slplugin 21 | slutils 22 | ${LIBXML2_LIBRARIES} 23 | ) 24 | 25 | INSTALL(TARGETS chain_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 26 | 27 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 28 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 29 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_antelope.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Antelope ORB (TCP/IP) 5 | 6 | 7 | 8 | Regular expression to match ORB packets, default is all 9 | waveform data. 10 | 11 | 12 | 13 | Hostname or IP of the Antelope ORB. 14 | 15 | 16 | Port of the Antelope ORB. 17 | 18 | 19 | 20 | Name of the proc object (defined in streams.xml); used for processing 21 | raw streams (streams submitted by a plugin as raw samples). 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_dr24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Geotech DR24 (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_echopro_3ch100hz.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Kelunji Echo/EchoPro serial plugin (3 Ch, 200 Hz) 5 | 6 | 7 | Serial Port. 8 | 9 | 10 | Name of stream processing scheme. 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_echopro_6ch200hz.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Kelunji Echo/EchoPro serial plugin (6 Ch, 100 Hz) 5 | 6 | 7 | Serial Port. 8 | 9 | 10 | Name of stream processing scheme. 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_edata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EarthData PS6-24 (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_gmeteo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GFZ meteo protocol (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_hrd24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Nanometrics HRD24 (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | Number of bundles in packet. 14 | 15 | 16 | 17 | Name of the proc object (defined in streams.xml); used for processing 18 | raw streams (streams submitted by a plugin as raw samples). 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_liss.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LISS server (TCP/IP) 5 | 6 | 7 | 8 | Hostname or IP of the LISS server. 9 | 10 | 11 | 12 | Port of the LISS server 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_m24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Lennartz M24 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | Time offset in usecs. 14 | 15 | 16 | 17 | Name of the proc object (defined in streams.xml); used for processing 18 | raw streams (streams submitted by a plugin as raw samples). 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_maram.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | maRam Weatherstation V1 (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_mk6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MK6 5 | 6 | 7 | 8 | Name of the proc object (defined in streams.xml); used for processing 9 | raw streams (streams submitted by a plugin as raw samples). 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_mppt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SunSaver MPPT via Modbus TCP/IP 5 | 6 | 7 | 8 | Hostname or IP. 9 | 10 | 11 | 12 | 13 | TCP port. 14 | 15 | 16 | 17 | 18 | Modbus unit identifier. 19 | 20 | 21 | 22 | 23 | List of channels. 24 | 25 | 26 | 27 | 28 | Name of the proc object (defined in streams.xml); used for processing 29 | raw streams (streams submitted by a plugin as raw samples). 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_mseedfifo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | seedlink 5 | Global options for the mseedfifo plugin 6 | 7 | 8 | 9 | 10 | 11 | Path to named fifo pipe. Default: 12 | $SEISCOMP_ROOT/var/run/seedlink/mseedfifo for seedlink. 13 | Alias modules automatically replace "seedlink" 14 | by the alias name. 15 | 16 | 17 | 18 | 19 | Do not exit plugin if writer closes the fifo. 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | mseedfifo_plugin 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_mseedscan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MseedScan transfers new or changed miniSEED files from a directory 6 | to a SeedLink server. It recursively a directory 7 | structures and continuously checks for file modifications. The files 8 | are presumed to be composed of Mini-SEED records of 512 Bytes. As the 9 | files are appended or created the plugin will feed the new records to 10 | the controlling SeedLink server. 11 | 12 | 13 | 14 | Directory to scan. 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_mws.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MWS (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_naqs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NAQS (TCP/IP) 5 | 6 | 7 | Address of server, required. 8 | 9 | 10 | Specify the NAQS control/data port. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_ps2400_eth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | The ps2400_eth plug-in fetches data from a Earth Data PS2400/PS6-24 6 | digitizer (firmware >= 2.23) using TCP/IP. Other configurable parameters 7 | are in $SEISCOMP_ROOT/share/templates/seedlink/ps2400_eth/plugins.ini.tpl. 8 | 9 | 10 | 11 | 12 | IP of the Earth Data PS2400/PS6-24 digitizer. 13 | 14 | 15 | 16 | 17 | Port of the Earth Data PS2400/PS6-24 digitizer. 18 | 19 | 20 | 21 | 22 | Name of the proc object (defined in streams.xml); used for processing 23 | raw streams (streams submitted by a plugin as raw samples). 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_sadc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SADC10/18/20/30 (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | Use PC time for initial time setting. 14 | 15 | 16 | 17 | Name of the proc object (defined in streams.xml); used for processing 18 | raw streams (streams submitted by a plugin as raw samples). 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_vaisala.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vaisala ASCII protocol (serial plugin) 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_wago.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WAGO Controller (T-Elektronik) 5 | 6 | 7 | 8 | Hostname or IP. 9 | 10 | 11 | 12 | 13 | TCP port. 14 | 15 | 16 | 17 | 18 | List of channels. 19 | 20 | 21 | 22 | 23 | Name of the proc object (defined in streams.xml); used for processing 24 | raw streams (streams submitted by a plugin as raw samples). 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /plugins/descriptions/seedlink_wave24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wave24 5 | 6 | 7 | Serial port. 8 | 9 | 10 | Baud rate. 11 | 12 | 13 | 14 | Name of the proc object (defined in streams.xml); used for processing 15 | raw streams (streams submitted by a plugin as raw samples). 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/echopro_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(ECHOPROPLUGIN_SOURCES 2 | echopro_plugin.c 3 | ../plugin.c 4 | ) 5 | 6 | INCLUDE_DIRECTORIES(.) 7 | INCLUDE_DIRECTORIES(..) 8 | 9 | ADD_EXECUTABLE(echopro_plugin ${ECHOPROPLUGIN_SOURCES}) 10 | TARGET_LINK_LIBRARIES(echopro_plugin m) 11 | 12 | INSTALL(TARGETS echopro_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 13 | -------------------------------------------------------------------------------- /plugins/echopro_plugin/README: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------- 2 | SeisComP plugin for the Kelunji EchoPro digitizer. 3 | ---------------------------------------------------- 4 | 5 | This plugin supports the Echo/EchoPro digitisers. 6 | Plugin supports one station per digitizer. 7 | All sample rates are supported. Up to 12 channels are supported. 8 | Plugin will automatically determine the sample rate and number of channles. 9 | Note: Digitizer must be configured with a baud rate of 57600bps. 10 | 11 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(EWEXPORTPLUGIN_SOURCES 2 | ewexport_pasv_plugin.c 3 | network.c 4 | swap.c 5 | util.c 6 | trheadconv.c 7 | ../plugin.c 8 | ) 9 | 10 | INCLUDE_DIRECTORIES(.) 11 | INCLUDE_DIRECTORIES(..) 12 | 13 | SET(OPTIONS -D_REENTRANT) 14 | 15 | ADD_DEFINITIONS(${OPTIONS}) 16 | 17 | ADD_EXECUTABLE(ewexport_pasv_plugin ${EWEXPORTPLUGIN_SOURCES}) 18 | TARGET_LINK_LIBRARIES(ewexport_pasv_plugin pthread) 19 | 20 | INSTALL(TARGETS ewexport_pasv_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 21 | 22 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 23 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 24 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/ChangeLog: -------------------------------------------------------------------------------- 1 | 2009.040: 2 | - Update my_getaddrinfo() to fall back to the system getaddrinfo() 3 | so compiling is not limited to Solaris and Linux. 4 | - Add packet start time when printing details of TRACEBUF packets. 5 | - Increase maximum log message length from 100 to 200 bytes. 6 | - Convert usage of longs to ints so 64-bit build works, the program 7 | does not particularly benefit from being a 64-bit executable. 8 | - Many small typos. 9 | 10 | 2004.016: Apparently no change log until this point. 11 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -D_REENTRANT -O2 -Wall 3 | 4 | # For using another compiler (e.g. the Sun compiler) 5 | #CC = cc 6 | #CFLAGS = -O -I../libslink 7 | 8 | LDFLAGS = 9 | LDLIBS = -lpthread 10 | 11 | # For SunOS/Solaris uncomment the following line 12 | #LDLIBS = -lsocket -lnsl -lrt -lpthread 13 | 14 | BIN = ../../bin/ewexport_plugin 15 | 16 | OBJS = ewexport_plugin.o network.o util.o swap.o plugin.o 17 | 18 | all: $(BIN) 19 | 20 | $(BIN): $(OBJS) 21 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 22 | 23 | ewexport_plugin.o: ewexport_plugin.c 24 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 25 | 26 | network.o: network.c 27 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 28 | 29 | swap.o: swap.c 30 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 31 | 32 | util.o: util.c 33 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 34 | 35 | plugin.o: ../plugin.c 36 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 37 | 38 | clean: 39 | rm -f $(OBJS) $(BIN) 40 | 41 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/README: -------------------------------------------------------------------------------- 1 | 2 | ewexport_plugin: 3 | 4 | This is a SeedLink plugin that collects data from an Earthworm 5 | export_? process. Usually the export_scnl program is run on a host 6 | with access to the appropriate data; export_scnl is a version of 7 | export_generic that will only transfer waveform data. While 8 | ewexport_plugin will accept any Earthworm messages only waveform data 9 | will be processed. 10 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/descriptions/seedlink_ewexport_pasv.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Earthworm passive export server (TCP/IP) 5 | 6 | 7 | 8 | Bind IP of the Earthworm passive export server. 9 | 10 | 11 | 12 | Port of the Earthworm passive export server. 13 | 14 | 15 | 16 | Name of the proc object (defined in streams.xml); used for processing 17 | raw streams (streams submitted by a plugin as raw samples). 18 | 19 | 20 | 21 | 22 | 23 | Text for heartbeat to server. 24 | 25 | 26 | 27 | 28 | Rate at which to expect heartbeats from server in seconds. 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/ewdefs.h: -------------------------------------------------------------------------------- 1 | 2 | /* The following defines are dependant on site specific Earthworm configuration, 3 | * These value are from a Earthworm v6.2 installation. 4 | */ 5 | 6 | #ifndef EWDEFS_H 7 | #define EWDEFS_H 8 | 9 | 10 | /**** From the earthworm_global.d of an operational system ****/ 11 | 12 | #define TYPE_HEARTBEAT 3 13 | #define TYPE_TRACEBUF2 19 14 | #define TYPE_TRACEBUF 20 15 | 16 | 17 | 18 | /**** From imp_exp_gen.h ****/ 19 | 20 | #define MAX_ALIVE_STR 256 21 | 22 | #define STX 2 /* Start Transmission: used to frame beginning of message */ 23 | #define ETX 3 /* End Transmission: used to frame end of message */ 24 | #define ESC 27 /* Escape: used to 'cloak' unfortunate binary bit patterns which look like sacred characters */ 25 | 26 | /* Define States for Socket Message Receival */ 27 | #define SEARCHING_FOR_MESSAGE_START 0 28 | #define EXPECTING_MESSAGE_START 1 29 | #define ASSEMBLING_MESSAGE 2 30 | 31 | /* Define Buffer Size for Socket Receiving Buffer */ 32 | #define INBUFFERSIZE 100 33 | 34 | 35 | 36 | /**** From transport.h ****/ 37 | 38 | typedef struct { /******** description of message *********/ 39 | unsigned char type; /* message is of this type */ 40 | unsigned char mod; /* was created by this module id */ 41 | unsigned char instid; /* at this installation */ 42 | } MSG_LOGO; 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/network.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef NETWORK_H 3 | #define NETWORK_H 1 4 | 5 | extern int my_listen (char *port); 6 | extern int my_connect (char *host, char *port); 7 | extern int my_recv (int sock, char *buf, int buflen, int flags, 8 | int timeout_msecs); 9 | extern int my_send (int sock, char *buf, int buflen, int flags, 10 | int timeout_msecs); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/swap.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * swap.h taken from the Earthworm v6.2 distribution. 4 | */ 5 | 6 | #ifndef SWAP_H 7 | #define SWAP_H 8 | 9 | #include "ewdefs.h" 10 | #include "trace_buf.h" 11 | 12 | /* include file for swap.c: handy routines for swapping earthwormy things */ 13 | 14 | void SwapShort( short * ); /* swap.c sys-independent */ 15 | void SwapInt( int * ); /* swap.c sys-independent */ 16 | void SwapDouble( double * ); /* swap.c sys-independent */ 17 | void SwapFloat( float * ); /* swap.c sys-independent */ 18 | 19 | /* fixes wave message into local byte order, based on globals _SPARC and _INTEL */ 20 | int WaveMsgMakeLocal( TRACE_HEADER* ); 21 | int WaveMsg2MakeLocal( TRACE2_HEADER* ); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/trheadconv.c: -------------------------------------------------------------------------------- 1 | /* 2 | Function TrHeadConv(): 3 | Converts a structure of type TRACE_HEADER to a structure 4 | of type TRACE2_HEADER. The location code field in the 5 | TRACE2_HEADER is set to the null string, ie "--". 6 | Note that conversion occurs "in-place", so the original 7 | TRACE_HEADER is not saved. WMK 4/23/04 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | TRACE2_HEADER *TrHeadConv( TRACE_HEADER *th ) 14 | { 15 | TRACE2_HEADER *t2h = (TRACE2_HEADER *)th; 16 | 17 | t2h->chan[TRACE2_CHAN_LEN-1] = '\0'; /* Null-terminate channel field */ 18 | strcpy( t2h->loc, LOC_NULL_STRING ); 19 | t2h->version[0] = TRACE2_VERSION0; 20 | t2h->version[1] = TRACE2_VERSION1; 21 | return t2h; 22 | } 23 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/trheadconv.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TRHEADCONV_H 3 | #define TRHEADCONV_H 4 | #include 5 | 6 | /* Function prototype */ 7 | TRACE2_HEADER *TrHeadConv( TRACE_HEADER *th ); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /plugins/ewexport_pasv_plugin/util.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef UTIL_H 3 | #define UTIL_H 1 4 | 5 | extern int gen_log(int level, int verb, ... ); 6 | extern void safe_usleep (unsigned long int useconds); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(EWEXPORTPLUGIN_SOURCES 2 | ewexport_plugin.c 3 | network.c 4 | swap.c 5 | util.c 6 | trheadconv.c 7 | ../plugin.c 8 | ) 9 | 10 | INCLUDE_DIRECTORIES(.) 11 | INCLUDE_DIRECTORIES(..) 12 | 13 | SET(OPTIONS -D_REENTRANT) 14 | 15 | ADD_DEFINITIONS(${OPTIONS}) 16 | 17 | ADD_EXECUTABLE(ewexport_plugin ${EWEXPORTPLUGIN_SOURCES}) 18 | TARGET_LINK_LIBRARIES(ewexport_plugin pthread) 19 | 20 | INSTALL(TARGETS ewexport_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 21 | 22 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 23 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 24 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/ChangeLog: -------------------------------------------------------------------------------- 1 | 2009.040: 2 | - Update my_getaddrinfo() to fall back to the system getaddrinfo() 3 | so compiling is not limited to Solaris and Linux. 4 | - Add packet start time when printing details of TRACEBUF packets. 5 | - Increase maximum log message length from 100 to 200 bytes. 6 | - Convert usage of longs to ints so 64-bit build works, the program 7 | does not particularly benefit from being a 64-bit executable. 8 | - Many small typos. 9 | 10 | 2004.016: Apparently no change log until this point. 11 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -D_REENTRANT -O2 -Wall 3 | 4 | # For using another compiler (e.g. the Sun compiler) 5 | #CC = cc 6 | #CFLAGS = -O -I../libslink 7 | 8 | LDFLAGS = 9 | LDLIBS = -lpthread 10 | 11 | # For SunOS/Solaris uncomment the following line 12 | #LDLIBS = -lsocket -lnsl -lrt -lpthread 13 | 14 | BIN = ../../bin/ewexport_plugin 15 | 16 | OBJS = ewexport_plugin.o network.o util.o swap.o plugin.o 17 | 18 | all: $(BIN) 19 | 20 | $(BIN): $(OBJS) 21 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 22 | 23 | ewexport_plugin.o: ewexport_plugin.c 24 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 25 | 26 | network.o: network.c 27 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 28 | 29 | swap.o: swap.c 30 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 31 | 32 | util.o: util.c 33 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 34 | 35 | plugin.o: ../plugin.c 36 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 37 | 38 | clean: 39 | rm -f $(OBJS) $(BIN) 40 | 41 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/README: -------------------------------------------------------------------------------- 1 | 2 | ewexport_plugin: 3 | 4 | This is a SeedLink plugin that collects data from an Earthworm 5 | export_? process. Usually the export_scnl program is run on a host 6 | with access to the appropriate data; export_scnl is a version of 7 | export_generic that will only transfer waveform data. While 8 | ewexport_plugin will accept any Earthworm messages only waveform data 9 | will be processed. 10 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/descriptions/seedlink_ewexport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Earthworm export server (TCP/IP) 5 | 6 | 7 | 8 | Hostname or IP of the Earthworm export server. 9 | 10 | 11 | 12 | Port of the Earthworm export server. 13 | 14 | 15 | 16 | Name of the proc object (defined in streams.xml); used for processing 17 | raw streams (streams submitted by a plugin as raw samples). 18 | 19 | 20 | 21 | 22 | 23 | Text for heartbeat to server. 24 | 25 | 26 | 27 | 28 | Rate at which to expect heartbeats from server in seconds. 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/network.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef NETWORK_H 3 | #define NETWORK_H 1 4 | 5 | extern int my_connect (char *host, char *port); 6 | extern int my_recv (int sock, char *buf, int buflen, int flags, 7 | int timeout_msecs); 8 | extern int my_send (int sock, char *buf, int buflen, int flags, 9 | int timeout_msecs); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/swap.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * swap.h taken from the Earthworm v6.2 distribution. 4 | */ 5 | 6 | #ifndef SWAP_H 7 | #define SWAP_H 8 | 9 | #include "ewdefs.h" 10 | 11 | /* include file for swap.c: handy routines for swapping earthwormy things */ 12 | 13 | void SwapShort( short * ); /* swap.c sys-independent */ 14 | void SwapInt( int * ); /* swap.c sys-independent */ 15 | void SwapDouble( double * ); /* swap.c sys-independent */ 16 | void SwapFloat( float * ); /* swap.c sys-independent */ 17 | 18 | /* fixes wave message into local byte order, based on globals _SPARC and _INTEL */ 19 | int WaveMsgMakeLocal( TRACE_HEADER* ); 20 | int WaveMsg2MakeLocal( TRACE2_HEADER* ); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/trheadconv.c: -------------------------------------------------------------------------------- 1 | /* 2 | Function TrHeadConv(): 3 | Converts a structure of type TRACE_HEADER to a structure 4 | of type TRACE2_HEADER. The location code field in the 5 | TRACE2_HEADER is set to the null string, ie "--". 6 | Note that conversion occurs "in-place", so the original 7 | TRACE_HEADER is not saved. WMK 4/23/04 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | TRACE2_HEADER *TrHeadConv( TRACE_HEADER *th ) 14 | { 15 | TRACE2_HEADER *t2h = (TRACE2_HEADER *)th; 16 | 17 | t2h->chan[TRACE2_CHAN_LEN-1] = '\0'; /* Null-terminate channel field */ 18 | strcpy( t2h->loc, LOC_NULL_STRING ); 19 | t2h->version[0] = TRACE2_VERSION0; 20 | t2h->version[1] = TRACE2_VERSION1; 21 | return t2h; 22 | } 23 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/trheadconv.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TRHEADCONV_H 3 | #define TRHEADCONV_H 4 | #include 5 | 6 | /* Function prototype */ 7 | TRACE2_HEADER *TrHeadConv( TRACE_HEADER *th ); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /plugins/ewexport_plugin/util.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef UTIL_H 3 | #define UTIL_H 1 4 | 5 | extern int gen_log(int level, int verb, ... ); 6 | extern void safe_usleep (unsigned long int useconds); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /plugins/fs_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(FS_PLUGIN_SOURCES 2 | fs_plugin.cc 3 | fs_input_irae.cc 4 | fs_input_edr.cc 5 | fs_input_ddb.cc 6 | fs_decode_mseed.cc 7 | ) 8 | 9 | 10 | INCLUDE_DIRECTORIES(.) 11 | INCLUDE_DIRECTORIES(../../libs/plugin) 12 | INCLUDE_DIRECTORIES(../../libs/slutils) 13 | INCLUDE_DIRECTORIES(../../libs/3rd-party/libslink) 14 | 15 | 16 | SET(CONFIG_FILE ${CMAKE_INSTALL_PREFIX}/acquisition/config/plugins.ini) 17 | SET(OPTIONS -DSYSLOG_FACILITY=LOG_LOCAL0 -DCONFIG_FILE="${CONFIG_FILE}") 18 | 19 | ADD_DEFINITIONS(${OPTIONS}) 20 | 21 | ADD_EXECUTABLE(fs_plugin ${FS_PLUGIN_SOURCES}) 22 | 23 | TARGET_LINK_LIBRARIES( 24 | fs_plugin 25 | slink 26 | slplugin 27 | slutils 28 | ) 29 | 30 | INSTALL(TARGETS fs_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 31 | -------------------------------------------------------------------------------- /plugins/fs_plugin/read_titan.h: -------------------------------------------------------------------------------- 1 | /*====================================================================== 2 | read_titan.h 3 | 4 | Library for Titan to binary data converter 5 | 6 | Author: J.-F. Fels, OMP, Toulouse 7 | 8 | Modified for SeedLink: A. Heinloo, GFZ Potsdam 9 | 10 | *======================================================================*/ 11 | 12 | #ifndef READ_TITAN_H 13 | #define READ_TITAN_H 14 | 15 | #ifndef ANSI_C 16 | #define ANSI_C 17 | #include "hack_titan.h" 18 | #include "hack_proto.h" 19 | #undef ANSI_C 20 | #else 21 | #include "hack_titan.h" 22 | #include "hack_proto.h" 23 | #endif 24 | 25 | // extern FILE *Fp_err; /* file ptr to output SEED log file */ 26 | extern FILE *Fp_log; 27 | extern int inp_data[NCHAN][NCOMP][NINP]; /* Input data array */ 28 | extern struct Channel Channel[NCHAN]; 29 | extern outData OutData[NCHAN]; 30 | extern struct option opt; 31 | extern Paths db_paths; 32 | extern Event evn; 33 | extern struct acq acq; 34 | extern int totOutSamples; 35 | extern char Station[8]; 36 | extern char Network[3]; 37 | extern int byteswap; 38 | extern char tqf; /* Time quality factor */ 39 | extern int nodata; 40 | extern double SystTime; 41 | extern double Observ_dt; 42 | extern double ExtraTcorr; 43 | extern char netname[]; 44 | extern char seed_scalefactor[]; 45 | 46 | #endif // READ_TITAN_H 47 | 48 | -------------------------------------------------------------------------------- /plugins/gdrt_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_NAME GDRT) 2 | SET(APP_NAME gdrt_plugin) 3 | 4 | SET( 5 | GDRT_SOURCES 6 | main.cpp 7 | app.cpp 8 | ecef.cpp 9 | settings.cpp 10 | station.cpp 11 | udpclient.cpp 12 | ) 13 | 14 | INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) 15 | INCLUDE_DIRECTORIES(${LIBMSEED_INCLUDE_DIR}) 16 | INCLUDE_DIRECTORIES(../../libs/plugin) 17 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../../common/libs) 18 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../../common/libs) 19 | ADD_EXECUTABLE(gdrt_plugin ${GDRT_SOURCES}) 20 | FIND_PACKAGE(Boost REQUIRED COMPONENTS system) 21 | TARGET_LINK_LIBRARIES(${APP_NAME} ${Boost_system_LIBRARY} mseed slplugin) 22 | SC_LINK_LIBRARIES_INTERNAL(${APP_NAME} client) 23 | SC_ADD_VERSION(${PACKAGE_NAME} ${APP_NAME}) 24 | 25 | INSTALL(TARGETS ${APP_NAME} RUNTIME DESTINATION ${SC3_PACKAGE_SHARE_DIR}/plugins/seedlink) 26 | 27 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 28 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 29 | 30 | FILE(GLOB cfgs "${CMAKE_CURRENT_SOURCE_DIR}/config/*.cfg") 31 | INSTALL(FILES ${cfgs} DESTINATION ${SC3_PACKAGE_CONFIG_DIR}) 32 | 33 | -------------------------------------------------------------------------------- /plugins/gdrt_plugin/config/gdrt_plugin.cfg: -------------------------------------------------------------------------------- 1 | # UDP port for receiving GDRT messages. By default port 9999 will be used. 2 | plugins.gdrt.udpport = 9999 3 | 4 | # Location of station list file. 5 | plugins.gdrt.stationsFrom = stations.txt 6 | -------------------------------------------------------------------------------- /plugins/gdrt_plugin/main.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * (C) 2021 Helmholtz-Zentrum Potsdam - Deutsches GeoForschungsZentrum GFZ * 3 | * All rights reserved. * 4 | * * 5 | * This file may be used under the terms of the GNU Affero * 6 | * Public License version 3.0 as published by the Free Software Foundation * 7 | * and appearing in the file LICENSE included in the packaging of this * 8 | * file. Please review the following information to ensure the GNU Affero * 9 | * Public License version 3.0 requirements will be met: * 10 | * https://www.gnu.org/licenses/agpl-3.0.html. * 11 | ***************************************************************************/ 12 | 13 | #include "app.h" 14 | 15 | int main(int argc, char ** argv) { 16 | Seiscomp::Applications::GDRT::Application app(argc, argv); 17 | return app(); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /plugins/gdrt_plugin/settings.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * (C) 2021 Helmholtz-Zentrum Potsdam - Deutsches GeoForschungsZentrum GFZ * 3 | * All rights reserved. * 4 | * * 5 | * This file may be used under the terms of the GNU Affero * 6 | * Public License version 3.0 as published by the Free Software Foundation * 7 | * and appearing in the file LICENSE included in the packaging of this * 8 | * file. Please review the following information to ensure the GNU Affero * 9 | * Public License version 3.0 requirements will be met: * 10 | * https://www.gnu.org/licenses/agpl-3.0.html. * 11 | ***************************************************************************/ 12 | 13 | #include "settings.h" 14 | 15 | 16 | namespace Seiscomp { 17 | namespace Applications { 18 | namespace GDRT { 19 | 20 | 21 | Settings global; 22 | 23 | 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /plugins/lib330/libverbose.h: -------------------------------------------------------------------------------- 1 | /* Lib330 Status Dump Definitions 2 | Copyright 2006-2010 Certified Software Corporation 3 | 4 | This file is part of Lib330 5 | 6 | Lib330 is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | Lib330 is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with Lib330; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | Edit History: 21 | Ed Date By Changes 22 | -- ---------- --- --------------------------------------------------- 23 | 0 2006-10-01 rdr Created 24 | */ 25 | #ifndef libverbose_h 26 | /* Flag this file as included */ 27 | #define libverbose_h 28 | #define VER_LIBVERBOSE 6 29 | 30 | #ifndef libtypes_h 31 | #include "libtypes.h" 32 | #endif 33 | #ifndef libstrucs_h 34 | #include "libstrucs.h" 35 | #endif 36 | #ifndef q330types_h 37 | #include "q330types.h" 38 | #endif 39 | 40 | extern void log_all_info (pq330 q330) ; 41 | 42 | #ifndef OMIT_SEED 43 | extern longword print_generated_rectotals (pq330 q330) ; 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /plugins/lib330/makefile.nt: -------------------------------------------------------------------------------- 1 | !IF "$(EW_DEBUG)" == "1" 2 | !ELSE 3 | NODEBUG = 1 4 | !ENDIF 5 | 6 | !include 7 | 8 | CFLAGS = $(cflags) $(cdebug) $(cvarsmt) $(GLOBALFLAGS) \ 9 | /DX86_WIN32 /w24005 /w24047 /w24024 /w24048 /w24133 10 | 11 | L = $(EW_HOME)\$(EW_VERSION)\lib 12 | 13 | OBJS = \ 14 | libarchive.obj \ 15 | libclient.obj \ 16 | libcmds.obj \ 17 | libcompress.obj \ 18 | libcont.obj \ 19 | libctrldet.obj \ 20 | libcvrt.obj \ 21 | libdetect.obj \ 22 | libdss.obj \ 23 | libfilters.obj \ 24 | liblogs.obj \ 25 | libmd5.obj \ 26 | libmsgs.obj \ 27 | libnetserv.obj \ 28 | libopaque.obj \ 29 | libpoc.obj \ 30 | libsampcfg.obj \ 31 | libsample.obj \ 32 | libseed.obj \ 33 | libslider.obj \ 34 | libstats.obj \ 35 | libstrucs.obj \ 36 | libsupport.obj \ 37 | libtokens.obj \ 38 | libtypes.obj \ 39 | libverbose.obj \ 40 | q330cvrt.obj \ 41 | q330io.obj 42 | 43 | lib330.lib: $(OBJS) 44 | lib /nologo /OUT:$@ $(OBJS) 45 | 46 | 47 | # Clean-up rules 48 | clean: PHONY 49 | -del a.out core *.o *.obj *% *~ 50 | -del lib330.a lib330.lib 51 | 52 | PHONY: 53 | -------------------------------------------------------------------------------- /plugins/lib330/makefile.unix: -------------------------------------------------------------------------------- 1 | CFLAGS = $(GLOBALFLAGS) 2 | 3 | SRCS = libarchive.c libcvrt.c libnetserv.c libslider.c libverbose.c \ 4 | libclient.c libdetect.c libopaque.c libstats.c q330cvrt.c \ 5 | libcmds.c libfilters.c libpoc.c libstrucs.c q330io.c \ 6 | libcompress.c liblogs.c libsampcfg.c libsupport.c \ 7 | libcont.c libmd5.c libsample.c libtokens.c libdss.c \ 8 | libctrldet.c libmsgs.c libseed.c libtypes.c 9 | 10 | HDRS = libarchive.h libclient.h libcmds.h libcompress.h libcont.h libctrldet.h \ 11 | libcvrt.h libdetect.h libfilters.h liblogs.h libmd5.h libmsgs.h \ 12 | libnetserv.h libopaque.h libpoc.h libsampcfg.h libsampglob.h libdss.h \ 13 | libsample.h libseed.h libslider.h libstats.h libstrucs.h libsupport.h \ 14 | libtokens.h libtypes.h libverbose.h pascal.h platform.h q330cvrt.h \ 15 | q330io.h q330types.h 16 | 17 | OBJS = $(SRCS:%.c=%.o) 18 | 19 | .PRECIOUS: lib330.a 20 | lib330.a: lib330.a($(OBJS)) 21 | ranlib $@ 22 | 23 | 24 | # Clean-up rules 25 | clean: PHONY 26 | -$(RM) a.out core *.o *.obj *% *~ 27 | -$(RM) lib330.a lib330.lib 28 | 29 | PHONY: 30 | -------------------------------------------------------------------------------- /plugins/minilogger_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(MINILOGGER_PLUGIN_SOURCES 2 | mini_logger_writer.c 3 | mini_logger_writer.h 4 | minisepdevice.c 5 | minisepdevice.h 6 | settings/settings.c 7 | settings/settings.h 8 | settings/strmap.c 9 | settings/strmap.h 10 | ) 11 | 12 | INCLUDE_DIRECTORIES(../../libs/plugin ${LIBMSEED_INCLUDE_DIR}) 13 | ADD_EXECUTABLE(minilogger_plugin ${MINILOGGER_PLUGIN_SOURCES}) 14 | TARGET_LINK_LIBRARIES(minilogger_plugin rt slplugin ${LIBMSEED_LIBRARY}) 15 | INSTALL(TARGETS minilogger_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 16 | 17 | -------------------------------------------------------------------------------- /plugins/minilogger_plugin/mini_logger_writer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * mini_logger_writer.c 3 | * 4 | * Read serial data from a serial port and write 512-byte Mini-SEED data records in mseed files. 5 | * 6 | * Written by Anthony Lomax 7 | * ALomax Scientific www.alomax.net 8 | * 9 | * created: 2013.11.04 10 | ***************************************************************************/ 11 | 12 | 13 | #define VERSION "0.10" 14 | #define VERSION_DATE "2014.01.28" 15 | #define PACKAGE "mini_logger_writer" 16 | 17 | -------------------------------------------------------------------------------- /plugins/minilogger_plugin/minisepdevice.h: -------------------------------------------------------------------------------- 1 | /** ************************************************************************* 2 | * minisepdevice.h 3 | * 4 | * Interface for managing SEP seismometer over serial connection. 5 | * 6 | * Modified from: 7 | * device/minisepdevice.py 8 | * Jon Gilbert 27/01/2011 9 | * 10 | * Written by Anthony Lomax 11 | * ALomax Scientific www.alomax.net 12 | * 13 | * created: 2013.10.28 14 | ***************************************************************************/ 15 | 16 | // device settings for USB SEP 064 Seismometer Interface 17 | // SEP 064 16 bit data 18 | #define MIN_DATA -32768 19 | #define MAX_DATA 32767 20 | // a device with <= 32bit data 21 | //#define MIN_DATA -2147483648 22 | //#define MAX_DATA 2147483647 23 | // SEP 064 specific nominal sample rates 24 | #define SAMP_PER_SEC_20 20.032 25 | #define SAMP_PER_SEC_40 39.860 26 | #define SAMP_PER_SEC_80 79.719 27 | #define DT_MIN_EXPECTED (1.0 / SAMP_PER_SEC_80) 28 | 29 | #define TIMEOUT_SMALL 100000 // read timout in microseconds 30 | #define TIMEOUT_LARGE 1000000 31 | #define READ_ERROR LONG_MIN 32 | 33 | #define MSG_FLAG 0 34 | #define ERROR_FLAG 1 35 | 36 | int find_device(char* port_path_hint, int verbose, char** pport_path, int allow_set_interface_attribs); 37 | long read_next_value(hptime_t *phptime, long timeout); 38 | hptime_t current_utc_hptime(); 39 | int logprintf(int is_error, char *fmt, ...); 40 | void disconnect(int verbose); 41 | int set_seo064_sample_rate_and_gain(int nominal_sample_rate, int nominal_gain, long timeout, int verbose); 42 | -------------------------------------------------------------------------------- /plugins/minilogger_plugin/seismo_interface.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeisComP/seedlink/ea18b513c8969653a8fee91dd8e81a07f4356686/plugins/minilogger_plugin/seismo_interface.pdf -------------------------------------------------------------------------------- /plugins/minilogger_plugin/settings/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for picker test 2 | # 3 | # Invocation: 4 | # Solaris: make -f Make_picker_func_test 5 | # Linux: gmake -Rf Make_picker_func_test 6 | 7 | # IMPORTANT: change here to set the directory for binary executable files 8 | ifdef MYBIN 9 | BINDIR=${MYBIN} 10 | else 11 | # with the following, binary executables will be placed in bin subdirectory of your home directory 12 | #BINDIR=~/bin/ 13 | # if in doubt, use the following - binary executables will be placed in the current directory 14 | BINDIR=. 15 | endif 16 | 17 | INCLUDE_DIR=./ 18 | 19 | # Options specific for GCC 20 | ifndef CC 21 | CC = gcc 22 | endif 23 | # 24 | ifndef CCFLAGS 25 | # 26 | CCFLAGS_BASIC = -Wall -fPIC -I.. 27 | # 28 | # optimized 29 | CCFLAGS = -O3 $(CCFLAGS_BASIC) 30 | # 31 | # profile 32 | #CCFLAGS=-O3 -pg $(CCFLAGS_BASIC) 33 | # 34 | # debug - gdb, valgrind, ... 35 | #CCFLAGS = $(CCFLAGS_BASIC) -g 36 | # valgrind --leak-check=yes exe_name 37 | # valgrind --leak-check=full --show-reachable=yes exe_name exe_name 38 | endif 39 | 40 | 41 | OBJS=settings.o strmap.o 42 | 43 | all: $(OBJS) 44 | 45 | %.o : %.c 46 | $(CC) -c $(CCFLAGS) $< -o $@ 47 | 48 | 49 | clean : 50 | rm -f *.o 51 | 52 | 53 | -------------------------------------------------------------------------------- /plugins/mseedfifo_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(MSEEDFIFO_PLUGIN_SOURCES 2 | mseedfifo_plugin.c 3 | ../plugin.c 4 | ) 5 | 6 | INCLUDE_DIRECTORIES(.) 7 | INCLUDE_DIRECTORIES(..) 8 | INCLUDE_DIRECTORIES(../../libs/seiscomp/plugin) 9 | INCLUDE_DIRECTORIES(../../libs/3rd-party/libslink) 10 | 11 | 12 | SET(OPTIONS -DSYSLOG_FACILITY=LOG_LOCAL0) 13 | 14 | ADD_DEFINITIONS(${OPTIONS}) 15 | 16 | ADD_EXECUTABLE(mseedfifo_plugin ${MSEEDFIFO_PLUGIN_SOURCES}) 17 | TARGET_LINK_LIBRARIES(mseedfifo_plugin slink) 18 | 19 | INSTALL(TARGETS mseedfifo_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 20 | -------------------------------------------------------------------------------- /plugins/mseedfifo_plugin/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR = ../.. 2 | BINDIR = $(BASEDIR)/bin 3 | SLINKDIR = $(BASEDIR)/libslink 4 | SLINKLIB = $(SLINKDIR)/libslink.a 5 | 6 | OBJS = mseedfifo_plugin.o plugin.o 7 | 8 | CC = gcc 9 | CFLAGS = -Wall -O2 10 | LDFLAGS = 11 | LDLIBS = 12 | OPTIONS = -DSYSLOG_FACILITY=LOG_LOCAL0 13 | 14 | all: $(BINDIR)/mseedfifo_plugin 15 | 16 | .PHONY: all depend clean 17 | 18 | $(BINDIR)/mseedfifo_plugin: $(OBJS) $(SLINKLIB) 19 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 20 | 21 | mseedfifo_plugin.o: mseedfifo_plugin.c 22 | $(CC) $(CFLAGS) $(OPTIONS) -I$(SLINKDIR) -I.. -c $< -o $@ 23 | 24 | plugin.o: ../plugin.c 25 | $(CC) $(CFLAGS) -I.. -c $< -o $@ 26 | 27 | $(SLINKLIB): 28 | $(MAKE) -C $(SLINKDIR) 29 | 30 | depend: 31 | $(CC) $(OPTIONS) -I$(SLINKDIR) -I.. -MM *.c > .depend 32 | 33 | clean: 34 | $(RM) $(OBJS) .depend 35 | 36 | -include .depend 37 | 38 | -------------------------------------------------------------------------------- /plugins/mseedscan_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(MSEEDSCAN_PLUGIN_SOURCES 2 | mseedscan.c 3 | seedutil.c 4 | rbtree.c 5 | stack.c 6 | ) 7 | 8 | INCLUDE_DIRECTORIES(.) 9 | INCLUDE_DIRECTORIES(..) 10 | INCLUDE_DIRECTORIES(${SLPLUGINSDIR}) 11 | 12 | ADD_EXECUTABLE(mseedscan_plugin ${MSEEDSCAN_PLUGIN_SOURCES}) 13 | TARGET_LINK_LIBRARIES(mseedscan_plugin slplugin) 14 | 15 | INSTALL(TARGETS mseedscan_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 16 | -------------------------------------------------------------------------------- /plugins/mseedscan_plugin/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR = ../.. 2 | BINDIR = $(BASEDIR)/bin 3 | SLPLUGINSDIR = $(BASEDIR)/libslplugin 4 | SLPLUGINSLIB = $(SLPLUGINSDIR)/libslplugin.a 5 | 6 | OBJS = mseedscan.o seedutil.o rbtree.o stack.o 7 | 8 | CC = gcc 9 | CFLAGS = -Wall -O2 10 | INC = -I$(SLPLUGINSDIR) 11 | LDFLAGS = 12 | LDLIBS = 13 | 14 | # For Solaris 15 | # LDFLAGS = -lrt 16 | 17 | all: $(BINDIR)/mseedscan_plugin 18 | 19 | .PHONY: all depend clean 20 | 21 | $(BINDIR)/mseedscan_plugin: $(OBJS) $(SLPLUGINSLIB) 22 | $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(SLPLUGINSLIB) $(LDLIBS) -o $@ 23 | 24 | $(SLPLUGINSLIB): 25 | $(MAKE) -C $(SLPLUGINSDIR) 26 | 27 | depend: 28 | $(CC) $(INC) -MM *.c > .depend 29 | 30 | clean: 31 | $(RM) $(OBJS) .depend 32 | 33 | # Implicit rule for compiling source files 34 | %.o: %.c 35 | $(CC) $(CFLAGS) $(INC) -c $< 36 | 37 | -include .depend 38 | 39 | -------------------------------------------------------------------------------- /plugins/mseedscan_plugin/stack.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * stack.h 3 | * 4 | * Simple stack routines. 5 | * 6 | * The code base was originally written by Emin Marinian: 7 | * http://www.csua.berkeley.edu/~emin/index.html 8 | * 9 | * If STACK_DATA_TYPE is undefined then stack.h and stack.c will be 10 | * code for stacks of void *, if they are defined then they will be 11 | * stacks of the appropriate data_type. 12 | * 13 | * modified: 2004.230 14 | ***************************************************************************/ 15 | 16 | #ifndef STACK_H 17 | #define STACK_H 1 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #ifndef STACK_DATA_TYPE 24 | #define STACK_DATA_TYPE void * 25 | #endif 26 | 27 | typedef struct StackNode { 28 | STACK_DATA_TYPE data; 29 | struct StackNode * next; 30 | } StackNode; 31 | 32 | typedef struct Stack { 33 | StackNode * top; 34 | StackNode * tail; 35 | } Stack ; 36 | 37 | Stack * StackCreate (); 38 | void StackPush (Stack * theStack, STACK_DATA_TYPE newDataPtr); 39 | void * StackPop (Stack * theStack); 40 | void StackDestroy (Stack * theStack, void DestFunc(void * a)); 41 | int StackNotEmpty (Stack * theStack); 42 | Stack * StackJoin (Stack * stack1, Stack * stack2); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif /* STACK_H */ 49 | -------------------------------------------------------------------------------- /plugins/naqsplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(NAQSPLUGIN_SOURCES 2 | naqs_plugin.c 3 | naqs_utils.c 4 | plugin.c 5 | ) 6 | 7 | INCLUDE_DIRECTORIES(.) 8 | 9 | ADD_EXECUTABLE(naqs_plugin ${NAQSPLUGIN_SOURCES}) 10 | INSTALL(TARGETS naqs_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 11 | -------------------------------------------------------------------------------- /plugins/naqsplugin/ChangeLog: -------------------------------------------------------------------------------- 1 | 2006.11.6: version 2006.310 2 | - Check return value of send_raw_depoch() and exit(1) if data 3 | was not sent to seedlink. 4 | 5 | 2003.2.27: version 2003.057 6 | - Use the send_raw_depoch() plugin funcion. This interface 7 | was introduced in SeisComP-1.1.93.2003.048 with SeedLink 8 | version 2.93; it will not work in older code bases. 9 | - Remove all remaining dependence on qlib2, mostly done 10 | by stealing the swa8() function from qutils.c 11 | 12 | 2002.11.8: version 2002.312 13 | - Changed time conversion again. Now I believe that no leap 14 | seconds should be applied. Plus the previous changed resulted 15 | in a loss of time resolution (milliseconds). 16 | 17 | 2002.10.29: version 2002.302 18 | - Changed time conversion routine to the correct one that will 19 | apply leap seconds (routine from qlib2). Aaarrrggg, any data 20 | before this change was 21 seconds in the future. 21 | 22 | 2002.4.11 23 | - Changed log message printing to match the SeedLink log file 24 | format. 25 | 26 | 2002.3.22: version 2002.081 27 | - First version. Works pretty well and is pretty feature rich 28 | for an initial version. 29 | 30 | -------------------------------------------------------------------------------- /plugins/naqsplugin/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BASEDIR = ../.. 3 | 4 | CC=gcc 5 | CFLAGS = -Wall 6 | LDFLAGS = 7 | 8 | # For Solaris uncomment the following line 9 | #LDLIBS = -lsocket -lnsl 10 | 11 | INC = .. 12 | BIN = naqs_plugin 13 | BINDIR = ../../bin 14 | 15 | OBJECTS = naqs_utils.o plugin.o naqs_plugin.o 16 | 17 | $(BINDIR)/$(BIN): $(OBJECTS) 18 | $(CC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@ 19 | 20 | clean: 21 | $(RM) $(OBJECTS) 22 | -------------------------------------------------------------------------------- /plugins/naqsplugin/plugin.c: -------------------------------------------------------------------------------- 1 | ../plugin.c -------------------------------------------------------------------------------- /plugins/naqsplugin/plugin.h: -------------------------------------------------------------------------------- 1 | ../plugin.h -------------------------------------------------------------------------------- /plugins/optodas_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 2 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 3 | INSTALL(PROGRAMS optodas_plugin DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 4 | INSTALL(PROGRAMS optodas_inventory DESTINATION ${SC3_PACKAGE_BIN_DIR}) 5 | 6 | -------------------------------------------------------------------------------- /plugins/plugin.c: -------------------------------------------------------------------------------- 1 | ../libs//plugin/plugin.c -------------------------------------------------------------------------------- /plugins/plugin.h: -------------------------------------------------------------------------------- 1 | ../libs//plugin/plugin.h -------------------------------------------------------------------------------- /plugins/q330plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FIND_PACKAGE(Threads REQUIRED) 2 | 3 | SET(Q330PLUGIN_SOURCES 4 | q330_plugin.cc 5 | ) 6 | 7 | SET(Q330_INC ../lib330) 8 | AUX_SOURCE_DIRECTORY(../lib330 LIB330_SOURCES) 9 | 10 | INCLUDE_DIRECTORIES(.) 11 | INCLUDE_DIRECTORIES(..) 12 | INCLUDE_DIRECTORIES(../../libs/plugin) 13 | 14 | INCLUDE_DIRECTORIES(${Q330_INC}) 15 | 16 | SET(CONFIG_FILE ${SC3_PACKAGE_INSTALL_PREFIX}/acquisition/config/plugins.ini) 17 | 18 | SET(OPTIONS -DSYSLOG_FACILITY=LOG_LOCAL0 -DCONFIG_FILE="${CONFIG_FILE}") 19 | SET(PLATFORM -D_REENTRANT) 20 | IF(LINUX) 21 | SET(PLATFORM ${PLATFORM} -DLINUX -Dlinux) 22 | ENDIF(LINUX) 23 | 24 | ADD_DEFINITIONS(${OPTIONS} ${PLATFORM} -Wno-incompatible-pointer-types) 25 | 26 | 27 | ADD_EXECUTABLE(q330_plugin ${Q330PLUGIN_SOURCES} ${LIB330_SOURCES}) 28 | 29 | TARGET_LINK_LIBRARIES( 30 | q330_plugin 31 | slplugin 32 | slutils 33 | pthread 34 | ${CMAKE_THREAD_LIBS_INIT} 35 | ) 36 | 37 | INSTALL(TARGETS q330_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 38 | 39 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 40 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 41 | -------------------------------------------------------------------------------- /plugins/q330plugin/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR = ../.. 2 | BINDIR = $(BASEDIR)/bin 3 | SLUTILSDIR = $(BASEDIR)/libslutils 4 | SLUTILSLIB = $(SLUTILSDIR)/libslutils.a 5 | SLPLUGINSDIR = $(BASEDIR)/libslplugin 6 | SLPLUGINSLIB = $(SLPLUGINSDIR)/libslplugin.a 7 | Q330DIR = ../lib330 8 | Q330LIB = $(Q330DIR)/lib330.a 9 | 10 | CONFIG_DIR = /home/sysop/config 11 | CONFIG_FILE = $(CONFIG_DIR)/plugins.ini 12 | 13 | OBJS = q330_plugin.o 14 | 15 | CC = gcc 16 | CFLAGS = -O2 -D_REENTRANT 17 | CXX = g++ 18 | CXXFLAGS = -Wall -O2 -D_REENTRANT 19 | LDFLAGS = 20 | LDLIBS = -lpthread 21 | OPTIONS = -DSYSLOG_FACILITY=LOG_LOCAL0 -DCONFIG_FILE=\"$(CONFIG_FILE)\" 22 | 23 | all: $(BINDIR)/q330_plugin 24 | 25 | .PHONY: all depend clean 26 | 27 | $(BINDIR)/q330_plugin: $(OBJS) $(SLPLUGINSLIB) $(SLUTILSLIB) $(QLIB) $(Q330LIB) 28 | $(CXX) $(LDFLAGS) $+ $(LDLIBS) -o $@ 29 | 30 | q330_plugin.o: q330_plugin.cc 31 | $(CXX) $(CXXFLAGS) $(OPTIONS) -I$(SLPLUGINSDIR) -I$(SLUTILSDIR) \ 32 | -I$(Q330DIR) -c $< -o $@ 33 | 34 | $(SLUTILSLIB): 35 | $(MAKE) -C $(SLUTILSDIR) 36 | 37 | $(SLPLUGINSLIB): 38 | $(MAKE) -C $(SLPLUGINSDIR) 39 | 40 | $(Q330LIB): 41 | $(MAKE) -C $(Q330DIR) CC="$(CC)" CFLAGS="$(CFLAGS)" 42 | 43 | depend: 44 | $(CXX) $(OPTIONS) -I$(SLPLUGINSDIR) -I$(SLUTILSDIR) -I$(Q330DIR) \ 45 | -MM *.cc > .depend 46 | 47 | clean: 48 | $(RM) $(OBJS) .depend 49 | 50 | -include .depend 51 | 52 | -------------------------------------------------------------------------------- /plugins/reftek_libs/Makefile: -------------------------------------------------------------------------------- 1 | DIRS = archive msgq reftek rtp si util 2 | 3 | PLATFORM = -DLINUX -D_REENTRANT 4 | 5 | all: $(DIRS) 6 | 7 | .PHONY: $(DIRS) $(DIRS:%=clean_%) all clean 8 | 9 | clean: $(DIRS:%=clean_%) 10 | 11 | $(DIRS): 12 | $(MAKE) -C $@ PLATFORM="$(PLATFORM)" 13 | 14 | $(DIRS:%=clean_%): 15 | -$(MAKE) -C $(@:clean_%=%) clean 16 | 17 | -------------------------------------------------------------------------------- /plugins/reftek_libs/Makefile.reftek: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.reftek 165 2005-12-23 12:34:58Z andres $ 2 | # Make all libraries 3 | 4 | all: archive msgq reftek rtp si util 5 | 6 | archive: FORCE 7 | cd $@; $(MAKE) 8 | 9 | msgq: FORCE 10 | cd $@; $(MAKE) 11 | 12 | reftek: FORCE 13 | cd $@; $(MAKE) 14 | 15 | rtp: FORCE 16 | cd $@; $(MAKE) 17 | 18 | si: FORCE 19 | cd $@; $(MAKE) 20 | 21 | util: FORCE 22 | cd $@; $(MAKE) 23 | 24 | clean: FORCE 25 | cd archive; $(MAKE) $@ 26 | cd msgq; $(MAKE) $@ 27 | cd reftek; $(MAKE) $@ 28 | cd rtp; $(MAKE) $@ 29 | cd si; $(MAKE) $@ 30 | cd util; $(MAKE) $@ 31 | 32 | remove: FORCE 33 | cd archive; $(MAKE) $@ 34 | cd msgq; $(MAKE) $@ 35 | cd reftek; $(MAKE) $@ 36 | cd rtp; $(MAKE) $@ 37 | cd si; $(MAKE) $@ 38 | cd util; $(MAKE) $@ 39 | 40 | install: all 41 | 42 | FORCE: 43 | -------------------------------------------------------------------------------- /plugins/reftek_libs/archive/Makefile: -------------------------------------------------------------------------------- 1 | OBJS = 2 | OBJS += archive.o 3 | OBJS += create.o 4 | OBJS += errors.o 5 | OBJS += evnfiles.o 6 | OBJS += find.o 7 | OBJS += linklist.o 8 | OBJS += open.o 9 | OBJS += purge.o 10 | OBJS += rate.o 11 | OBJS += read.o 12 | OBJS += recfmt.o 13 | OBJS += serialize.o 14 | OBJS += state.o 15 | OBJS += streams.o 16 | OBJS += strlist.o 17 | OBJS += unix.o 18 | OBJS += write.o 19 | 20 | CC = gcc 21 | CFLAGS = -O2 22 | 23 | all: libarchive.a 24 | 25 | .PHONY: all clean 26 | 27 | libarchive.a: $(OBJS) 28 | ar -cr $@ $+ 29 | 30 | $(OBJS): %.o: %.c 31 | $(CC) $(CFLAGS) -I../include $(PLATFORM) -c $< -o $@ 32 | 33 | clean: 34 | $(RM) $(OBJS) libarchive.a 35 | 36 | -------------------------------------------------------------------------------- /plugins/reftek_libs/archive/win32.h: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: win32.h 165 2005-12-23 12:34:58Z andres $" 2 | /*--------------------------------------------------------------------- 3 | Win32 platform specific functions... 4 | 5 | 6 | -----------------------------------------------------------------------*/ 7 | 8 | #include "archive.h" 9 | 10 | /*---------------------------------------------------------------------*/ 11 | /* File I/O functions... */ 12 | /*---------------------------------------------------------------------*/ 13 | 14 | /*---------------------------------------------------------------------*/ 15 | 16 | /* Revision History 17 | * 18 | * $Log$ 19 | * Revision 1.2 2005/12/23 12:34:57 andres 20 | * upgrade to new version with Steim2 support 21 | * 22 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 23 | * Import existing sources into CVS 24 | * 25 | */ 26 | -------------------------------------------------------------------------------- /plugins/reftek_libs/include/rt461.h: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: rt461.h 165 2005-12-23 12:34:58Z andres $" 2 | #ifndef rt461_h_defined 3 | #define rt461_h_defined 4 | 5 | #define RT461_DEVICE_NAME "/dev/RT4610" 6 | 7 | #endif 8 | 9 | /* Revision History 10 | * 11 | * $Log$ 12 | * Revision 1.2 2005/12/23 12:34:57 andres 13 | * upgrade to new version with Steim2 support 14 | * 15 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 16 | * Import existing sources into CVS 17 | * 18 | */ 19 | -------------------------------------------------------------------------------- /plugins/reftek_libs/msgq/Makefile: -------------------------------------------------------------------------------- 1 | OBJS = msgq.o 2 | 3 | CC = gcc 4 | CFLAGS = -O2 5 | 6 | all: libmsgq.a 7 | 8 | .PHONY: all clean 9 | 10 | libmsgq.a: $(OBJS) 11 | ar -cr $@ $+ 12 | 13 | $(OBJS): %.o: %.c 14 | $(CC) $(CFLAGS) -I../include $(PLATFORM) -c $< -o $@ 15 | 16 | clean: 17 | $(RM) $(OBJS) libmsgq.a 18 | 19 | -------------------------------------------------------------------------------- /plugins/reftek_libs/msgq/Makefile.reftek: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.reftek 165 2005-12-23 12:34:58Z andres $ 2 | # Makefile for msgq library 3 | 4 | VPATH = 5 | RANLIB = ranlib 6 | LIBDIR = $(VPATH)../../../lib/$(PLATFORM) 7 | INCDIR = $(VPATH)../../include 8 | OPTMIZ = -g 9 | INCS = -I$(INCDIR) -I$(VPATH). 10 | DEFS = -D$(OSNAME) -D$(OSTYPE) -D_REENTRANT 11 | CFLAGS = $(OPTMIZ) $(INCS) $(DEFS) 12 | ARCHIVE = libmsgq.a 13 | OUTPUT = $(LIBDIR)/$(ARCHIVE) 14 | OBJS = $(OUTPUT)(msgq.o) 15 | 16 | .PRECIOUS : $(OUTPUT) 17 | 18 | all: OBJS/$(PLATFORM) $(LIBDIR) FORCE 19 | cd OBJS/$(PLATFORM); \ 20 | gmake -f ../../Makefile VPATH=../../ makestamp 21 | 22 | $(OUTPUT): makestamp 23 | 24 | makestamp: $(OBJS) 25 | $(RANLIB) $(OUTPUT) 26 | touch makestamp 27 | 28 | clean: FORCE 29 | rm -f OBJS/$(PLATFORM)/*.o 30 | 31 | remove: FORCE 32 | rm -f $(OUTPUT) OBJS/$(PLATFORM)/makestamp 33 | 34 | sccsinfo: FORCE 35 | sccs info 36 | 37 | install: all 38 | 39 | $(LIBDIR): 40 | mkdir -p $@ 41 | 42 | OBJS/$(PLATFORM): 43 | mkdir -p $@ 44 | 45 | FORCE: 46 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/Makefile: -------------------------------------------------------------------------------- 1 | OBJS = 2 | OBJS += ad.o 3 | OBJS += cd.o 4 | OBJS += ds.o 5 | OBJS += dt.o 6 | OBJS += eh.o 7 | OBJS += et.o 8 | OBJS += om.o 9 | OBJS += sh.o 10 | OBJS += sc.o 11 | OBJS += com.o 12 | OBJS += type.o 13 | OBJS += steim.o 14 | OBJS += string.o 15 | 16 | CC = gcc 17 | CFLAGS = -O2 18 | 19 | all: libreftek.a 20 | 21 | .PHONY: all clean 22 | 23 | libreftek.a: $(OBJS) 24 | ar -cr $@ $+ 25 | 26 | $(OBJS): %.o: %.c 27 | $(CC) $(CFLAGS) -I../include $(PLATFORM) -c $< -o $@ 28 | 29 | clean: 30 | $(RM) $(OBJS) libreftek.a 31 | 32 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/Makefile.reftek: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.reftek 165 2005-12-23 12:34:58Z andres $ 2 | # Makefile for reftek packet library 3 | 4 | VPATH = 5 | RANLIB = ranlib 6 | LIBDIR = $(VPATH)../../../lib/$(PLATFORM) 7 | INCDIR = $(VPATH)../../include 8 | OPTMIZ = -g 9 | INCS = -I$(INCDIR) -I$(VPATH). 10 | DEFS = -D$(OSNAME) -D$(OSTYPE) -D_REENTRANT 11 | CFLAGS = $(OPTMIZ) $(INCS) $(DEFS) 12 | ARCHIVE = libreftek.a 13 | OUTPUT = $(LIBDIR)/$(ARCHIVE) 14 | OBJS += $(OUTPUT)(ad.o) 15 | OBJS += $(OUTPUT)(cd.o) 16 | OBJS += $(OUTPUT)(ds.o) 17 | OBJS += $(OUTPUT)(dt.o) 18 | OBJS += $(OUTPUT)(eh.o) 19 | OBJS += $(OUTPUT)(et.o) 20 | OBJS += $(OUTPUT)(om.o) 21 | OBJS += $(OUTPUT)(sh.o) 22 | OBJS += $(OUTPUT)(sc.o) 23 | OBJS += $(OUTPUT)(com.o) 24 | OBJS += $(OUTPUT)(type.o) 25 | OBJS += $(OUTPUT)(steim.o) 26 | OBJS += $(OUTPUT)(string.o) 27 | 28 | .PRECIOUS : $(OUTPUT) 29 | 30 | all: OBJS/$(PLATFORM) $(LIBDIR) FORCE 31 | cd OBJS/$(PLATFORM); \ 32 | gmake -f ../../Makefile VPATH=../../ makestamp 33 | 34 | $(OUTPUT): makestamp 35 | 36 | makestamp: $(OBJS) 37 | $(RANLIB) $(OUTPUT) 38 | touch makestamp 39 | 40 | clean: FORCE 41 | rm -f OBJS/$(PLATFORM)/*.o 42 | 43 | remove: FORCE 44 | rm -f $(OUTPUT) OBJS/$(PLATFORM)/makestamp 45 | 46 | sccsinfo: FORCE 47 | sccs info 48 | 49 | install: all 50 | 51 | $(LIBDIR): 52 | mkdir -p $@ 53 | 54 | OBJS/$(PLATFORM): 55 | mkdir -p $@ 56 | 57 | FORCE: 58 | 59 | testlib: $(OUTPUT) testlib.c 60 | $(CC) $(CFLAGS) -L$(LIBDIR) -o OBJS/$(PLATFORM)/$@ testlib.c -lreftek -lrtp -lutil -lm 61 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/ad.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: ad.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Decode an AD packet 5 | * 6 | *====================================================================*/ 7 | #include "private.h" 8 | 9 | BOOL reftek_ad(struct reftek_ad *dest, UINT8 *src) 10 | { 11 | reftek_com(src, &dest->exp, &dest->unit, &dest->seqno, &dest->tstamp); 12 | return TRUE; 13 | } 14 | 15 | /* Revision History 16 | * 17 | * $Log$ 18 | * Revision 1.2 2005/12/23 12:34:57 andres 19 | * upgrade to new version with Steim2 support 20 | * 21 | * Revision 1.2 2002/01/18 17:55:55 nobody 22 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 23 | * changed interpretation of unit ID from BCD to binary 24 | * 25 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 26 | * Import existing sources into CVS 27 | * 28 | */ 29 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/cd.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: cd.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Decode a CD packet 5 | * 6 | *====================================================================*/ 7 | #include "private.h" 8 | 9 | BOOL reftek_cd(struct reftek_cd *dest, UINT8 *src) 10 | { 11 | reftek_com(src, &dest->exp, &dest->unit, &dest->seqno, &dest->tstamp); 12 | return TRUE; 13 | } 14 | 15 | /* Revision History 16 | * 17 | * $Log$ 18 | * Revision 1.2 2005/12/23 12:34:57 andres 19 | * upgrade to new version with Steim2 support 20 | * 21 | * Revision 1.2 2002/01/18 17:55:55 nobody 22 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 23 | * changed interpretation of unit ID from BCD to binary 24 | * 25 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 26 | * Import existing sources into CVS 27 | * 28 | */ 29 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/ds.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: ds.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Decode a DS packet 5 | * 6 | *====================================================================*/ 7 | #include "private.h" 8 | 9 | BOOL reftek_ds(struct reftek_ds *dest, UINT8 *src) 10 | { 11 | reftek_com(src, &dest->exp, &dest->unit, &dest->seqno, &dest->tstamp); 12 | return TRUE; 13 | } 14 | 15 | /* Revision History 16 | * 17 | * $Log$ 18 | * Revision 1.2 2005/12/23 12:34:57 andres 19 | * upgrade to new version with Steim2 support 20 | * 21 | * Revision 1.2 2002/01/18 17:55:56 nobody 22 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 23 | * changed interpretation of unit ID from BCD to binary 24 | * 25 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 26 | * Import existing sources into CVS 27 | * 28 | */ 29 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/om.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: om.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Decode a OM packet 5 | * 6 | *====================================================================*/ 7 | #include "private.h" 8 | 9 | BOOL reftek_om(struct reftek_om *dest, UINT8 *src) 10 | { 11 | reftek_com(src, &dest->exp, &dest->unit, &dest->seqno, &dest->tstamp); 12 | return TRUE; 13 | } 14 | 15 | /* Revision History 16 | * 17 | * $Log$ 18 | * Revision 1.2 2005/12/23 12:34:57 andres 19 | * upgrade to new version with Steim2 support 20 | * 21 | * Revision 1.2 2002/01/18 17:55:56 nobody 22 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 23 | * changed interpretation of unit ID from BCD to binary 24 | * 25 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 26 | * Import existing sources into CVS 27 | * 28 | */ 29 | -------------------------------------------------------------------------------- /plugins/reftek_libs/reftek/sh.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: sh.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Decode a SH packet 5 | * 6 | *====================================================================*/ 7 | #include "private.h" 8 | 9 | BOOL reftek_sh(struct reftek_sh *dest, UINT8 *src) 10 | { 11 | reftek_com(src, &dest->exp, &dest->unit, &dest->seqno, &dest->tstamp); 12 | return TRUE; 13 | } 14 | 15 | /* Revision History 16 | * 17 | * $Log$ 18 | * Revision 1.2 2005/12/23 12:34:57 andres 19 | * upgrade to new version with Steim2 support 20 | * 21 | * Revision 1.2 2002/01/18 17:55:57 nobody 22 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 23 | * changed interpretation of unit ID from BCD to binary 24 | * 25 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 26 | * Import existing sources into CVS 27 | * 28 | */ 29 | -------------------------------------------------------------------------------- /plugins/reftek_libs/rtp/Makefile: -------------------------------------------------------------------------------- 1 | OBJS = 2 | OBJS += accept.o 3 | OBJS += attr.o 4 | OBJS += close.o 5 | OBJS += cmdpkt.o 6 | OBJS += log.o 7 | OBJS += misc.o 8 | OBJS += open.o 9 | OBJS += pid.o 10 | OBJS += recv.o 11 | OBJS += send.o 12 | OBJS += server.o 13 | OBJS += soh.o 14 | OBJS += stat.o 15 | OBJS += version.o 16 | 17 | CC = gcc 18 | CFLAGS = -O2 19 | 20 | all: librtp.a 21 | 22 | .PHONY: all clean 23 | 24 | librtp.a: $(OBJS) 25 | ar -cr $@ $+ 26 | 27 | $(OBJS): %.o: %.c 28 | $(CC) $(CFLAGS) -I../include $(PLATFORM) -c $< -o $@ 29 | 30 | clean: 31 | $(RM) $(OBJS) librtp.a 32 | 33 | -------------------------------------------------------------------------------- /plugins/reftek_libs/rtp/Makefile.reftek: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.reftek 165 2005-12-23 12:34:58Z andres $ 2 | # Makefile for rtp library 3 | 4 | VPATH = 5 | RANLIB = ranlib 6 | LIBDIR = $(VPATH)../../../lib/$(PLATFORM) 7 | INCDIR = $(VPATH)../../include 8 | OPTMIZ = -g 9 | INCS = -I$(INCDIR) -I$(VPATH). 10 | DEFS = -D$(OSNAME) -D$(OSTYPE) 11 | CFLAGS = $(OPTMIZ) $(INCS) $(DEFS) -D_REENTRANT 12 | ARCHIVE = librtp.a 13 | OUTPUT = $(LIBDIR)/$(ARCHIVE) 14 | OBJS = 15 | OBJS += $(OUTPUT)(accept.o) 16 | OBJS += $(OUTPUT)(attr.o) 17 | OBJS += $(OUTPUT)(close.o) 18 | OBJS += $(OUTPUT)(cmdpkt.o) 19 | OBJS += $(OUTPUT)(log.o) 20 | OBJS += $(OUTPUT)(misc.o) 21 | OBJS += $(OUTPUT)(open.o) 22 | OBJS += $(OUTPUT)(pid.o) 23 | OBJS += $(OUTPUT)(recv.o) 24 | OBJS += $(OUTPUT)(send.o) 25 | OBJS += $(OUTPUT)(server.o) 26 | OBJS += $(OUTPUT)(soh.o) 27 | OBJS += $(OUTPUT)(stat.o) 28 | OBJS += $(OUTPUT)(version.o) 29 | 30 | .PRECIOUS : $(OUTPUT) 31 | 32 | all: OBJS/$(PLATFORM) $(LIBDIR) FORCE 33 | cd OBJS/$(PLATFORM); \ 34 | gmake -f ../../Makefile VPATH=../../ makestamp 35 | 36 | $(OUTPUT): makestamp 37 | 38 | makestamp: $(OBJS) 39 | $(RANLIB) $(OUTPUT) 40 | touch makestamp 41 | 42 | clean: FORCE 43 | rm -f OBJS/$(PLATFORM)/*.o 44 | 45 | remove: FORCE 46 | rm -f $(OUTPUT) OBJS/$(PLATFORM)/makestamp 47 | 48 | sccsinfo: FORCE 49 | sccs info 50 | 51 | install: all 52 | 53 | $(LIBDIR): 54 | mkdir -p $@ 55 | 56 | OBJS/$(PLATFORM): 57 | mkdir -p $@ 58 | 59 | FORCE: 60 | 61 | testlog: log.c 62 | $(CC) $(CFLAGS) -DDEBUG_TEST -o OBJS/$(BUILD)/$@ log.c 63 | -------------------------------------------------------------------------------- /plugins/reftek_libs/rtp/close.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: close.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Close a connection, and free all resources. 5 | * 6 | *====================================================================*/ 7 | #include "rtp.h" 8 | 9 | VOID rtp_close(RTP *rtp) 10 | { 11 | if (rtp == (RTP *) NULL) return; 12 | 13 | /* Shutdown the connection */ 14 | 15 | if (rtp->sd >= 0) { 16 | shutdown(rtp->sd, 2); 17 | #ifndef WINNT 18 | close(rtp->sd); 19 | #else 20 | closesocket(rtp->sd); 21 | #endif 22 | } 23 | 24 | /* Free resources */ 25 | 26 | if (rtp->soh.sh_nslot > 0) free(rtp->soh.sh_stat); 27 | free(rtp->peer); 28 | free(rtp); 29 | } 30 | 31 | /* Revision History 32 | * 33 | * $Log$ 34 | * Revision 1.2 2005/12/23 12:34:58 andres 35 | * upgrade to new version with Steim2 support 36 | * 37 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 38 | * Import existing sources into CVS 39 | * 40 | */ 41 | -------------------------------------------------------------------------------- /plugins/reftek_libs/rtp/pid.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: pid.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Send/receive process ID's 5 | * 6 | *====================================================================*/ 7 | #include "rtp.h" 8 | 9 | BOOL rtp_pid_decode(UINT8 *buf, INT32 *pid) 10 | { 11 | UINT32 ltmp; size_t llen = 4; 12 | static CHAR *fid = "rtp_pid_decode"; 13 | 14 | if (buf == (UINT8 *) NULL || pid == (INT32 *) NULL) { 15 | rtp_log(RTP_ERR, "%s: null input(s)", fid); 16 | return FALSE; 17 | } 18 | 19 | memcpy((void *) <mp, (void *) buf, llen); 20 | *pid = (INT32) ntohl((u_long) ltmp); 21 | 22 | return TRUE; 23 | } 24 | 25 | BOOL rtp_pid_send(RTP *rtp) 26 | { 27 | UINT32 ltmp; size_t llen = 4; 28 | UINT8 buf[4]; 29 | 30 | ltmp = (UINT32) htonl((u_long) getpid()); 31 | memcpy((void *) buf, (void *) <mp, llen); 32 | return rtp_send(rtp, buf, RTP_MSG_PID, llen); 33 | } 34 | 35 | /* Revision History 36 | * 37 | * $Log$ 38 | * Revision 1.2 2005/12/23 12:34:58 andres 39 | * upgrade to new version with Steim2 support 40 | * 41 | * Revision 1.2 2002/01/18 17:57:49 nobody 42 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 43 | * changed interpretation of unit ID from BCD to binary 44 | * 45 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 46 | * Import existing sources into CVS 47 | * 48 | */ 49 | -------------------------------------------------------------------------------- /plugins/reftek_libs/rtp/version.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: version.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * Send/receive protocol version numbers. 5 | * 6 | *====================================================================*/ 7 | #include "rtp.h" 8 | 9 | INT16 rtp_version_recv(RTP *rtp) 10 | { 11 | UINT16 type; 12 | INT32 zero = 0; 13 | 14 | if (!rtp_recv(rtp, (UINT8 *) NULL, &type, &zero)) return (INT16) -1; 15 | return (INT16) type; 16 | } 17 | 18 | BOOL rtp_version_send(RTP *rtp) 19 | { 20 | UINT16 type; 21 | 22 | type = (UINT16) RTP_VERSION; 23 | return rtp_send(rtp, (UINT8 *) NULL, type, 0); 24 | } 25 | 26 | /* Revision History 27 | * 28 | * $Log$ 29 | * Revision 1.2 2005/12/23 12:34:58 andres 30 | * upgrade to new version with Steim2 support 31 | * 32 | * Revision 1.2 2002/01/18 17:57:50 nobody 33 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 34 | * changed interpretation of unit ID from BCD to binary 35 | * 36 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 37 | * Import existing sources into CVS 38 | * 39 | */ 40 | -------------------------------------------------------------------------------- /plugins/reftek_libs/si/Makefile: -------------------------------------------------------------------------------- 1 | OBJS = si.o 2 | 3 | CC = gcc 4 | CFLAGS = -O2 5 | 6 | all: libsi.a 7 | 8 | .PHONY: all clean 9 | 10 | libsi.a: $(OBJS) 11 | ar -cr $@ $+ 12 | 13 | $(OBJS): %.o: %.c 14 | $(CC) $(CFLAGS) -I../include $(PLATFORM) -c $< -o $@ 15 | 16 | clean: 17 | $(RM) $(OBJS) libsi.a 18 | 19 | -------------------------------------------------------------------------------- /plugins/reftek_libs/si/Makefile.reftek: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.reftek 165 2005-12-23 12:34:58Z andres $ 2 | # Makefile for si library 3 | 4 | VPATH = 5 | RANLIB = ranlib 6 | LIBDIR = $(VPATH)../../../lib/$(PLATFORM) 7 | INCDIR = $(VPATH)../../include 8 | OPTMIZ = -g 9 | INCS = -I$(INCDIR) -I$(VPATH). 10 | DEFS = -D$(OSNAME) -D$(OSTYPE) -D_REENTRANT 11 | CFLAGS = $(OPTMIZ) $(INCS) $(DEFS) 12 | ARCHIVE = libsi.a 13 | OUTPUT = $(LIBDIR)/$(ARCHIVE) 14 | OBJS = $(OUTPUT)(si.o) 15 | 16 | .PRECIOUS : $(OUTPUT) 17 | 18 | all: OBJS/$(PLATFORM) $(LIBDIR) FORCE 19 | cd OBJS/$(PLATFORM); \ 20 | gmake -f ../../Makefile VPATH=../../ makestamp 21 | 22 | $(OUTPUT): makestamp 23 | 24 | makestamp: $(OBJS) 25 | $(RANLIB) $(OUTPUT) 26 | touch makestamp 27 | 28 | clean: FORCE 29 | rm -f OBJS/$(PLATFORM)/*.o 30 | 31 | remove: FORCE 32 | rm -f $(OUTPUT) OBJS/$(PLATFORM)/makestamp 33 | 34 | sccsinfo: FORCE 35 | sccs info 36 | 37 | install: all 38 | 39 | $(LIBDIR): 40 | mkdir -p $@ 41 | 42 | OBJS/$(PLATFORM): 43 | mkdir -p $@ 44 | 45 | FORCE: 46 | -------------------------------------------------------------------------------- /plugins/reftek_libs/util/Makefile: -------------------------------------------------------------------------------- 1 | OBJS = 2 | OBJS += bcd2long.o 3 | OBJS += dump.o 4 | OBJS += getline.o 5 | OBJS += find.o 6 | OBJS += mstime.o 7 | OBJS += parse.o 8 | OBJS += string.o 9 | OBJS += swap.o 10 | OBJS += timer.o 11 | OBJS += timefunc.o 12 | 13 | CC = gcc 14 | CFLAGS = -O2 15 | 16 | all: libutil.a 17 | 18 | .PHONY: all clean 19 | 20 | libutil.a: $(OBJS) 21 | ar -cr $@ $+ 22 | 23 | $(OBJS): %.o: %.c 24 | $(CC) $(CFLAGS) -I../include $(PLATFORM) -c $< -o $@ 25 | 26 | clean: 27 | $(RM) $(OBJS) libutil.a 28 | 29 | -------------------------------------------------------------------------------- /plugins/reftek_libs/util/Makefile.reftek: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.reftek 165 2005-12-23 12:34:58Z andres $ 2 | # Makefile for util library 3 | 4 | VPATH = 5 | RANLIB = ranlib 6 | LIBDIR = $(VPATH)../../../lib/$(PLATFORM) 7 | INCDIR = $(VPATH)../../include 8 | OPTMIZ = -g 9 | INCS = -I$(INCDIR) -I$(VPATH). 10 | DEFS = -D$(OSNAME) -D$(OSTYPE) -D_REENTRANT 11 | CFLAGS = $(OPTMIZ) $(INCS) $(DEFS) 12 | ARCHIVE = libutil.a 13 | OUTPUT = $(LIBDIR)/$(ARCHIVE) 14 | OBJS = $(OUTPUT)(bcd2long.o) 15 | OBJS += $(OUTPUT)(dump.o) 16 | OBJS += $(OUTPUT)(getline.o) 17 | OBJS += $(OUTPUT)(find.o) 18 | OBJS += $(OUTPUT)(mstime.o) 19 | OBJS += $(OUTPUT)(parse.o) 20 | OBJS += $(OUTPUT)(string.o) 21 | OBJS += $(OUTPUT)(swap.o) 22 | OBJS += $(OUTPUT)(timer.o) 23 | OBJS += $(OUTPUT)(timefunc.o) 24 | 25 | .PRECIOUS : $(OUTPUT) 26 | 27 | all: OBJS/$(PLATFORM) $(LIBDIR) FORCE 28 | cd OBJS/$(PLATFORM); \ 29 | gmake -f ../../Makefile VPATH=../../ makestamp 30 | 31 | $(OUTPUT): makestamp 32 | 33 | makestamp: $(OBJS) 34 | $(RANLIB) $(OUTPUT) 35 | touch makestamp 36 | 37 | clean: FORCE 38 | rm -f OBJS/$(PLATFORM)/*.o 39 | 40 | remove: FORCE 41 | rm -f $(OUTPUT) OBJS/$(PLATFORM)/makestamp 42 | 43 | sccsinfo: FORCE 44 | sccs info 45 | 46 | install: all 47 | 48 | $(LIBDIR): 49 | mkdir -p $@ 50 | 51 | OBJS/$(PLATFORM): 52 | mkdir -p $@ 53 | 54 | FORCE: 55 | 56 | testfind: find.c 57 | $(CC) $(CFLAGS) -DDEBUG_TEST -o OBJS/$(PLATFORM)/$@ find.c -L$(LIBDIR) -lutil 58 | 59 | testmstime: mstime.c 60 | $(CC) $(CFLAGS) -DDEBUG_TEST -o OBJS/$(PLATFORM)/$@ mstime.c -L$(LIBDIR) -lutil -lm 61 | -------------------------------------------------------------------------------- /plugins/reftek_libs/util/bcd2long.c: -------------------------------------------------------------------------------- 1 | #pragma ident "$Id: bcd2long.c 165 2005-12-23 12:34:58Z andres $" 2 | /*====================================================================== 3 | * 4 | * convert from BCD to a UINT32 5 | * 6 | * Modified from Bruce Crawford's bcd2int function. 7 | * 8 | *====================================================================*/ 9 | #include "util.h" 10 | 11 | UINT32 utilBcdToUint32(UINT8 *input, UINT16 numDigits, UINT16 nibble) 12 | { 13 | int digit, decimal, sum; 14 | 15 | sum = 0; 16 | 17 | for (digit = 0 ; digit < numDigits; digit++) 18 | { 19 | if (nibble) 20 | decimal = *input & 0xF; 21 | else 22 | decimal = ((int) (*input & 0xF0)) >> 4; 23 | 24 | sum = sum * 10 + decimal; 25 | 26 | if (nibble) 27 | input++; 28 | 29 | nibble = ! nibble; 30 | } 31 | 32 | return (sum); 33 | } 34 | 35 | /* Revision History 36 | * 37 | * $Log$ 38 | * Revision 1.2 2005/12/23 12:34:58 andres 39 | * upgrade to new version with Steim2 support 40 | * 41 | * Revision 1.2 2002/01/18 17:51:44 nobody 42 | * replaced WORD, BYTE, LONG, etc macros with size specific equivalents 43 | * 44 | * Revision 1.1.1.1 2000/06/22 19:13:09 nobody 45 | * Import existing sources into CVS 46 | * 47 | */ 48 | -------------------------------------------------------------------------------- /plugins/scream2_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SCREAM2PLUGIN_SOURCES 2 | dispatch_ring.c 3 | gcf.c 4 | gputil.c 5 | main.c 6 | map.c 7 | mapping.c 8 | scream.c 9 | util.c 10 | ../plugin.c 11 | ) 12 | 13 | INCLUDE_DIRECTORIES(.) 14 | INCLUDE_DIRECTORIES(..) 15 | 16 | ADD_EXECUTABLE(scream_plugin_ring ${SCREAM2PLUGIN_SOURCES}) 17 | TARGET_LINK_LIBRARIES(scream_plugin_ring m pthread) 18 | 19 | INSTALL(TARGETS scream_plugin_ring RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 20 | 21 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 22 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 23 | -------------------------------------------------------------------------------- /plugins/scream2_plugin/dispatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dispatch.h: 3 | * 4 | * Copyright (c) 2003 Guralp Systems Limited 5 | * Author James McKenzie, contact 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | * 21 | */ 22 | 23 | /* 24 | * $Id: dispatch.h 2 2005-07-26 19:28:46Z andres $ 25 | */ 26 | 27 | /* 28 | * $Log$ 29 | * Revision 1.1 2005/07/26 19:28:53 andres 30 | * Initial revision 31 | * 32 | * Revision 1.1 2003/03/27 18:07:18 alex 33 | * Initial revision 34 | * 35 | * Revision 1.4 2003/02/19 16:00:18 root 36 | * # 37 | * 38 | */ 39 | 40 | #ifndef __DISPATCH_H__ 41 | #define __DISPATCH_H__ 42 | 43 | extern void dispatch (gcf_block b, int recno); 44 | #endif /* __DISPATCH_H__ */ 45 | -------------------------------------------------------------------------------- /plugins/scream2_plugin/map.h: -------------------------------------------------------------------------------- 1 | typedef struct map_struct 2 | { 3 | struct map_struct *next; 4 | char *sysid; 5 | char *stream; 6 | char *network; 7 | char *station; 8 | char *channel; 9 | int id; 10 | } 11 | Map; 12 | 13 | -------------------------------------------------------------------------------- /plugins/scream_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SCREAMPLUGIN_SOURCES 2 | dispatch.c 3 | gcf.c 4 | gputil.c 5 | main.c 6 | map.c 7 | scream.c 8 | util.c 9 | ../plugin.c 10 | ) 11 | 12 | INCLUDE_DIRECTORIES(.) 13 | INCLUDE_DIRECTORIES(..) 14 | 15 | ADD_EXECUTABLE(scream_plugin ${SCREAMPLUGIN_SOURCES}) 16 | TARGET_LINK_LIBRARIES(scream_plugin m) 17 | 18 | INSTALL(TARGETS scream_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 19 | 20 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 21 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 22 | -------------------------------------------------------------------------------- /plugins/scream_plugin/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -O2 -Wall 3 | LDFLAGS = 4 | LDLIBS = -lm 5 | 6 | # For Solaris uncomment the following line 7 | #LDLIBS = -lsocket -lnsl -lm 8 | 9 | BIN = ../../bin/scream_plugin 10 | 11 | OBJECTS = dispatch.o gcf.o gputil.o main.o scream.o util.o plugin.o 12 | 13 | $(BIN): $(OBJECTS) 14 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 15 | 16 | dispatch.o: dispatch.c 17 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 18 | 19 | gcf.o: gcf.c 20 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 21 | 22 | gputil.o: gputil.c 23 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 24 | 25 | main.o: main.c 26 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 27 | 28 | scream.o: scream.c 29 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 30 | 31 | util.o: util.c 32 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 33 | 34 | plugin.o: ../plugin.c 35 | $(CC) -c $(CFLAGS) -I.. -c $< -o $@ 36 | 37 | clean: 38 | $(RM) $(OBJECTS) 39 | 40 | -------------------------------------------------------------------------------- /plugins/scream_plugin/dispatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dispatch.h: 3 | * 4 | * Copyright (c) 2003 Guralp Systems Limited 5 | * Author James McKenzie, contact 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | * 21 | */ 22 | 23 | /* 24 | * $Id: dispatch.h 2 2005-07-26 19:28:46Z andres $ 25 | */ 26 | 27 | /* 28 | * $Log$ 29 | * Revision 1.1 2005/07/26 19:28:53 andres 30 | * Initial revision 31 | * 32 | * Revision 1.1 2003/03/27 18:07:18 alex 33 | * Initial revision 34 | * 35 | * Revision 1.4 2003/02/19 16:00:18 root 36 | * # 37 | * 38 | */ 39 | 40 | #ifndef __DISPATCH_H__ 41 | #define __DISPATCH_H__ 42 | 43 | extern void dispatch (gcf_block b, int recno); 44 | #endif /* __DISPATCH_H__ */ 45 | -------------------------------------------------------------------------------- /plugins/scream_plugin/map.h: -------------------------------------------------------------------------------- 1 | typedef struct map_struct 2 | { 3 | struct map_struct *next; 4 | char *sysid; 5 | char *stream; 6 | char *network; 7 | char *station; 8 | char *channel; 9 | int id; 10 | } 11 | Map; 12 | 13 | -------------------------------------------------------------------------------- /plugins/serial_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CHECK_FUNCTION_EXISTS(cfmakeraw HAVE_CFMAKERAW) 2 | IF(HAVE_CFMAKERAW) 3 | MESSAGE(STATUS "Found function cfmakeraw") 4 | ADD_DEFINITIONS(-DHAVE_CFMAKERAW) 5 | ENDIF(HAVE_CFMAKERAW) 6 | 7 | SET(SERIALPLUGIN_SOURCES 8 | serial_plugin.cc 9 | rw2300.c 10 | linux2300.c 11 | proto_dr24.cc 12 | proto_edata.cc 13 | proto_edata2.cc 14 | proto_hrd24.cc 15 | proto_mws.cc 16 | proto_prema.cc 17 | proto_sadc.cc 18 | proto_solar.cc 19 | proto_vaisala.cc 20 | proto_ws2300.cc 21 | proto_modbus.cc 22 | proto_miscString.cc 23 | proto_miscSerial.cc 24 | proto_miscScript.cc 25 | proto_gmeteo.cc 26 | proto_maram.cc 27 | ) 28 | 29 | INCLUDE_DIRECTORIES(../../libs/plugin) 30 | INCLUDE_DIRECTORIES(../../libs/slutils) 31 | 32 | SET(CONFIG_FILE ${SC3_PACKAGE_INSTALL_PREFIX}/acquisition/config/plugins.ini) 33 | 34 | SET(OPTIONS -DSYSLOG_FACILITY=LOG_LOCAL0 -DCONFIG_FILE="${CONFIG_FILE}") 35 | SET(WSOPTIONS -DVERSION="1.10") 36 | 37 | ADD_DEFINITIONS(${OPTIONS} ${WSOPTIONS}) 38 | 39 | ADD_EXECUTABLE(serial_plugin ${SERIALPLUGIN_SOURCES}) 40 | 41 | TARGET_LINK_LIBRARIES( 42 | serial_plugin 43 | slplugin 44 | slutils 45 | pthread 46 | ) 47 | 48 | INSTALL(TARGETS serial_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 49 | 50 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 51 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 52 | -------------------------------------------------------------------------------- /plugins/serial_plugin/linux2300.h: -------------------------------------------------------------------------------- 1 | /* Include file for the open2300 Linux specific functions 2 | */ 3 | 4 | #ifndef _INCLUDE_LINUX2300_H_ 5 | #define _INCLUDE_LINUX2300_H_ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #define BAUDRATE B2400 16 | #define DEFAULT_SERIAL_DEVICE "/dev/ttyS0" 17 | typedef int WEATHERSTATION; 18 | 19 | #endif /* _INCLUDE_LINUX2300_H_ */ 20 | 21 | -------------------------------------------------------------------------------- /plugins/sockplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SOCKPLUGIN_SOURCES 2 | seedutils.c 3 | sock_plugin.c 4 | ../plugin.c 5 | ) 6 | 7 | INCLUDE_DIRECTORIES(.) 8 | INCLUDE_DIRECTORIES(..) 9 | 10 | ADD_EXECUTABLE(sock_plugin ${SOCKPLUGIN_SOURCES}) 11 | TARGET_LINK_LIBRARIES(sock_plugin m) 12 | 13 | INSTALL(TARGETS sock_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 14 | -------------------------------------------------------------------------------- /plugins/sockplugin/Makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CFLAGS = -Wall -O2 3 | LDFLAGS = 4 | 5 | # For Solaris uncomment the following line 6 | #LDLIBS = -lsocket -lnsl 7 | 8 | INC = .. 9 | 10 | BINDIR = ../../bin 11 | 12 | all: $(BINDIR)/sock_plugin 13 | 14 | $(BINDIR)/sock_plugin: sock_plugin.o seedutils.o plugin.o 15 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 16 | 17 | sock_plugin.o: sock_plugin.c 18 | $(CC) -c $(CFLAGS) -I$(INC) -c $< -o $@ 19 | 20 | seedutils.o: seedutils.c 21 | $(CC) -c $(CFLAGS) -I$(INC) -c $< -o $@ 22 | 23 | plugin.o: ../plugin.c 24 | $(CC) -c $(CFLAGS) -I$(INC) -c $< -o $@ 25 | 26 | clean: 27 | $(RM) sock_plugin.o seedutils.o plugin.o 28 | -------------------------------------------------------------------------------- /plugins/sockplugin/README: -------------------------------------------------------------------------------- 1 | 2 | sock_plugin: 3 | 4 | A SeedLink plugin that will connect to a TCP socket, collect 512-byte 5 | Mini-SEED records, and pass them on to the SeedLink daemon. 6 | 7 | The plugin will search the record for a 1000 blockette and use it to 8 | verify a 512-byte record length. The packet will be dropped if no 1000 9 | blockette is found or if the record size is not 512 bytes. 10 | 11 | The network code in the Mini-SEED records can be changed using the 12 | '-n' command line option. The change is done after matching (if the 13 | '-m' option is used). 14 | 15 | To compile for the Solaris environment the LDLIBS variable in the Makefile 16 | must include '-lsocket' and '-lnsl'. These are not necessary and should 17 | be commented out for a Linux environment. 18 | 19 | For testing it is recommended that you use the verbose flag twice "-vv", 20 | then sock_plugin will report on each packet that is received from the 21 | remote host. 22 | 23 | -------------------------------------------------------------------------------- /plugins/wave24_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(WAVE24PLUGIN_SOURCES 2 | Wave24Drv.cpp 3 | Wave24Logger.cpp 4 | Wave24Messages.cpp 5 | Wave24Seed.cpp 6 | ../plugin.c 7 | ) 8 | 9 | INCLUDE_DIRECTORIES(.) 10 | INCLUDE_DIRECTORIES(..) 11 | 12 | IF(CMAKE_COMPILER_IS_GNUCXX) 13 | SET(CMAKE_CXX_FLAGS "-fno-strict-aliasing") 14 | ENDIF(CMAKE_COMPILER_IS_GNUCXX) 15 | 16 | ADD_EXECUTABLE(wave24_plugin ${WAVE24PLUGIN_SOURCES}) 17 | TARGET_LINK_LIBRARIES(wave24_plugin m) 18 | 19 | INSTALL(TARGETS wave24_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 20 | -------------------------------------------------------------------------------- /plugins/wave24_plugin/Wave24Exception.h: -------------------------------------------------------------------------------- 1 | #ifndef _WAVE24EXCEPTION 2 | #define _WAVE24EXCEPTION 3 | 4 | class Wave24Exception { 5 | private: 6 | char message[1024]; 7 | bool canRun; 8 | 9 | public: 10 | Wave24Exception(char *message,bool canRun) { 11 | strncpy(this->message,message,1024); 12 | this->canRun=canRun; 13 | } 14 | Wave24Exception(bool canRun) { 15 | strcpy(this->message,"Unknown reason"); 16 | this->canRun=canRun; 17 | } 18 | Wave24Exception() { 19 | strcpy(this->message,"Unknown reason"); 20 | this->canRun=false; 21 | } 22 | char* describe() { 23 | return message; 24 | } 25 | bool canContinue() { 26 | return canRun; 27 | } 28 | }; 29 | 30 | #endif 31 | 32 | 33 | -------------------------------------------------------------------------------- /plugins/wave24_plugin/Wave24Logger.h: -------------------------------------------------------------------------------- 1 | #ifndef _WAVE24LOGGER 2 | #define _WAVE24LOGGER 3 | 4 | class Wave24Logger { 5 | public: 6 | Wave24Logger(char *logpath); 7 | Wave24Logger(); 8 | void log(char type,char *message); 9 | void log(char type,char *message,int loglevel); 10 | int setLevel(int newLevel); 11 | int getLevel(); 12 | bool wouldLog(int loglevel); 13 | static const int VERBOSE_NONE=0; 14 | static const int VERBOSE_VERBOSE=1; 15 | static const int VERBOSE_DEBUG=2; 16 | static const int VERBOSE_VERYDEBUG=3; 17 | static const int VERBOSE_LEVEL_DFLT=0; 18 | static void stdlog(char type,char *message); 19 | static void stdlog(char type,char *message,int loglevel); 20 | private: 21 | FILE *logfile; 22 | int level; 23 | }; 24 | 25 | #endif 26 | 27 | 28 | -------------------------------------------------------------------------------- /plugins/wave24_plugin/Wave24Seed.h: -------------------------------------------------------------------------------- 1 | #ifndef _WAVE24SEED 2 | #define _WAVE24SEED 3 | 4 | class WaveSeed { 5 | public: 6 | static int decodeSteim(char *record,int32_t* samples); 7 | static int getFirstTime(char *record,struct ptime *firstTime); 8 | static int clockOk(char *record); 9 | static const int GPS_NOT_LOCKED=0x01; 10 | static const int QUESTIONABLE_TIME_TAG=0x02; 11 | private: 12 | static int32_t getInt32(char *pos); 13 | static int32_t getNibble(int32_t nibble,int pos); 14 | static int32_t getDNibble(int32_t value); 15 | static int32_t getOne(int32_t value); 16 | static int32_t getTwo(int32_t value,int pos); 17 | static int32_t getThree(int32_t value,int pos); 18 | static int32_t getFour(int32_t value,int pos); 19 | static int32_t getFive(int32_t value,int pos); 20 | static int32_t getSix(int32_t value,int pos); 21 | static int32_t getSeven(int32_t value,int pos); 22 | static const int NODATA=0; 23 | static const int FOUR=1; 24 | static const int DNIB1=2; 25 | static const int DNIB2=3; 26 | static const int DNIB1_ONE=1; 27 | static const int DNIB1_TWO=2; 28 | static const int DNIB1_THREE=3; 29 | static const int DNIB2_FIVE=0; 30 | static const int DNIB2_SIX=1; 31 | static const int DNIB2_SEVEN=2; 32 | }; 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /plugins/wave24_plugin/makefile: -------------------------------------------------------------------------------- 1 | INCDIR=$(DEVELDIR) 2 | 3 | BINNAME=../../bin/wave24_plugin 4 | 5 | PLUGINDIR=.. 6 | 7 | COMPILER=g++ 8 | CFLAGS=-O2 -fno-strict-aliasing 9 | .SUFFIXES: .o .cpp 10 | 11 | LINKER=g++ 12 | LDFLAGS= 13 | LDLIBS= 14 | 15 | RM=rm -v 16 | 17 | HEADERS= Wave24Logger.h Wave24Messages.h Wave24Seed.h Wave24Exception.h 18 | 19 | OBJS= Wave24Drv.o Wave24Logger.o Wave24Messages.o Wave24Seed.o plugin.o 20 | 21 | all: $(BINNAME) 22 | 23 | $(BINNAME): $(OBJS) 24 | $(LINKER) $(LDFLAGS) $+ $(LDLIBS) -o $@ 25 | 26 | .cpp.o: 27 | $(COMPILER) $(CFLAGS) -I$(PLUGINDIR) -c $< -o $@ 28 | 29 | #lets make plugin.o 30 | plugin.o:$(PLUGINDIR)/plugin.c $(PLUGINDIR)/plugin.h 31 | $(COMPILER) $(CFLAGS) -I$(PLUGINDIR) -c $< -o $@ 32 | 33 | clean: 34 | $(RM) $(OBJS) 35 | 36 | -------------------------------------------------------------------------------- /plugins/win_plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(WINPLUGIN_SOURCES 2 | win_plugin.c 3 | ../plugin.c 4 | ) 5 | 6 | INCLUDE_DIRECTORIES(.) 7 | INCLUDE_DIRECTORIES(..) 8 | 9 | ADD_EXECUTABLE(win_plugin ${WINPLUGIN_SOURCES}) 10 | INSTALL(TARGETS win_plugin RUNTIME DESTINATION ${SEEDLINK_PLUGIN_OUTPUT_DIR}) 11 | 12 | FILE(GLOB descs "${CMAKE_CURRENT_SOURCE_DIR}/descriptions/*.xml") 13 | INSTALL(FILES ${descs} DESTINATION ${SC3_PACKAGE_APP_DESC_DIR}) 14 | -------------------------------------------------------------------------------- /plugins/win_plugin/Makefile: -------------------------------------------------------------------------------- 1 | BINDIR = ../../bin 2 | 3 | OBJS = win_plugin.o plugin.o 4 | 5 | CC = gcc 6 | CFLAGS = -Wall -O2 7 | LDFLAGS = 8 | LDLIBS = 9 | DEFS = -DSYSLOG_FACILITY=LOG_LOCAL0 10 | 11 | all: $(BINDIR)/win_plugin 12 | 13 | .PHONY: all depend clean 14 | 15 | $(BINDIR)/win_plugin: $(OBJS) $(ISI_LIB) 16 | $(CC) $(LDFLAGS) $+ $(LDLIBS) -o $@ 17 | 18 | win_plugin.o: win_plugin.c 19 | $(CC) $(CFLAGS) $(DEFS) -I$(ISI_DIR)/include -I.. -c $< -o $@ 20 | 21 | plugin.o: ../plugin.c 22 | $(CC) $(CFLAGS) -I.. -c $< -o $@ 23 | 24 | depend: 25 | $(CC) $(DEFS) -I$(ISI_DIR)/include -I.. -MM *.cc > .depend 26 | 27 | clean: 28 | $(RM) $(OBJS) .depend 29 | 30 | -include .depend 31 | 32 | -------------------------------------------------------------------------------- /templates/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../common) 2 | SET(_EXCLUDE "") 3 | ELSE() 4 | SET(_EXCLUDE PATTERN gdrt EXCLUDE) 5 | ENDIF() 6 | 7 | INSTALL( 8 | DIRECTORY . 9 | DESTINATION ${SC3_PACKAGE_SHARE_DIR}/templates/seedlink 10 | PATTERN ".svn" EXCLUDE 11 | PATTERN "CMakeLists.txt" EXCLUDE 12 | ${_EXCLUDE} 13 | ) 14 | 15 | -------------------------------------------------------------------------------- /templates/antelope/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/orb_plugin -v -S $pkgroot/var/lib/seedlink/${seedlink.station.id}.pkt:100 -m '.*${seedlink.station.code}.${sources.antelope.select}' -o $sources.antelope.address:$sources.antelope.port" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.antelope.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/antelope/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Antelope ORB plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Default host is localhost 12 | try: seedlink.param('sources.antelope.address') 13 | except: seedlink.setParam('sources.antelope.address', 'localhost') 14 | 15 | # Default port is 39136 16 | try: seedlink.param('sources.antelope.port') 17 | except: seedlink.setParam('sources.antelope.port', 39136) 18 | 19 | # Select defaults to '*' 20 | try: seedlink.param('sources.antelope.select') 21 | except: seedlink.setParam('sources.antelope.select', '*') 22 | 23 | # key is station (one instance per station) 24 | return seedlink.net + "." + seedlink.sta 25 | 26 | # Flush does nothing 27 | def flush(self, seedlink): 28 | pass 29 | -------------------------------------------------------------------------------- /templates/backup_seqfiles.tpl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Generated at $date - Do not edit! 4 | # template: $template 5 | 6 | KEEP=30 7 | 8 | mkdir -p "$pkgroot/var/lib/seedlink/backup" 9 | 10 | find "$pkgroot/var/lib/seedlink/backup" -type f -mtime +$$KEEP -exec rm -f '{}' \; 11 | 12 | cd "$pkgroot/var/run/seedlink" 13 | tar cf - *.seq *.state | gzip >"$pkgroot/var/lib/seedlink/backup/seq-"`date +'%Y%m%d'`.tgz 14 | -------------------------------------------------------------------------------- /templates/caps/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/caps_plugin -I $sources.caps.address -f $sources.caps.streamsFile -j $sources.caps.log --max-time-diff $sources.caps.maxTimeDiff$sources.caps.inOrder" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.caps.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/chain/chain_head.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | -------------------------------------------------------------------------------- /templates/chain/chain_head_notimetable.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | -------------------------------------------------------------------------------- /templates/chain/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin chain$seedlink.chain.id cmd="$seedlink.plugin_dir/chain_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/chain${seedlink.chain.id}.xml" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 15 6 | 7 | -------------------------------------------------------------------------------- /templates/dr24/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.dr24.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/dr24/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Geotech DR24 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.dr24.comport') 13 | except: seedlink.setParam('sources.dr24.comport', '/dev/data') 14 | 15 | try: seedlink.param('sources.dr24.baudrate') 16 | except: seedlink.setParam('sources.dr24.baudrate', 19200) 17 | 18 | try: seedlink.param('sources.dr24.proc') 19 | except: seedlink.setParam('sources.dr24.proc', 'dr24_50') 20 | 21 | return seedlink.param('sources.dr24.comport') 22 | 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/dr24/streams_dr24_50.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /templates/echopro_3ch100hz/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/echopro_plugin -s $seedlink.station.id -p $sources.echopro.comport" 3 | timeout = 0 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.echopro_3ch100hz.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/echopro_3ch100hz/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Kelunji EchoPro plugin. 5 | ''' 6 | 7 | class SeedlinkPluginHandler: 8 | # Create defaults 9 | def __init__(self): pass 10 | 11 | def push(self, seedlink): 12 | # Check and set defaults 13 | try: seedlink.param('sources.echopro_3ch100hz.comport') 14 | except: seedlink.setParam('sources.echopro_3ch100hz.comport', '/dev/ttyS0') 15 | 16 | try: seedlink.param('sources.echopro_3ch100hz.proc') 17 | except: seedlink.setParam('sources.echopro_3ch100hz.proc', 'echopro_100') 18 | 19 | return seedlink.param('sources.echopro_3ch100hz.comport') 20 | 21 | # Flush does nothing 22 | def flush(self, seedlink): pass 23 | -------------------------------------------------------------------------------- /templates/echopro_3ch100hz/streams_echopro_100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /templates/echopro_6ch200hz/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/echopro_plugin -s $seedlink.station.id -p $sources.echopro.comport" 3 | timeout = 0 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.echopro_6ch200hz.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/echopro_6ch200hz/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Kelunji EchoPro plugin. 5 | ''' 6 | 7 | class SeedlinkPluginHandler: 8 | # Create defaults 9 | def __init__(self): pass 10 | 11 | def push(self, seedlink): 12 | # Check and set defaults 13 | try: seedlink.param('sources.echopro_6ch200hz.comport') 14 | except: seedlink.setParam('sources.echopro_6ch200hz.comport', '/dev/ttyS0') 15 | 16 | try: seedlink.param('sources.echopro_6ch200hz.proc') 17 | except: seedlink.setParam('sources.echopro_6ch200hz.proc', 'echopro_200') 18 | 19 | return seedlink.param('sources.echopro_6ch200hz.comport') 20 | 21 | # Flush does nothing 22 | def flush(self, seedlink): pass 23 | -------------------------------------------------------------------------------- /templates/echopro_6ch200hz/streams_echopro_200.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/edata/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.edata.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/edata/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the EarthData PS6-24 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.edata.comport') 13 | except: seedlink.setParam('sources.edata.comport', '/dev/data') 14 | 15 | try: seedlink.param('sources.edata.baudrate') 16 | except: seedlink.setParam('sources.edata.baudrate', 115200) 17 | 18 | try: seedlink.param('sources.edata.proc') 19 | except: seedlink.setParam('sources.edata.proc', 'edata_100') 20 | 21 | return seedlink.param('sources.edata.comport') 22 | 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/ewexport/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/ewexport_plugin -v -s $sources.ewexport.address -p $sources.ewexport.port -At '$sources.ewexport.heartbeat.message' -Ar $sources.ewexport.heartbeat.rate" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.ewexport.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/ewexport/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Earthworm export plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: hb_msg = seedlink.param('sources.ewexport.heartbeat.message') 13 | except: 14 | hb_msg = 'alive' 15 | seedlink.setParam('sources.ewexport.heartbeat.message', hb_msg) 16 | 17 | try: hb_rate = seedlink.param('sources.ewexport.heartbeat.rate') 18 | except: 19 | hb_rate = 120 20 | seedlink.setParam('sources.ewexport.heartbeat.rate', hb_rate) 21 | 22 | host = seedlink._get('sources.ewexport.address') 23 | port = seedlink._get('sources.ewexport.port') 24 | 25 | return host + ":" + port 26 | 27 | 28 | # Flush does nothing 29 | def flush(self, seedlink): 30 | pass 31 | -------------------------------------------------------------------------------- /templates/ewexport_pasv/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/ewexport_pasv_plugin -v -s $sources.ewexport_pasv.address -p $sources.ewexport_pasv.port -At '$sources.ewexport_pasv.heartbeat.message' -Ar $sources.ewexport_pasv.heartbeat.rate" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.ewexport_pasv.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/ewexport_pasv/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Earthworm export plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: hb_msg = seedlink.param('sources.ewexport_pasv.heartbeat.message') 13 | except: 14 | hb_msg = 'alive' 15 | seedlink.setParam('sources.ewexport_pasv.heartbeat.message', hb_msg) 16 | 17 | try: hb_rate = seedlink.param('sources.ewexport_pasv.heartbeat.rate') 18 | except: 19 | hb_rate = 120 20 | seedlink.setParam('sources.ewexport_pasv.heartbeat.rate', hb_rate) 21 | 22 | host = seedlink._get('sources.ewexport_pasv.address') 23 | port = seedlink._get('sources.ewexport_pasv.port') 24 | 25 | return host + ":" + port 26 | 27 | 28 | # Flush does nothing 29 | def flush(self, seedlink): 30 | pass 31 | -------------------------------------------------------------------------------- /templates/fs_mseed/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin ${seedlink.source.id} cmd = "$seedlink.plugin_dir/fs_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 1200 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.fs_mseed.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/fs_mseed/streams_generic_3x50.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /templates/gdrt/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/gdrt_plugin --udpport $sources.gdrt.udpport --stations-from $sources.gdrt.stationsFrom" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | 7 | -------------------------------------------------------------------------------- /templates/gmeteo/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.gmeteo.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/gmeteo/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for GFZ meteo. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.gmeteo.comport') 13 | except: seedlink.setParam('sources.gmeteo.comport', '/dev/meteo') 14 | 15 | try: seedlink.param('sources.gmeteo.baudrate') 16 | except: seedlink.setParam('sources.gmeteo.baudrate', 19200) 17 | 18 | try: seedlink.param('sources.gmeteo.proc') 19 | except: seedlink.setParam('sources.gmeteo.proc', 'gmeteo') 20 | 21 | return seedlink.param('sources.gmeteo.comport') 22 | 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/gmeteo/streams_gmeteo.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/hrd24/plugins.ini.tpl: -------------------------------------------------------------------------------- 1 | * Generated at $date - Do not edit! 2 | * template: $template 3 | 4 | [$seedlink.source.id] 5 | 6 | * Settings for Nanometrics HRD24 digitizer 7 | 8 | * Station ID (network/station code is set in seedlink.ini) 9 | station=$seedlink.station.id 10 | 11 | * Use the command 'serial_plugin -m' to find out which protocols are 12 | * supported. 13 | protocol=hrd24 14 | 15 | * Serial port 16 | port=$sources.hrd24.comport 17 | 18 | * Baud rate 19 | bps=$sources.hrd24.baudrate 20 | 21 | * Number of "bundles" in one packet 22 | bundles=$sources.hrd24.bundles 23 | 24 | * Maximum number of consecutive zeros in datastream before data gap will be 25 | * declared (-1 = disabled). 26 | zero_sample_limit = -1 27 | 28 | * Default timing quality in percents. This value will be used when no 29 | * timing quality information is available. Can be -1 to omit the blockette 30 | * 1001 altogether. 31 | default_tq = 0 32 | 33 | * Timing quality to use when GPS is out of lock 34 | unlock_tq = 10 35 | 36 | * Directory for state-of-health log files (optional) 37 | * soh_log_dir=$pkgroot/var/log/hrd24-SOH-files 38 | 39 | * Keyword 'channel' is used to map input channels to symbolic channel 40 | * names. Channel names are arbitrary 1..10-letter identifiers which should 41 | * match the input names of the stream processing scheme in streams.xml, 42 | * which is referenced from seedlink.ini 43 | 44 | channel Z source_id=0 45 | channel N source_id=1 46 | channel E source_id=2 47 | 48 | -------------------------------------------------------------------------------- /templates/hrd24/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.hrd24.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/hrd24/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the EarthData PS6-24 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.hrd24.comport') 13 | except: seedlink.setParam('sources.hrd24.comport', '/dev/data') 14 | 15 | try: seedlink.param('sources.hrd24.baudrate') 16 | except: seedlink.setParam('sources.hrd24.baudrate', 19200) 17 | 18 | try: seedlink.param('sources.hrd24.bundles') 19 | except: seedlink.setParam('sources.hrd24.bundles', 59) 20 | 21 | try: seedlink.param('sources.hrd24.proc') 22 | except: seedlink.setParam('sources.hrd24.proc', 'hrd24_100') 23 | 24 | return seedlink.net + "." + seedlink.sta 25 | 26 | 27 | # Flush does nothing 28 | def flush(self, seedlink): 29 | pass 30 | -------------------------------------------------------------------------------- /templates/hrd24/streams_hrd24_100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /templates/liss/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/sock_plugin -v -s $sources.liss.address -p $sources.liss.port -n $seedlink.station.network" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | 7 | -------------------------------------------------------------------------------- /templates/liss/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the liss plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | try: host = seedlink.param('sources.liss.address') 12 | except: host = "$STATION.$NET.liss.org" 13 | try: port = seedlink.param('sources.liss.port') 14 | except: 15 | port = "4000" 16 | seedlink.setParam('sources.liss.port', port) 17 | 18 | host = host.replace("$STATION", seedlink.sta).replace("$NET", seedlink.net) 19 | seedlink.setParam('sources.liss.address', host) 20 | 21 | # key is station (one instance per station) 22 | return seedlink.net + "." + seedlink.sta 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/m24/plugins.ini.tpl: -------------------------------------------------------------------------------- 1 | * Generated at $date - Do not edit! 2 | * template: $template 3 | 4 | [M24] 5 | 6 | * Settings for the Lennartz M24 digitizer 7 | 8 | * Station ID (network/station code is set in seedlink.ini) 9 | station = $seedlink.station.id 10 | 11 | * Device for serial port 12 | device = $sources.m24.comport 13 | 14 | * Speed for serial port 15 | speed = $sources.m24.baudrate 16 | 17 | * Frame type on serial line 18 | frame-type = 0 19 | 20 | * Sample interval in usecs 21 | sample-iv = 10000 22 | 23 | * Time offset in usecs 24 | time-off = $sources.m24.time_offset 25 | 26 | * 27 | resync-delay = 900 28 | 29 | * Leapseconds file to use 30 | * leapseconds = /usr/src/share/zoneinfo/leapseconds 31 | 32 | -------------------------------------------------------------------------------- /templates/m24/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin M24 cmd = "$seedlink.plugin_dir/m24-plug -p $seedlink.config_dir" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.m24.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/m24/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Lemmartz M24 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.m24.comport') 13 | except: seedlink.setParam('sources.m24.comport', '/dev/data') 14 | 15 | try: seedlink.param('sources.m24.baudrate') 16 | except: seedlink.setParam('sources.m24.baudrate', 115200) 17 | 18 | try: seedlink.param('sources.m24.time_offset') 19 | except: seedlink.setParam('sources.m24.time_offset', 0) 20 | 21 | try: seedlink.param('sources.m24.proc') 22 | except: seedlink.setParam('sources.m24.proc', 'm24_100') 23 | 24 | return None 25 | 26 | 27 | # Flush does nothing 28 | def flush(self, seedlink): 29 | pass 30 | -------------------------------------------------------------------------------- /templates/m24/streams_m24_100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /templates/maram/plugins.ini.tpl: -------------------------------------------------------------------------------- 1 | * Generated at $date - Do not edit! 2 | * template: $template 3 | 4 | [$seedlink.source.id] 5 | 6 | * Settings for maRam Weatherstation V1 7 | 8 | * Station ID (network/station code is set in seedlink.ini) 9 | station=$seedlink.station.id 10 | 11 | * Use the command 'serial_plugin -m' to find out which protocols are 12 | * supported. 13 | protocol=maram 14 | 15 | * Serial port 16 | port=$sources.maram.comport 17 | 18 | * Baud rate 19 | bps=$sources.maram.baudrate 20 | 21 | * Time interval in minutes when weather information is logged, 0 (default) 22 | * means "disabled". Weather channels can be used independently of this 23 | * option. 24 | statusinterval=60 25 | 26 | * Maximum number of consecutive zeros in datastream before data gap will be 27 | * declared (-1 = disabled). 28 | zero_sample_limit = -1 29 | 30 | * Default timing quality in percents. This value will be used when no 31 | * timing quality information is available. Can be -1 to omit the blockette 32 | * 1001 altogether. 33 | default_tq = -1 34 | 35 | * Keyword 'channel' is used to map input channels to symbolic channel 36 | * names. Channel names are arbitrary 1..10-letter identifiers which should 37 | * match the input names of the stream processing scheme in streams.xml, 38 | * which is referenced from seedlink.ini 39 | 40 | * Temperature (C * 100) 41 | channel KI source_id=TD scale=100 42 | 43 | * Humidity (%RH * 10) 44 | channel II source_id=HR scale=10 45 | 46 | * Air Pressure (hPa * 1000) 47 | channel DI source_id=PR scale=1000 48 | 49 | -------------------------------------------------------------------------------- /templates/maram/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.maram.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/maram/setup.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Plugin handler for maRam Weatherstation V1. 3 | ''' 4 | class SeedlinkPluginHandler: 5 | # Create defaults 6 | def __init__(self): pass 7 | 8 | def push(self, seedlink): 9 | # Check and set defaults 10 | try: seedlink.param('sources.maram.comport') 11 | except: seedlink.setParam('sources.maram.comport', '/dev/meteo') 12 | 13 | try: seedlink.param('sources.maram.baudrate') 14 | except: seedlink.setParam('sources.maram.baudrate', 9600) 15 | 16 | try: seedlink.param('sources.maram.proc') 17 | except: seedlink.setParam('sources.maram.proc', 'maram') 18 | 19 | return seedlink.param('sources.maram.comport') 20 | 21 | 22 | # Flush does nothing 23 | def flush(self, seedlink): 24 | pass 25 | -------------------------------------------------------------------------------- /templates/maram/streams_maram.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /templates/minilogger/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/minilogger_plugin -p $seedlink.config_dir/${seedlink.station.network}.${seedlink.station.code}.${sources.minilogger.channel_prefix}${sources.minilogger.component}.prop" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | 7 | -------------------------------------------------------------------------------- /templates/miscScript/scripts/fakeScript.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 -u 2 | 3 | # Simple Script example to generate fix rate ASCII frames with random data and print it on standard output 4 | 5 | ### 6 | import sys,time 7 | from datetime import datetime,timedelta 8 | import random 9 | 10 | 11 | ### Parameters ### 12 | channels_nb=3 #How many channel do you want ? 13 | period_s=1 #Sample_period (second) 14 | period_ms=0 #Sample_period (millisecond, can be combined with period_s) 15 | 16 | 17 | try: 18 | 19 | next_time=datetime.now()+timedelta(seconds=period_s,microseconds=period_ms*1000) 20 | 21 | while True: 22 | data="" 23 | for i in range(channels_nb): 24 | data=data+","+str(int(round(random.uniform(-10000,10000),0))) 25 | 26 | timeStr=datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3] 27 | msg=timeStr+data+"\n" 28 | print(msg) 29 | 30 | time.sleep((next_time-datetime.now())/timedelta(seconds=1)) 31 | next_time= next_time+timedelta(seconds=period_s,microseconds=period_ms*1000) 32 | 33 | except Exception as msg: 34 | raise 35 | 36 | 37 | -------------------------------------------------------------------------------- /templates/miscScript/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.miscScript.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/miscScript/streams_auto.tpl: -------------------------------------------------------------------------------- 1 | 2 | $sources.miscScript.trees 3 | -------------------------------------------------------------------------------- /templates/miscSerial/scripts/fake_miscSerial.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 -u 2 | 3 | # Simple Script to generate fix rate ASCII frames and send it througth a serial port 4 | # pyserial library have to be installed installed first (https://github.com/pyserial/pyserial) 5 | # For testing, you can use socat to get virtual serial ports : 6 | # socat -d -d pty,raw,echo=0 pty,raw,echo=0 7 | 8 | ### 9 | import serial 10 | import sys,time 11 | from datetime import datetime,timedelta 12 | import random 13 | 14 | ### Parameters ### 15 | channels_nb=3 #How many channnel do you want 16 | port="/dev/ttyUSB0" #Serial port used by this script to output data 17 | ser_speed=9600 #Serial port speed 18 | period_s=1 #Sample Period (second) 19 | period_ms=0 #Sample Period (millisecond, can be combined with period_s) 20 | 21 | 22 | try: 23 | 24 | ser=serial.Serial(port,ser_speed,rtscts=0) 25 | next_time=datetime.now()+timedelta(seconds=period_s,microseconds=period_ms*1000) 26 | 27 | while True: 28 | data="" 29 | for i in range(channels_nb): 30 | data=data+","+str(round(random.uniform(-10000,10000),0)) 31 | timeStr=datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3] 32 | msg=timeStr+data+"\n" 33 | print(msg) 34 | ser.write(msg.encode()) 35 | 36 | time.sleep((next_time-datetime.now())/timedelta(seconds=1)) 37 | next_time= next_time+timedelta(seconds=period_s,microseconds=period_ms*1000) 38 | 39 | except Exception as msg: 40 | raise 41 | 42 | finally: 43 | ser.close() 44 | -------------------------------------------------------------------------------- /templates/miscSerial/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.miscSerial.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/miscSerial/streams_auto.tpl: -------------------------------------------------------------------------------- 1 | 2 | $sources.miscSerial.trees 3 | -------------------------------------------------------------------------------- /templates/mk6/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "/umss/source/umsseedl" 3 | timeout = 0 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.mk6.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/mk6/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the MK6 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | return seedlink.net + "." + seedlink.sta 12 | 13 | 14 | # Flush does nothing 15 | def flush(self, seedlink): 16 | pass 17 | -------------------------------------------------------------------------------- /templates/mppt/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$pkgroot/share/plugins/seedlink/serial_plugin$seedlink._daemon_opt -v -f $pkgroot/var/lib/seedlink/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.mppt.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/mppt/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for SunSaver MPPT. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | address = 'localhost' 13 | try: address = seedlink.param('sources.mppt.address') 14 | except: seedlink.setParam('sources.mppt.address', address) 15 | 16 | port = 502 17 | try: port = int(seedlink.param('sources.mppt.port')) 18 | except: seedlink.setParam('sources.mppt.port', port) 19 | 20 | try: int(seedlink.param('sources.mppt.unit_id')) 21 | except: seedlink.setParam('sources.mppt.unit_id', 1) 22 | 23 | try: seedlink.param('sources.mppt.proc') 24 | except: seedlink.setParam('sources.mppt.proc', 'mppt') 25 | 26 | try: 27 | mppt_chan = dict(zip(seedlink.param('sources.mppt.channels').lower().split(','), range(26))) 28 | 29 | except: 30 | mppt_chan = dict() 31 | 32 | for letter in range(ord('a'), ord('z') + 1): 33 | try: seedlink.param('sources.mppt.channels.%s.sid' % chr(letter)) 34 | except: seedlink.setParam('sources.mppt.channels.%s.sid' % chr(letter), mppt_chan.get(chr(letter), 256)) 35 | 36 | return address + ':' + str(port) 37 | 38 | # Flush does nothing 39 | def flush(self, seedlink): 40 | pass 41 | -------------------------------------------------------------------------------- /templates/mppt/streams_mppt.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/mseedfifo/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin mseedfifo cmd="$seedlink.plugin_dir/mseedfifo_plugin$seedlink._daemon_opt -v $plugins.mseedfifo.noexit_param -d $plugins.mseedfifo.fifo_param" 3 | timeout = 0 4 | start_retry = 1 5 | shutdown_wait = 10 6 | 7 | -------------------------------------------------------------------------------- /templates/mseedfifo/setup.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Plugin handler for the mseedfifo plugin. 3 | ''' 4 | 5 | try: 6 | import seiscomp.system 7 | hasSystem = True 8 | except: 9 | hasSystem = False 10 | 11 | 12 | class SeedlinkPluginHandler: 13 | # Create defaults 14 | def __init__(self): 15 | pass 16 | 17 | def push(self, seedlink): 18 | # Check and set defaults 19 | address = "%s/%s" % (seedlink.run_dir,'mseedfifo') 20 | try: 21 | address = seedlink.param('plugins.mseedfifo.fifo', False) 22 | if hasSystem: 23 | e = seiscomp.system.Environment.Instance() 24 | address = e.absolutePath(address) 25 | except: 26 | address = "%s/%s" % (seedlink.run_dir,'mseedfifo') 27 | 28 | seedlink.setParam('plugins.mseedfifo.fifo_param', address, False) 29 | 30 | noexit = '' 31 | try: 32 | noexit = seedlink.param('plugins.mseedfifo.noexit', False).lower() in ("yes", "true", "1") 33 | if noexit: 34 | noexit = ' -n ' 35 | else: 36 | noexit = '' 37 | except: noexit = '' 38 | seedlink.setParam('plugins.mseedfifo.noexit_param', noexit, False) 39 | 40 | def flush(self, seedlink): 41 | self.push(seedlink) 42 | -------------------------------------------------------------------------------- /templates/mseedscan/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/mseedscan_plugin -v -N -d $sources.mseedscan.dir -x $pkgroot/var/lib/seedlink/${seedlink.source.id}.seq" 3 | timeout = 1200 4 | start_retry = 60 5 | shutdown_wait = 10 6 | 7 | -------------------------------------------------------------------------------- /templates/mseedscan/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the liss plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | dir = os.path.join(seedlink.config_dir, "indata") 13 | try: address = seedlink.param('sources.mseedscan.dir') 14 | except: seedlink.setParam('sources.mseedscan.dir', dir) 15 | 16 | # key is directory 17 | return dir 18 | 19 | # Flush does nothing 20 | def flush(self, seedlink): 21 | pass 22 | -------------------------------------------------------------------------------- /templates/mws/plugins.ini.tpl: -------------------------------------------------------------------------------- 1 | * Generated at $date - Do not edit! 2 | * template: $template 3 | 4 | [$seedlink.source.id] 5 | 6 | * Settings for Reinhardt weather station (GITEWS) 7 | 8 | * Station ID (network/station code is set in seedlink.ini) 9 | station=$seedlink.station.id 10 | 11 | * Use the command 'serial_plugin -m' to find out which protocols are 12 | * supported. 13 | protocol=mws 14 | 15 | * Serial port 16 | port=$sources.mws.comport 17 | 18 | * Baud rate 19 | bps=$sources.mws.baudrate 20 | 21 | * Time interval in minutes when weather information is logged, 0 (default) 22 | * means "disabled". Weather channels can be used independently of this 23 | * option. 24 | statusinterval=60 25 | 26 | * Maximum number of consecutive zeros in datastream before data gap will be 27 | * declared (-1 = disabled). 28 | zero_sample_limit = -1 29 | 30 | * Default timing quality in percents. This value will be used when no 31 | * timing quality information is available. Can be -1 to omit the blockette 32 | * 1001 altogether. 33 | default_tq = -1 34 | 35 | * Keyword 'channel' is used to map input channels to symbolic channel 36 | * names. Channel names are arbitrary 1..10-letter identifiers which should 37 | * match the input names of the stream processing scheme in streams.xml, 38 | * which is referenced from seedlink.ini 39 | 40 | * Indoor Temperature (C * 100) 41 | channel KI source_id=TE scale=100 42 | 43 | * Indoor Humidity (%) 44 | channel II source_id=FE scale=1 45 | 46 | * Air Pressure (hPa * 10) 47 | channel DI source_id=DR scale=10 48 | 49 | -------------------------------------------------------------------------------- /templates/mws/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.mws.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/mws/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the MWS plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.mws.comport') 13 | except: seedlink.setParam('sources.mws.comport', '/dev/weatherstation') 14 | 15 | try: seedlink.param('sources.mws.baudrate') 16 | except: seedlink.setParam('sources.mws.baudrate', 19200) 17 | 18 | try: seedlink.param('sources.mws.proc') 19 | except: seedlink.setParam('sources.mws.proc', 'mws') 20 | 21 | return seedlink.param('sources.mws.comport') 22 | 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/mws/streams_mws.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /templates/naqs/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/naqs_plugin -v -t 300 -n $sources.naqs.address -N $seedlink.station.network -p $sources.naqs.port -c $sources.naqs.channels" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.naqs.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/naqs/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the NRTS plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): 9 | self.__channels = set() 10 | pass 11 | 12 | def push(self, seedlink): 13 | address = "localhost" 14 | try: address = seedlink.param('sources.naqs.address') 15 | except: seedlink.setParam('sources.naqs.address', address) 16 | 17 | port = 28000 18 | try: port = int(seedlink.param('sources.naqs.port')) 19 | except: seedlink.setParam('sources.naqs.port', port) 20 | 21 | try: seedlink.param('sources.naqs.proc') 22 | except: seedlink.setParam('sources.naqs.proc', 'naqs_bb40_sm100') 23 | 24 | self.__channels.add(seedlink.param('seedlink.station.code')) 25 | seedlink.setParam('sources.naqs.channels', ",".join(self.__channels)) 26 | 27 | # Key is address and network code 28 | return (address + ":" + str(port), seedlink.param('seedlink.station.network')) 29 | 30 | 31 | # Flush does nothing 32 | def flush(self, seedlink): 33 | pass 34 | -------------------------------------------------------------------------------- /templates/naqs/streams_naqs_bb40_sm100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /templates/nmxp/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/nmxptool -H $sources.nmxp.address -P $sources.nmxp.port -S $sources.nmxp.short_term_completion -M $sources.nmxp.max_latency$sources.nmxp.additional_options -k" 3 | timeout = 0 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.nmxp.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/nmxp/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the nmxptool plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): 9 | pass 10 | 11 | def push(self, seedlink): 12 | # Check and set defaults 13 | address = "idahub.ucsd.edu" 14 | try: address = seedlink.param('sources.nmxp.address') 15 | except: seedlink.setParam('sources.nmxp.address', address) 16 | 17 | port = 28000 18 | try: port = int(seedlink.param('sources.nmxp.port')) 19 | except: seedlink.setParam('sources.nmxp.port', port) 20 | 21 | max_latency = 300 22 | try: max_latency = int(seedlink.param('sources.nmxp.max_latency')) 23 | except: seedlink.setParam('sources.nmxp.max_latency', max_latency) 24 | 25 | short_term_completion = -1 26 | try: short_term_completion = int(seedlink.param('sources.nmxp.short_term_completion')) 27 | except: seedlink.setParam('sources.nmxp.short_term_completion', short_term_completion) 28 | 29 | try: seedlink.param('sources.nmxp.proc') 30 | except: seedlink.setParam('sources.nmxp.proc', 'naqs_bb40_sm100') 31 | 32 | additional_options = "" 33 | try: additional_options = " " + seedlink.param('sources.nmxp.additional_options') 34 | except: pass 35 | 36 | seedlink.setParam('sources.nmxp.additional_options', additional_options) 37 | 38 | # Key is address (one instance per address) 39 | return address + ":" + str(port) 40 | 41 | 42 | # Flush does nothing 43 | def flush(self, seedlink): 44 | pass 45 | -------------------------------------------------------------------------------- /templates/nmxp/streams_naqs_bb40_sm100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /templates/optodas/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/optodas_plugin -a '$sources.optodas.address' -r $sources.optodas.sampleRate -g $sources.optodas.gain -n '$sources.optodas.networkCode' -s '$sources.optodas.stationCode'" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.optodas.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/optodas/streams_auto.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /templates/ps2400_eth/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.ps2400_eth.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/ps2400_eth/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the EarthData PS6-24 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.ps2400_eth.address') 13 | except: seedlink.setParam('sources.ps2400_eth.address', '127.0.0.1') 14 | 15 | try: seedlink.param('sources.ps2400_eth.port') 16 | except: seedlink.setParam('sources.ps2400_eth.port', 1411) 17 | 18 | try: proc = seedlink.param('sources.ps2400_eth.proc') 19 | except: seedlink.setParam('sources.ps2400_eth.proc', 'ps2400_eth_edata_100') 20 | 21 | # Key is per station and configuration settings 22 | key = ";".join([ 23 | str(seedlink.param('sources.ps2400_eth.address')), 24 | str(seedlink.param('sources.ps2400_eth.port'))]) 25 | return key 26 | 27 | 28 | # Flush does nothing 29 | def flush(self, seedlink): 30 | pass 31 | -------------------------------------------------------------------------------- /templates/q330/plugins.ini.tpl: -------------------------------------------------------------------------------- 1 | * Generated at $date - Do not edit! 2 | * template: $template 3 | 4 | [$seedlink.source.id] 5 | 6 | station=$seedlink.station.id 7 | udpaddr=$sources.q330.address 8 | baseport=$sources.q330.port 9 | dataport=$sources.q330.slot 10 | hostport=$sources.q330.udpport 11 | serialnumber=$sources.q330.serial 12 | authcode=$sources.q330.auth 13 | statefile=$seedlink.run_dir/${seedlink.station.id}.${seedlink.source.id}.cn 14 | messages=SDUMP,LOGEXTRA,AUXMSG 15 | statusinterval=60 16 | 17 | -------------------------------------------------------------------------------- /templates/q330/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/q330_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 3600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.q330.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/q330/streams_q330_100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/reftek/plugins.ini.tpl: -------------------------------------------------------------------------------- 1 | * Generated at $date - Do not edit! 2 | * template: $template 3 | 4 | [$seedlink.source.id] 5 | 6 | * Settings for the RefTek plugin 7 | 8 | * Hostname and TCP port of RTPD server 9 | host = $sources.reftek.address 10 | port = $sources.reftek.port 11 | 12 | * Connection retry control: 13 | * never => no retry 14 | * transient => retry on transient errors 15 | * nonfatal => retry on non-fatal errors 16 | * 17 | * Note that when reftek_plugin exits, it will be automatically restarted 18 | * by seedlink, depending on the "start_retry" parameter in seedlink.ini 19 | retry = nonfatal 20 | 21 | * Timeout length in seconds. If no data is received from a Reftek unit 22 | * during this period, the plugin assumes that the unit is disconnected. 23 | timeout = $sources.reftek.timeout 24 | 25 | * Default timing quality in percents. This value will be used when no 26 | * timing quality information is available. Can be -1 to omit the blockette 27 | * 1001 altogether. 28 | default_tq = $sources.reftek.default_tq 29 | 30 | * Timing quality to use when GPS is out of lock 31 | unlock_tq = $sources.reftek.unlock_tq 32 | 33 | * Send Reftek state-of-health data as Mini-SEED LOG stream 34 | log_soh = $sources.reftek.log_soh 35 | -------------------------------------------------------------------------------- /templates/reftek/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/reftek_plugin$seedlink._daemon_opt -v -f '$seedlink.config_dir/plugins.ini' -m '$sources.reftek.mapFlag'" 3 | timeout = 0 4 | start_retry = 60 5 | shutdown_wait = 60 6 | proc = "$sources.reftek.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/reftek/streams_reftek_6x40.tpl: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /templates/sadc/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.sadc.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/sadc/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the SADC10/18/20/30 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.sadc.comport') 13 | except: seedlink.setParam('sources.sadc.comport', '/dev/data') 14 | 15 | try: seedlink.param('sources.sadc.baudrate') 16 | except: seedlink.setParam('sources.sadc.baudrate', 38400) 17 | 18 | try: seedlink.param('sources.sadc.pctime') 19 | except: seedlink.setParam('sources.sadc.pctime', 0) 20 | 21 | try: seedlink.param('sources.sadc.proc') 22 | except: seedlink.setParam('sources.sadc.proc', 'sadc_100') 23 | 24 | return seedlink.param('sources.sadc.comport') 25 | 26 | 27 | # Flush does nothing 28 | def flush(self, seedlink): 29 | pass 30 | -------------------------------------------------------------------------------- /templates/sadc/streams_sadc_100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /templates/scream/scream2sl.map: -------------------------------------------------------------------------------- 1 | # 2 | #keyword stream network station channel ID 3 | # 4 | 5 | ChanInfo PMSTZ4 IP PMST BHZ 1 6 | ChanInfo PMSTN4 IP PMST BHN 2 7 | ChanInfo PMSTE4 IP PMST BHE 3 8 | 9 | ChanInfo PACTZ4 IP PACT BHZ 4 10 | ChanInfo PACTN4 IP PACT BHN 5 11 | ChanInfo PACTE4 IP PACT BHE 6 12 | 13 | # To take also the sysid into account prepend it to the 14 | # streamid separated by a dot 15 | #ChanInfo PACT.Z4 IP PACT BHZ 1 16 | #ChanInfo PACT.N4 IP PACT BHN 2 17 | #ChanInfo PACT.E4 IP PACT BHE 3 -------------------------------------------------------------------------------- /templates/scream/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/scream_plugin$sources.scream.tcpFlag -h $sources.scream.address -p $sources.scream.port -m '$sources.scream.mapFlag'" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.scream.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/scream_ring/scream2sl.map: -------------------------------------------------------------------------------- 1 | # 2 | #keyword stream network station channel ID 3 | # 4 | 5 | ChanInfo PMSTZ4 IP PMST BHZ 1 6 | ChanInfo PMSTN4 IP PMST BHN 3 7 | ChanInfo PMSTE4 IP PMST BHE 5 8 | 9 | ChanInfo PACTZ4 IP PACT BHZ 10 | ChanInfo PACTN4 IP PACT BHN 11 | ChanInfo PACTE4 IP PACT BHE 12 | 13 | ChanInfo 3M39Z2 SP SPD BHZ 4 14 | ChanInfo 3M39N2 SP SPD BHN 5 15 | ChanInfo 3M39E2 SP SPD BHE 6 16 | 17 | ChanInfo 3M43Z2 SP LPW BHZ 4 18 | ChanInfo 3M43N2 SP LPW BHN 5 19 | ChanInfo 3M43E2 SP LPW BHE 6 20 | 21 | -------------------------------------------------------------------------------- /templates/scream_ring/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/scream_plugin_ring$sources.scream_ring.tcpFlag -h $sources.scream_ring.address -p $sources.scream_ring.port -r $sources.scream_ring.tcpport -rsize $sources.scream_ring.rsize -m '$sources.scream_ring.mapFlag'" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.scream_ring.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/seedlink_sproc.tpl: -------------------------------------------------------------------------------- 1 | * Paths to config files of StreamProcessor 2 | filters = "$seedlink.filters" 3 | streams = "$seedlink.streams" 4 | 5 | -------------------------------------------------------------------------------- /templates/seedlink_station_head.tpl: -------------------------------------------------------------------------------- 1 | * The first station is always available in uni-station mode (regardless 2 | * of the "access" parameter). Add a dummy station, so uni-station mode 3 | * cannot be used. 4 | 5 | station .dummy access = 0.0.0.0 description = "$organization" 6 | 7 | -------------------------------------------------------------------------------- /templates/streams_stream100.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/vaisala/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.vaisala.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/vaisala/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Vaisala plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.vaisala.comport') 13 | except: seedlink.setParam('sources.vaisala.comport', '/dev/weatherstation') 14 | 15 | try: seedlink.param('sources.vaisala.baudrate') 16 | except: seedlink.setParam('sources.vaisala.baudrate', 19200) 17 | 18 | try: seedlink.param('sources.vaisala.proc') 19 | except: seedlink.setParam('sources.vaisala.proc', 'vaisala') 20 | 21 | return seedlink.param('sources.vaisala.comport') 22 | 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/vaisala/streams_vaisala.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /templates/wago/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$pkgroot/share/plugins/seedlink/serial_plugin$seedlink._daemon_opt -v -f $pkgroot/var/lib/seedlink/plugins.ini" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.wago.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/wago/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the WAGO (T-Eektronik) plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.wago.port') 13 | except: seedlink.setParam('sources.wago.port', 502) 14 | 15 | try: seedlink.param('sources.wago.proc') 16 | except: seedlink.setParam('sources.wago.proc', 'wago') 17 | 18 | try: 19 | wago_chan = dict(zip(seedlink.param('sources.wago.channels').lower().split(','), range(26))) 20 | 21 | except: 22 | wago_chan = dict() 23 | 24 | for letter in range(ord('a'), ord('z') + 1): 25 | try: seedlink.param('sources.wago.channels.%s.sid' % chr(letter)) 26 | except: seedlink.setParam('sources.wago.channels.%s.sid' % chr(letter), wago_chan.get(chr(letter), 256)) 27 | 28 | return seedlink.net + "." + seedlink.sta 29 | 30 | # Flush does nothing 31 | def flush(self, seedlink): 32 | pass 33 | -------------------------------------------------------------------------------- /templates/wave24/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/wave24_plugin -p $sources.wave24.comport -s $sources.wave24.baudrate -N $seedlink.station.network -S $seedlink.station.code -1 HHZ -2 HHN -3 HHE -f 100" 3 | timeout = 600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.wave24.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/wave24/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ''' 4 | Plugin handler for the Wave24 plugin. 5 | ''' 6 | class SeedlinkPluginHandler: 7 | # Create defaults 8 | def __init__(self): pass 9 | 10 | def push(self, seedlink): 11 | # Check and set defaults 12 | try: seedlink.param('sources.wave24.comport') 13 | except: seedlink.setParam('sources.wave24.comport', '/dev/data') 14 | 15 | try: seedlink.param('sources.wave24.baudrate') 16 | except: seedlink.setParam('sources.wave24.baudrate', 57600) 17 | 18 | try: seedlink.param('sources.wave24.proc') 19 | except: seedlink.setParam('sources.wave24.proc', 'wave24bb') 20 | 21 | return seedlink.param('sources.wave24.comport') 22 | 23 | 24 | # Flush does nothing 25 | def flush(self, seedlink): 26 | pass 27 | -------------------------------------------------------------------------------- /templates/wave24/streams_wave24bb.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/win/seedlink_plugin.tpl: -------------------------------------------------------------------------------- 1 | * template: $template 2 | plugin $seedlink.source.id cmd="$seedlink.plugin_dir/win_plugin$seedlink._daemon_opt -v -F '$sources.win.mapFlag' $sources.win.udpport -" 3 | timeout = 3600 4 | start_retry = 60 5 | shutdown_wait = 10 6 | proc = "$sources.win.proc" 7 | 8 | -------------------------------------------------------------------------------- /templates/win/streams_win.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | --------------------------------------------------------------------------------