ObsPy
  •  GitHub
  •  Documentation 
    • Getting Started
    • Tutorial
    • Gallery
    • API Documentation (latest release)
    • General Packages
      • obspy.core
      • obspy.imaging
      • obspy.realtime
      • obspy.signal
      • obspy.station
      • obspy.taup
      • obspy.xseed
    • Waveform Import/Export
      • obspy.css
      • obspy.datamark
      • obspy.gse2
      • obspy.mseed
      • obspy.sac
      • obspy.seisan
      • obspy.seg2
      • obspy.segy
      • obspy.sh
      • obspy.wav
      • obspy.y
    • Database and Web Service Clients
      • obspy.arclink
      • obspy.db
      • obspy.earthworm
      • obspy.fdsn
      • obspy.iris
      • obspy.neic
      • obspy.neries
      • obspy.pde
      • obspy.seedlink
      • obspy.seishub
    • API Documentation (current master)
    • General Packages
      • obspy.core
      • obspy.imaging
      • obspy.realtime
      • obspy.signal
      • obspy.station
      • obspy.taup
      • obspy.xseed
    • Waveform Import/Export
      • obspy.css
      • obspy.datamark
      • obspy.gse2
      • obspy.mseed
      • obspy.sac
      • obspy.seisan
      • obspy.seg2
      • obspy.segy
      • obspy.sh
      • obspy.wav
      • obspy.y
    • Event Data Import/Export
      • obspy.core.quakeml
      • obspy.ndk
      • obspy.pde
    • Database and Web Service Clients
      • obspy.arclink
      • obspy.db
      • obspy.earthworm
      • obspy.fdsn
      • obspy.iris
      • obspy.neic
      • obspy.neries
      • obspy.seedlink
      • obspy.seishub
  •  Mailing Lists 
    • Announcements Mailing List (public)
    •  Subscribe
    •  Archive
    • Users Mailing List (public)
    •  Subscribe
    •  Archives
    •  Post a message
  •  Developer Resources 
    • How to contribute
    • Coding Style Guide
    • All Releases
    • Code Analysis
    • PEP8
    • Python Coverage
    • C Coverage
    • Coveralls
    • Continuous Integration
    • Test Reports
    •  Travis CI
index| modules| next| previous
  1. ObsPy Documentation (0.7.x-3204-g87fa0b3c26-dirty)
  2. ObsPy Library Reference
  3. obspy.seedlink - SeedLink client for ObsPy
  4. obspy.seedlink.client.seedlinkconnection

obspy.seedlink.client.seedlinkconnection.SeedLinkConnection¶

class SeedLinkConnection[source]¶

Bases: future.types.newobject.newobject

Class to manage a connection to a SeedLink server using a Socket.

See obspy.realtime.seedlink.SLClient for an example of how to create and use this SeedLinkConnection object. A new SeedLink application can be created by sub-classing SLClient, or by creating a new class and invoking the methods of SeedLinkConnection.

Variables:
  • SEEDLINK_PROTOCOL_PREFIX URI/URL prefix for seedlink servers (“seedlink://”).
  • UNISTATION The station code used for uni-station mode.
  • UNINETWORK The network code used for uni-station mode.
  • DFT_READBUF_SIZE Default size for buffer to hold responses from server (default is 1024).
  • QUOTE_CHAR Character used for delimiting timestamp strings in the statefile.

Publicly accessible (get/set) parameters:

Variables:
  • sladdr The host:port of the SeedLink server.
  • keepalive Interval to send keepalive/heartbeat (seconds) (default is 0 sec).
  • netto Network timeout (seconds) (default is 120 sec).
  • netdly Network reconnect delay (seconds) (default is 30 sec).
  • info_string String containing concatenation of contents of last terminated set of INFO packets.
  • statefile File name for storing state information.
  • lastpkttime Flag to control last packet time usage, if true, begin_time is appended to DATA command (Default is False).

Protected parameters

Variables:
  • streams Vector of SLNetStation objects.
  • begin_time Beginning of time window.
  • end_time End of time window.
  • resume Flag to control resuming with sequence numbers.
  • multistation Flag to indicate multistation mode.
  • dialup Flag to indicate dial-up mode.
  • terminate_flag Flag to control connection termination.
  • server_id ID of the remote SeedLink server.
  • server_version Version of the remote SeedLink server.
  • info_request_string INFO level to request.
  • socket The network socket.
  • state Persistent state information.
  • infoStrBuf String to store INFO packet contents.

Attributes

DFT_READBUF_SIZE int(x=0) -> int or long
QUOTE_CHAR str(object=’‘) -> string
SEEDLINK_PROTOCOL_PREFIX unicode(object=’‘) -> unicode object
UNINETWORK str(object=’‘) -> string
UNISTATION str(object=’‘) -> string
__dict__
__doc__ unicode(object=’‘) -> unicode object
__module__ str(object=’‘) -> string
__weakref__ list of weak references to the object (if defined)
infoStrBuf

Public Methods

addStream Add a new stream entry to the stream chain for the given net/station parameters.
checkVersion Checks server version number against a given specified value.
checkslcd Check this SeedLinkConnection description has valid parameters.
close Closes this SeedLinkConnection by closing the network socket and saving
collect Manage a connection to a SeedLink server based on the values
configLink Configure/negotiate data stream(s) with the remote SeedLink
connect Open a network socket connection to a SeedLink server. Expects sladdr
createInfoString Method was removed.
disconnect Close the network socket associated with this connection.
doTerminate Terminate the collection loop.
getInfoString Returns the results of the last INFO request.
getKeepAlive Returns the interval to send keepalive/heartbeat (seconds).
getNetDelay Returns the network reconnect delay (seconds).
getNetTimout Returns the network timeout (seconds).
getSLAddress Returns the host:port of the SeedLink server.
getState Returns the SLState state object.
getStreams Returns a copy of the Vector of SLNetStation objects.
isConnected Returns connection state of the connection socket.
isConnectedImpl Check a socket for write ability using select()
negotiateMultiStation Negotiate a SeedLink connection using multi-station mode and
negotiateStation Negotiate a SeedLink connection for a single station and issue
negotiateUniStation Negotiate a SeedLink connection in uni-station mode and issue the
next
parseStreamlist Parse a string of streams and selectors and add them to the stream chain for configuring a multi-station connection.
readStreamList Read a list of streams and selectors from a file and add them to the stream chain for configuring a multi-station connection.
receiveData Read bytes from the server.
recoverState Recover the state file and put the sequence numbers and time stamps into the pre-existing stream chain entries.
requestInfo Add an INFO request to the SeedLink Connection Description.
saveState Save all current sequence numbers and time stamps into the given state file.
sayHello Send the HELLO command and attempt to parse the server version
sendData Send bytes to the server.
sendInfoRequest Sends a request for the specified INFO level. The verbosity level
setBeginTime Sets begin_time for initiation of continuous data transmission.
setEndTime Sets end_time for termination of data transmission.
setKeepAlive Sets interval to send keepalive/heartbeat (seconds).
setLastpkttime Sets a specified start time for beginning of data transmission .
setNetDelay Sets the network reconnect delay (seconds).
setNetTimout Sets the network timeout (seconds).
setSLAddress Sets the host:port of the SeedLink server.
setStateFile Set the state file and recover state.
setUniParams Set the parameters for a uni-station mode connection for the
terminate Sets terminate flag, closes connection and clears state.
updateStream Update the appropriate stream chain entry given a Mini-SEED record.

Special Methods

__init__ Creates a new instance of SeedLinkConnection.
__long__
__native__ Hook for the future.utils.native() function
__nonzero__
__unicode__

By the ObsPy Development Team and many Awesome Contributors™  |  Built with Bootstrap and Glyphicons  |  Copyright 2008-2014

Thank you!

We would like to thank our contributors, whose efforts make this software what it is. These people have helped by writing code and documentation, and by testing. They have created and maintained this product, its associated libraries and applications, our build tools and our web sites.

Contributors

  • Adolfo Inza
  • Alessia Maggi
  • Anthony Lomax
  • Bernhard Morgenstern
  • Charles J. Ammon
  • Christian Sippl
  • Conny Hammer
  • Elliott Sales de Andrade
  • Fabian Engels
  • Gaute Hope
  • Joachim Saul
  • Lars Krieger
  • Lion Krischer
  • Marius Isken
  • Moritz Beyreuther
  • Paul Käufl
  • Philippe Lesage
  • Sebastian Heimann
  • Simon Kremers
  • Sven Egdorf
  • Thomas Lecocq
  • Tom Richter
  • Victor Kress
  • Ólafur St. Arnarsson
  • Alberto Michelini
  • Andreas Köhler
  • Arthur Snoke
  • Chad Trabant
  • Chris Scheingraber
  • Claudio Satriano
  • David Ketchum
  • Emiliano Russo
  • Felix Bernauer
  • Heiner Igel
  • Joachim Wassermann
  • Leonardo Uieda
  • Marcus Walther
  • Martin van Driel
  • Nathaniel C. Miller
  • Peter Danecek
  • Robert Barsch
  • Seyed Kasra Hosseini Zad
  • Stefan Stange
  • Sébastien Bonaimé
  • Tobias Megies
  • Tommaso Fabbri
  • Yannik Behr

Funds

ObsPy was partially funded by the

  • German Science Foundation (DFG) via grant DFG IG 16/9-1
  • German Ministry for Education and Research (BMBF), GEOTECHNOLOGIEN grant 03G0646H.
  • NERA project (Network of European Research Infrastructures for Earthquake Risk Assessment and Mitigation) under the European Community's Seventh Framework Programme (FP7/2007-2013) grant agreement n° 262330
  • Leibniz Institute for Applied Geophysics (LIAG)