ObsPy
  •  GitHub
  •  Documentation 
    • Getting Started
    • Installation
    • Tutorial
    • Gallery
    • API Documentation (latest release)
    • API Documentation (current master)
  •  Mailing Lists 
    • Announcements Mailing List (public)
    •  Subscribe
    •  Archive
    • Users Mailing List (public)
    •  Subscribe
    •  Archives
    •  Post a message
  •  Developer Resources 
    • Gitter
    • How to contribute
    • Coding Style Guide
    • All Releases
    • Code Analysis
    • PEP8
    • Python Coverage
    • C Coverage
    • Coveralls
    • Continuous Integration
    • Test Reports
    •  Travis CI
    • AppVeyor
index| modules| next| previous
  1. ObsPy Documentation (1.0.0)
  2. ObsPy Library Reference
  3. obspy.clients.seedlink - SeedLink client for ObsPy
  4. obspy.clients.seedlink.client.seedlinkconnection

obspy.clients.seedlink.client.seedlinkconnection.SeedLinkConnection¶

class SeedLinkConnection(timeout=None)[source]¶

Bases: builtins.object

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).
Parameters:

timeout (float) Time in seconds after which a collect() call will be interrupted.

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) -> integer
QUOTE_CHAR bytes(iterable_of_ints) -> bytes
SEEDLINK_PROTOCOL_PREFIX str(object=’‘) -> str
UNINETWORK bytes(iterable_of_ints) -> bytes
UNISTATION bytes(iterable_of_ints) -> bytes
__dict__
__doc__ str(object=’‘) -> str
__module__ str(object=’‘) -> str
__weakref__ list of weak references to the object (if defined)

Public Methods

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

Special Methods

__dir__ default dir() implementation
__format__ default object formatter
__init__ Creates a new instance of SeedLinkConnection.
__new__ Create and return a new object.
__reduce__ helper for pickle
__reduce_ex__ helper for pickle
__sizeof__ size of object in memory, in bytes
__subclasshook__ Abstract classes can override this to customize issubclass().

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

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

  • Adam Ringler
  • Alberto Michelini
  • Andreas Köhler
  • Anthony Lomax
  • Benjamin Sullivan
  • Celso Reyes
  • Charles J. Ammon
  • Christian Sippl
  • Conny Hammer
  • Elliott Sales de Andrade
  • Emiliano Russo
  • Fabrizio Bernardi
  • Gaute Hope
  • Henri Martin
  • Joachim Wassermann
  • Jonathan MacCarthy
  • Laura Ermert
  • Lion Krischer
  • Lukas Heiniger
  • Marcus Walther
  • Mark C. Williams
  • Markus Bank
  • Mathijs Koymans
  • Moritz Beyreuther
  • Nicolas Rothenhäusler
  • Peter Danecek
  • Robert Barsch
  • Seyed Kasra Hosseini Zad
  • Stefan Stange
  • Sébastien Bonaimé
  • Tobias Megies
  • Tommaso Fabbri
  • Yannik Behr
  • Adolfo Inza
  • Alessia Maggi
  • Andrew Walker
  • Arthur Snoke
  • Bernhard Morgenstern
  • Chad Trabant
  • Chris Scheingraber
  • Claudio Satriano
  • David Ketchum
  • Emanuel Antunes
  • Fabian Engels
  • Felix Bernauer
  • Heiner Igel
  • Joachim Saul
  • John Leeman
  • Lars Krieger
  • Leonardo Uieda
  • Lloyd Carothers
  • Marc Grunberg
  • Marius Isken
  • Mark P. Panning
  • Martin van Driel
  • Matthias Meschede
  • Nathaniel C. Miller
  • Paul Käufl
  • Philippe Lesage
  • Sebastian Heimann
  • Simon Kremers
  • Sven Egdorf
  • Thomas Lecocq
  • Tom Eulenfeld
  • Victor Kress
  • Ólafur St. Arnarsson

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)
  • VERCE EU-FP7 project (no. 283543)