Coverage for /opt/obspy/update-docs/src/obspy/obspy/seedlink/client/slnetstation : 54%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- Module to hold a SeedLink stream descriptions (selectors) for network/station.
Part of Python implementation of libslink of Chad Trabant and JSeedLink of Anthony Lomax
:copyright: The ObsPy Development Team (devs@obspy.org) & Anthony Lomax :license: GNU Lesser General Public License, Version 3 (http://www.gnu.org/copyleft/lesser.html) """
""" Class to hold a SeedLink stream selectors for a network/station.
:var MAX_SELECTOR_SIZE: Maximum selector size. :type MAX_SELECTOR_SIZE: int :var net: The network code. :type net: str :var station: The station code. :type station: str :var selectors: SeedLink style selectors for this station. :type selectors: str :var seqnum: SeedLink sequence number of last packet received. :type seqnum: int :var btime: Time stamp of last packet received. :type btime: TTT """
""" Creates a new instance of SLNetStation.
:param net: network code. :param station: station code. :param selectors: selectors for this net/station, null if none. :param seqnum: SeedLink sequence number of last packet received, -1 to start at the next data. :param timestamp: SeedLink time stamp in a UTCDateTime format for last packet received, null for none. """ self.net = str(net) self.station = str(station) #print "DEBUG: selectors:", selectors if selectors is not None: self.selectors = selectors self.seqnum = seqnum if timestamp is not None: self.btime = UTCDateTime(timestamp)
""" Appends a selectors String to the current selectors for this SLNetStation.
:return: 0 if selectors added successfully, 1 otherwise """ self.selectors.append(newSelectors) return 1
""" Returns the selectors as an array of Strings
:return: array of selector Strings """ return self.selectors
""" Returns the time stamp in SeedLink string format: "year,month,day,hour,minute,second"
:return: SeedLink time """ return self.btime.formatSeedLink() |