Package edu.sc.seis.seisFile.seedlink
Class SeedlinkReader
- java.lang.Object
-
- edu.sc.seis.seisFile.seedlink.SeedlinkReader
-
public class SeedlinkReader extends java.lang.ObjectReader for the seedlink protocol in multistation mode. Protocol documentation can be found at seedlink Note this implementatino assumes multistation mode. It may be possible to use this in single station mode, but this has not been tested.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATA_COMMANDstatic java.lang.StringDATA_TYPEstatic java.lang.StringDEFAULT_HOSTstatic intDEFAULT_PORTstatic intDEFAULT_TIMEOUT_SECONDstatic java.lang.StringEARTHSCOPE_HOSTstatic intEARTHSCOPE_PORTstatic java.lang.StringEMPTYstatic java.lang.StringINFO_ALLstatic java.lang.StringINFO_CAPABILITIESstatic java.lang.StringINFO_CONNECTIONSstatic java.lang.StringINFO_GAPSstatic java.lang.StringINFO_IDstatic java.lang.StringINFO_STATIONSstatic java.lang.StringINFO_STREAMSjava.lang.StringlastSeqNumstatic java.lang.StringTIME_COMMAND
-
Constructor Summary
Constructors Constructor Description SeedlinkReader()default of IRIS DMCSeedlinkReader(boolean verbose)default of IRIS DMCSeedlinkReader(SeedlinkState state)SeedlinkReader(SeedlinkState state, int timeoutSeconds, boolean verbose, int connectTimeoutSeconds)SeedlinkReader(java.lang.String host)uses the default port of 18000SeedlinkReader(java.lang.String host, boolean verbose)uses the default port of 18000SeedlinkReader(java.lang.String host, int port)SeedlinkReader(java.lang.String host, int port, boolean verbose)SeedlinkReader(java.lang.String host, int port, int timeoutSeconds)SeedlinkReader(java.lang.String host, int port, int timeoutSeconds, boolean verbose)SeedlinkReader(java.lang.String host, int port, int timeoutSeconds, boolean verbose, int connectTimeoutSeconds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanavailable()true if there is enough data in the instream to possibly read a data record.intavailableBytes()Returns available() from the underlying InputStream, in bytesvoidclose()static booleancontainsWildcard(java.lang.String cmd)static java.lang.StringcreateResumeDataCommand(java.lang.String lastNet, java.lang.String lastStation, SeedlinkState state)voidendHandshake()Ends the handshaking phase and starts data flowing.java.lang.StringgetHost()java.lang.StringgetInfoString()Get the SeedLink information string for streams.java.lang.StringgetInfoString(java.lang.String infoType)Get the SeedLink information string.java.lang.StringgetInfoString(java.lang.String infoType, boolean addNewlines)Get the SeedLink information string.intgetPort()SeedlinkStategetState()SeedlinkState is a utility object to allow the client to keep track of the last sequence number for each station and the sequence of commands that affect data that were sent to the server.java.io.PrintWritergetVerboseWriter()booleanhasNext()Determine if a packet may be available.voidinfo(java.lang.String level)send an INFO command.protected voidinternalSendCmd(java.lang.String cmd)booleanisConnected()booleanisVerbose()SeedlinkPacketnext()Get the next packet.static java.lang.StringnextSeq(java.lang.String seq)protected java.lang.StringreadLine()SeedlinkPacketreadPacket()Read the next packet.voidreconnect()Does a simple reconnect, replaying the original commands and restarting data.voidrestartData(java.lang.String seqNum)Deprecated.use repeated selectData(String network, String station, List<String> locchan, int seqNum) followed by endHandshake()voidresume()Deprecated.use resumeGlobalSequencestatic SeedlinkReaderresume(SeedlinkState seedlinkState, boolean verbose)Resumes the connection at the last successful packet using the sequence number.static SeedlinkReaderresumeGlobalSequence(SeedlinkState seedlinkState)static SeedlinkReaderresumeGlobalSequence(SeedlinkState seedlinkState, boolean verbose)Resumes the connection at the last successful packet using the global last sequence number.voidselect(java.lang.String network, java.lang.String station, java.lang.String location, java.lang.String channel)Deprecated.use selectData() or selectTime() insteadvoidselect(java.lang.String network, java.lang.String station, java.lang.String location, java.lang.String channel, java.lang.String type)Deprecated.use selectData() or selectTime() insteadvoidselectData(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan)voidselectData(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String seqNum)voidselectData(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start)voidselectDataOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String type)voidselectDataOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String seqNum, java.lang.String type)voidselectDataOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start, java.lang.String type)voidselectOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String type)Deprecated.use selectData() or selectTime() insteadvoidselectTime(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start)voidselectTime(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start, java.time.Instant end)voidselectTimeOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start, java.time.Instant end, java.lang.String type)voidsendCmd(java.lang.String cmd)Sends a SeedLink modifier command, generally should be limited to STATION, SELECT, FETCH, DATA and TIME.voidsendData()voidsendData(java.lang.String seqNum)voidsendData(java.lang.String seqNum, java.time.Instant start)voidsendData(java.time.Instant start)java.lang.String[]sendHello()voidsendSelect(java.lang.String locationChannel)Send a SELECT command for the given location-channel and with type of 'D'.voidsendSelect(java.lang.String locationChannel, java.lang.String type)Send a SELECT command for the given location-channel and type.voidsendStation(java.lang.String network, java.lang.String station)Send a STATION command for the given network and station.voidsendTime(java.time.Instant start)voidsendTime(java.time.Instant start, java.time.Instant end)voidsetVerbose(boolean verbose)voidsetVerboseWriter(java.io.PrintWriter verboseWriter)voidstartData()Deprecated.use repeated selectData() or selectTime() followed by endHandshake()voidstartData(java.lang.String start, java.lang.String end)Deprecated.use repeated selectData() followed by endHandshake()voidstartData(java.time.Instant start, java.time.Instant end)Deprecated.use repeated selectTime() followed by endHandshake()
-
-
-
Field Detail
-
lastSeqNum
public java.lang.String lastSeqNum
-
EMPTY
public static final java.lang.String EMPTY
- See Also:
- Constant Field Values
-
DATA_TYPE
public static final java.lang.String DATA_TYPE
- See Also:
- Constant Field Values
-
DATA_COMMAND
public static final java.lang.String DATA_COMMAND
- See Also:
- Constant Field Values
-
TIME_COMMAND
public static final java.lang.String TIME_COMMAND
- See Also:
- Constant Field Values
-
EARTHSCOPE_HOST
public static final java.lang.String EARTHSCOPE_HOST
- See Also:
- Constant Field Values
-
EARTHSCOPE_PORT
public static final int EARTHSCOPE_PORT
- See Also:
- Constant Field Values
-
DEFAULT_HOST
public static final java.lang.String DEFAULT_HOST
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT_SECOND
public static final int DEFAULT_TIMEOUT_SECOND
- See Also:
- Constant Field Values
-
INFO_ID
public static final java.lang.String INFO_ID
- See Also:
- Constant Field Values
-
INFO_CAPABILITIES
public static final java.lang.String INFO_CAPABILITIES
- See Also:
- Constant Field Values
-
INFO_STATIONS
public static final java.lang.String INFO_STATIONS
- See Also:
- Constant Field Values
-
INFO_STREAMS
public static final java.lang.String INFO_STREAMS
- See Also:
- Constant Field Values
-
INFO_GAPS
public static final java.lang.String INFO_GAPS
- See Also:
- Constant Field Values
-
INFO_CONNECTIONS
public static final java.lang.String INFO_CONNECTIONS
- See Also:
- Constant Field Values
-
INFO_ALL
public static final java.lang.String INFO_ALL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SeedlinkReader
public SeedlinkReader() throws java.io.IOExceptiondefault of IRIS DMC- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(boolean verbose) throws java.io.IOExceptiondefault of IRIS DMC- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host) throws java.io.IOExceptionuses the default port of 18000- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host, boolean verbose) throws java.io.IOExceptionuses the default port of 18000- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host, int port) throws java.io.IOException- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host, int port, boolean verbose) throws java.io.IOException- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host, int port, int timeoutSeconds) throws java.io.IOException- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host, int port, int timeoutSeconds, boolean verbose) throws java.io.IOException- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(java.lang.String host, int port, int timeoutSeconds, boolean verbose, int connectTimeoutSeconds) throws java.io.IOException- Throws:
java.io.IOException
-
SeedlinkReader
public SeedlinkReader(SeedlinkState state)
-
SeedlinkReader
public SeedlinkReader(SeedlinkState state, int timeoutSeconds, boolean verbose, int connectTimeoutSeconds)
-
-
Method Detail
-
hasNext
public boolean hasNext() throws java.io.IOExceptionDetermine if a packet may be available. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.- Returns:
- true if a packet may be available, false if end was received.
- Throws:
java.io.IOException- if an I/O Exception occurs.- See Also:
readPacket()
-
available
public boolean available() throws java.io.IOExceptiontrue if there is enough data in the instream to possibly read a data record. This should not block, unlike hasNext() and next().- Throws:
java.io.IOException
-
availableBytes
public int availableBytes() throws java.io.IOExceptionReturns available() from the underlying InputStream, in bytes- Throws:
java.io.IOException
-
getInfoString
public java.lang.String getInfoString() throws java.io.IOException, SeedlinkException, SeedFormatExceptionGet the SeedLink information string for streams.- Returns:
- the SeedLink information string or null if error.
- Throws:
java.io.IOException- if an I/O Exception occurs.SeedlinkException- if no packets or there is an error creating the packet.SeedFormatException- if there is an error with the SEED format.
-
getInfoString
public java.lang.String getInfoString(java.lang.String infoType) throws java.io.IOException, SeedlinkException, SeedFormatExceptionGet the SeedLink information string.- Parameters:
infoType- the information type.- Returns:
- the SeedLink information string or null if error.
- Throws:
java.io.IOException- if an I/O Exception occurs.SeedlinkException- if no packets or there is an error creating the packet.SeedFormatException- if there is an error with the SEED format.
-
getInfoString
public java.lang.String getInfoString(java.lang.String infoType, boolean addNewlines) throws java.io.IOException, SeedlinkException, SeedFormatExceptionGet the SeedLink information string.- Parameters:
infoType- the information type.addNewlines- true to add newlines to support XML parsing, false otherwise.- Returns:
- the SeedLink information string or null if error.
- Throws:
java.io.IOException- if an I/O Exception occurs.SeedlinkException- if no packets or there is an error creating the packet.SeedFormatException- if there is an error with the SEED format.
-
next
public SeedlinkPacket next() throws java.io.IOException, SeedlinkException
Get the next packet. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.- Returns:
- the packet or null if none.
- Throws:
java.io.IOException- if an I/O Exception occurs.SeedlinkException- if no packets or there is an error creating the packet.- See Also:
hasNext(),readPacket()
-
readPacket
public SeedlinkPacket readPacket() throws java.io.IOException, SeedlinkException
Read the next packet. This method should be called after calling the 'hasNext' method. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.- Returns:
- the next packet.
- Throws:
java.io.IOException- if an I/O Exception occurs.SeedlinkException- if there is an error creating the packet.- See Also:
hasNext()
-
info
public void info(java.lang.String level) throws java.io.IOExceptionsend an INFO command. The resulting packets can be retrieved with calls to next(), checking isInfoContinuesPacket() to see if more packets will be returned. INFO requests should probably not be sent after the end of the handshake as real data packets may arrive causing confusion. GetInfoString() is preferred as it iterates over all returned packets and returns the result as a single String.- Throws:
java.io.IOException
-
endHandshake
public void endHandshake() throws java.io.IOExceptionEnds the handshaking phase and starts data flowing.- Throws:
java.io.IOException
-
close
public void close()
-
isConnected
public boolean isConnected()
-
reconnect
public void reconnect() throws java.io.IOException, SeedlinkExceptionDoes a simple reconnect, replaying the original commands and restarting data. This does not resume from the last packet, so data may be lost that arrived during the outage. See resume to reconnect and resume data flow from the last successful packet.- Throws:
java.io.IOExceptionSeedlinkException
-
resume
@Deprecated public void resume() throws java.io.IOException, SeedlinkExceptionDeprecated.use resumeGlobalSequenceResumes the connection at the last successful packet using the global last sequence number. Note that this assumes that sequence numbers are global, not per station. Each DATA or TIME command in the original command sequence is replaced with 'DATA seq' to restart with the last received sequence number. If the server uses per station sequence numbering then the client must keep track of sequence numbers and use resume(SeedlinkState) to supply the sequence numbers.- Throws:
java.io.IOExceptionSeedlinkException
-
resumeGlobalSequence
public static SeedlinkReader resumeGlobalSequence(SeedlinkState seedlinkState) throws java.io.IOException, SeedlinkException
- Throws:
java.io.IOExceptionSeedlinkException
-
resumeGlobalSequence
public static SeedlinkReader resumeGlobalSequence(SeedlinkState seedlinkState, boolean verbose) throws java.io.IOException, SeedlinkException
Resumes the connection at the last successful packet using the global last sequence number. Note that this assumes that sequence numbers are global, not per station. Each DATA or TIME command in the original command sequence is replaced with 'DATA seq' to restart with the last received sequence number, which should work with wildcards.. If the server uses per station sequence numbering then the client must keep track of sequence numbers and use resume(SeedlinkState) to supply the sequence numbers, possibly with custom commands to handle wildcards.- Throws:
java.io.IOExceptionSeedlinkException
-
resume
public static SeedlinkReader resume(SeedlinkState seedlinkState, boolean verbose) throws java.io.IOException, SeedlinkException
Resumes the connection at the last successful packet using the sequence number. Note that this uses a supplied per station last seq number. The map key is of the form NN.SSSSS where NN is the network code and SSSSS is the station code. It is also assumed that there is a DATA or TIME command in the original handshaking phase after each STATION command. Some servers allow multiple STATION commands before a DATA command, but this breaks restarting each station at the last sequence. The caller should call endHandshake() after creationg in order to begin data flow. This does not function correctly if wildcards have been used in the original request as there is no guarantee that all stations/channels that might match the wildcards have actually been seen before the interruption, and so the wildcard commands may need to be repeated. Resuming after STATION comamnds with wildcards should be handled externally by the client.- Throws:
java.io.IOExceptionSeedlinkException
-
createResumeDataCommand
public static java.lang.String createResumeDataCommand(java.lang.String lastNet, java.lang.String lastStation, SeedlinkState state)
-
nextSeq
public static java.lang.String nextSeq(java.lang.String seq)
-
containsWildcard
public static boolean containsWildcard(java.lang.String cmd)
-
sendHello
public java.lang.String[] sendHello() throws java.io.IOException, SeedlinkException- Throws:
java.io.IOExceptionSeedlinkException
-
readLine
protected java.lang.String readLine() throws java.io.IOException, SeedlinkException- Throws:
java.io.IOExceptionSeedlinkException
-
sendCmd
public void sendCmd(java.lang.String cmd) throws java.io.IOException, SeedlinkExceptionSends a SeedLink modifier command, generally should be limited to STATION, SELECT, FETCH, DATA and TIME.- Parameters:
cmd- the command.- Throws:
SeedlinkException- if a SeedLink error occurs.java.io.IOException- if an I/O Exception occurs.
-
select
@Deprecated public void select(java.lang.String network, java.lang.String station, java.lang.String location, java.lang.String channel) throws SeedlinkException, java.io.IOExceptionDeprecated.use selectData() or selectTime() insteadSelect the stream. This sends a STATION followed by a SELECT command.- Parameters:
network- the network.station- the station.location- the location or empty if none.channel- the channel.- Throws:
SeedlinkException- if a SeedLink error occurs.java.io.IOException- if an I/O Exception occurs.
-
selectData
public void selectData(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectOfType
@Deprecated public void selectOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String type) throws SeedlinkException, java.io.IOExceptionDeprecated.use selectData() or selectTime() insteadUtility function to select the stream. This sends a STATION followed by a SELECT command.- Parameters:
network- the network.station- the station.locchan- list of location channel.type- the data type.- Throws:
SeedlinkExceptionjava.io.IOException
-
selectDataOfType
public void selectDataOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String type) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectData
public void selectData(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String seqNum) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectDataOfType
public void selectDataOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.lang.String seqNum, java.lang.String type) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectData
public void selectData(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectDataOfType
public void selectDataOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start, java.lang.String type) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectTime
public void selectTime(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectTime
public void selectTime(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start, java.time.Instant end) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
selectTimeOfType
public void selectTimeOfType(java.lang.String network, java.lang.String station, java.util.List<java.lang.String> locchan, java.time.Instant start, java.time.Instant end, java.lang.String type) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
select
@Deprecated public void select(java.lang.String network, java.lang.String station, java.lang.String location, java.lang.String channel, java.lang.String type) throws SeedlinkException, java.io.IOExceptionDeprecated.use selectData() or selectTime() insteadUtility function to select the stream. This sends a STATION followed by a SELECT command.- Parameters:
network- the network.station- the station.location- the location or empty if none.channel- the channel.type- the data type.- Throws:
SeedlinkExceptionjava.io.IOException
-
sendStation
public void sendStation(java.lang.String network, java.lang.String station) throws SeedlinkException, java.io.IOExceptionSend a STATION command for the given network and station. If either is length zero, a wildcard of "*" is inserted in its place. In the Seedlink protocol, a STATION command should be followed by one or more SELECT commands. See sendSelect().- Parameters:
network- the network.station- the station.- Throws:
SeedlinkExceptionjava.io.IOException
-
sendSelect
public void sendSelect(java.lang.String locationChannel) throws SeedlinkException, java.io.IOExceptionSend a SELECT command for the given location-channel and with type of 'D'. In the Seedlink protocol, a STATION command should be followed by one or more SELECT commands. See sendStation().- Parameters:
locationChannel- the combined location and channel, eg 00HHZ.- Throws:
SeedlinkExceptionjava.io.IOException
-
sendSelect
public void sendSelect(java.lang.String locationChannel, java.lang.String type) throws SeedlinkException, java.io.IOExceptionSend a SELECT command for the given location-channel and type. In the Seedlink protocol, one or more SELECT commands should follow a STATION command. See sendStation().- Parameters:
locationChannel- the combined location and channel, eg 00HHZ.type- the data type.- Throws:
SeedlinkExceptionjava.io.IOException
-
startData
@Deprecated public void startData() throws SeedlinkException, java.io.IOExceptionDeprecated.use repeated selectData() or selectTime() followed by endHandshake()Start the data transfer.- Throws:
SeedlinkException- if a SeedLink error occurs.java.io.IOException- if an I/O Exception occurs.
-
startData
@Deprecated public void startData(java.time.Instant start, java.time.Instant end) throws SeedlinkException, java.io.IOExceptionDeprecated.use repeated selectTime() followed by endHandshake()Start the data transfer. Note the DMC only goes back 48 hours. The start and end time format is year,month,day,hour,minute,second, e.g. '2002,08,05,14,00'.- Parameters:
start- the start time or null if none.end- the end time or null if none (ignored if no start time.)- Throws:
SeedlinkException- if a SeedLink error occurs.java.io.IOException- if an I/O Exception occurs.
-
startData
@Deprecated public void startData(java.lang.String start, java.lang.String end) throws SeedlinkException, java.io.IOExceptionDeprecated.use repeated selectData() followed by endHandshake()Start the data transfer. Note the DMC only goes back 48 hours. The start and end time format is year,month,day,hour,minute,second, e.g. '2002,08,05,14,00'.- Parameters:
start- the start time or empty string if none.end- the end time or empty string if none (ignored if no start time.)- Throws:
SeedlinkException- if a SeedLink error occurs.java.io.IOException- if an I/O Exception occurs.
-
sendData
public void sendData() throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
sendData
public void sendData(java.lang.String seqNum) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
sendData
public void sendData(java.time.Instant start) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
sendData
public void sendData(java.lang.String seqNum, java.time.Instant start) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
sendTime
public void sendTime(java.time.Instant start) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
sendTime
public void sendTime(java.time.Instant start, java.time.Instant end) throws SeedlinkException, java.io.IOException- Throws:
SeedlinkExceptionjava.io.IOException
-
restartData
@Deprecated public void restartData(java.lang.String seqNum) throws SeedlinkException, java.io.IOExceptionDeprecated.use repeated selectData(String network, String station, List<String> locchan, int seqNum) followed by endHandshake()- Parameters:
seqNum-- Throws:
SeedlinkExceptionjava.io.IOException
-
internalSendCmd
protected void internalSendCmd(java.lang.String cmd) throws java.io.IOException, SeedlinkException- Throws:
java.io.IOExceptionSeedlinkException
-
isVerbose
public boolean isVerbose()
-
setVerbose
public void setVerbose(boolean verbose)
-
getVerboseWriter
public java.io.PrintWriter getVerboseWriter()
-
setVerboseWriter
public void setVerboseWriter(java.io.PrintWriter verboseWriter)
-
getHost
public java.lang.String getHost()
-
getPort
public int getPort()
-
getState
public SeedlinkState getState()
SeedlinkState is a utility object to allow the client to keep track of the last sequence number for each station and the sequence of commands that affect data that were sent to the server. SeedlinkReader does not automatically keep track of these per station sequence numbers as it requires parsing the miniseed records. Clients that desire this should call SeedlinkState.update(SeedlinkPacket) to update the per station sequence number.
-
-