public class TraceBuf2
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AMPLIFIER_SATURATED |
static int |
DIGITIZER_CLIPPED |
static int |
FILTER_CHARGING |
static int |
GLITCHES_DETECTED |
static int |
HEADER_SIZE |
static java.lang.String |
INTEL_IEEE_DOUBLE_PRECISION_REAL |
static java.lang.String |
INTEL_IEEE_INTEGER |
static java.lang.String |
INTEL_IEEE_SHORT_INTEGER |
static java.lang.String |
INTEL_IEEE_SINGLE_PRECISION_REAL |
static java.lang.String |
LOC_NULL_STRING |
static int |
MAX_CHAN_LEN |
static int |
MAX_LOC_LEN |
static int |
MAX_NET_LEN |
static int |
MAX_STA_LEN |
static int |
MAX_TRACEBUF_SIZE |
static int |
MISSING_DATA_PRESENT |
static java.lang.String |
NORESS_GAIN_RANGED |
static short |
S_ZERO |
static int |
SPIKES_DETECTED |
static java.lang.String |
SUN_IEEE_DOUBLE_PRECISION_REAL |
static java.lang.String |
SUN_IEEE_INTEGER |
static java.lang.String |
SUN_IEEE_SHORT_INTEGER |
static java.lang.String |
SUN_IEEE_SINGLE_PRECISION_REAL |
static int |
TELEMETRY_SYNCH_ERROR |
static int |
TIME_TAG_QUESTIONABLE |
static java.lang.String |
TRACEBUF_VERSION |
Modifier | Constructor and Description |
---|---|
protected |
TraceBuf2()
for use by static read method.
|
|
TraceBuf2(byte[] data) |
|
TraceBuf2(int pin,
int numSamples,
double startTime,
double sampleRate,
java.lang.String station,
java.lang.String network,
java.lang.String channel,
java.lang.String locId,
double[] data) |
|
TraceBuf2(int pin,
int numSamples,
double startTime,
double sampleRate,
java.lang.String station,
java.lang.String network,
java.lang.String channel,
java.lang.String locId,
float[] data) |
|
TraceBuf2(int pin,
int numSamples,
double startTime,
double sampleRate,
java.lang.String station,
java.lang.String network,
java.lang.String channel,
java.lang.String locId,
int[] intData) |
|
TraceBuf2(int pin,
int numSamples,
double startTime,
double sampleRate,
java.lang.String station,
java.lang.String network,
java.lang.String channel,
java.lang.String locId,
short[] data) |
Modifier and Type | Method and Description |
---|---|
static void |
checkRecordLengthExp(int recLenExp) |
edu.iris.dmc.seedcodec.SteimFrameBlock |
encodeSteim1(int recLenExp)
encodes the data as Steim1.
|
edu.iris.dmc.seedcodec.SteimFrameBlock |
encodeSteim1(int recLenExp,
int offset)
encodes the data starting at offset as Steim1.
|
edu.iris.dmc.seedcodec.SteimFrameBlock |
encodeSteim2(int recLenExp)
encodes the data as Steim2.
|
edu.iris.dmc.seedcodec.SteimFrameBlock |
encodeSteim2(int recLenExp,
int offset)
encodes the data starting at offset as Steim1.
|
static java.lang.String |
extractDataType(byte[] data) |
static int |
extractNumSamples(byte[] data,
boolean swapBytes) |
java.lang.String |
formatNSLCCodes() |
java.lang.String |
getChannel() |
java.lang.String |
getDataType() |
double[] |
getDoubleData() |
java.util.Date |
getEndDate() |
double |
getEndTime() |
float[] |
getFloatData() |
int[] |
getIntData() |
java.lang.String |
getLocId() |
java.lang.String |
getNetwork() |
int |
getNumSamples() |
short |
getPad() |
int |
getPin() |
java.util.Date |
getPredictedNextStartDate()
Predicted start of the next tracebuf.
|
double |
getPredictedNextStartTime()
Predicted start of the next tracebuf in seconds.
|
short |
getQuality() |
double |
getSampleRate() |
static int |
getSampleSize(java.lang.String dataType) |
byte |
getSeedEncoding() |
short[] |
getShortData() |
int |
getSize() |
java.util.Date |
getStartDate() |
double |
getStartTime() |
java.lang.String |
getStation() |
java.lang.String |
getVersion() |
boolean |
isDoubleData() |
static boolean |
isDoubleData(java.lang.String dataType) |
boolean |
isFloatData() |
static boolean |
isFloatData(java.lang.String dataType) |
boolean |
isIntData() |
static boolean |
isIntData(java.lang.String dataType) |
boolean |
isShortData() |
static boolean |
isShortData(java.lang.String dataType) |
static boolean |
isSwapBytes(java.lang.String dataType) |
static TraceBuf2 |
read(java.io.DataInput in) |
java.util.List<TraceBuf2> |
split(int maxSize) |
byte[] |
toByteArray() |
java.util.List<DataRecord> |
toMiniSeed(int recLenExp,
boolean doSteim1)
Deprecated.
use toMiniSeedNoCompression(int) or toMiniSeed(int, int) instead
|
java.util.List<DataRecord> |
toMiniSeed(int recLenExp,
int compressionType) |
java.util.List<DataRecord> |
toMiniSeedNoCompression(int recLenExp) |
DataRecord |
toMiniSeedNoSplit(int recLenExp,
boolean steim1) |
java.lang.String |
toString() |
java.lang.String |
toStringWithData() |
void |
write(java.io.DataOutputStream out) |
public static final java.lang.String LOC_NULL_STRING
public static final int MAX_TRACEBUF_SIZE
public static final int AMPLIFIER_SATURATED
public static final int DIGITIZER_CLIPPED
public static final int SPIKES_DETECTED
public static final int GLITCHES_DETECTED
public static final int MISSING_DATA_PRESENT
public static final int TELEMETRY_SYNCH_ERROR
public static final int FILTER_CHARGING
public static final int TIME_TAG_QUESTIONABLE
public static final int HEADER_SIZE
public static final java.lang.String SUN_IEEE_SINGLE_PRECISION_REAL
public static final java.lang.String SUN_IEEE_DOUBLE_PRECISION_REAL
public static final java.lang.String SUN_IEEE_INTEGER
public static final java.lang.String SUN_IEEE_SHORT_INTEGER
public static final java.lang.String INTEL_IEEE_SINGLE_PRECISION_REAL
public static final java.lang.String INTEL_IEEE_DOUBLE_PRECISION_REAL
public static final java.lang.String INTEL_IEEE_INTEGER
public static final java.lang.String INTEL_IEEE_SHORT_INTEGER
public static final java.lang.String NORESS_GAIN_RANGED
public static final java.lang.String TRACEBUF_VERSION
public static final int MAX_NET_LEN
public static final int MAX_STA_LEN
public static final int MAX_LOC_LEN
public static final int MAX_CHAN_LEN
public static final short S_ZERO
protected TraceBuf2()
public TraceBuf2(int pin, int numSamples, double startTime, double sampleRate, java.lang.String station, java.lang.String network, java.lang.String channel, java.lang.String locId, short[] data)
public TraceBuf2(int pin, int numSamples, double startTime, double sampleRate, java.lang.String station, java.lang.String network, java.lang.String channel, java.lang.String locId, int[] intData)
public TraceBuf2(int pin, int numSamples, double startTime, double sampleRate, java.lang.String station, java.lang.String network, java.lang.String channel, java.lang.String locId, float[] data)
public TraceBuf2(int pin, int numSamples, double startTime, double sampleRate, java.lang.String station, java.lang.String network, java.lang.String channel, java.lang.String locId, double[] data)
public TraceBuf2(byte[] data)
public static TraceBuf2 read(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public static int extractNumSamples(byte[] data, boolean swapBytes)
public static java.lang.String extractDataType(byte[] data)
public static boolean isSwapBytes(java.lang.String dataType)
public static int getSampleSize(java.lang.String dataType)
public void write(java.io.DataOutputStream out) throws java.io.IOException
java.io.IOException
public java.util.List<TraceBuf2> split(int maxSize)
public boolean isShortData()
public boolean isIntData()
public boolean isFloatData()
public boolean isDoubleData()
public static boolean isShortData(java.lang.String dataType)
public static boolean isIntData(java.lang.String dataType)
public static boolean isFloatData(java.lang.String dataType)
public static boolean isDoubleData(java.lang.String dataType)
public int getPin()
public int getNumSamples()
public double getStartTime()
public double getEndTime()
public double getPredictedNextStartTime()
public java.util.Date getPredictedNextStartDate()
public java.util.Date getStartDate()
public java.util.Date getEndDate()
public double getSampleRate()
public java.lang.String getStation()
public java.lang.String getNetwork()
public java.lang.String getChannel()
public java.lang.String formatNSLCCodes()
public java.lang.String getLocId()
public java.lang.String getVersion()
public java.lang.String getDataType()
public short getQuality()
public short getPad()
public short[] getShortData()
public int[] getIntData()
public float[] getFloatData()
public double[] getDoubleData()
public byte getSeedEncoding()
public byte[] toByteArray() throws java.io.IOException
java.io.IOException
public edu.iris.dmc.seedcodec.SteimFrameBlock encodeSteim1(int recLenExp) throws SeedFormatException
recLenExp
- power of 2 for record size, generally 8-12SeedFormatException
- if data is not integer or compression errors occurpublic edu.iris.dmc.seedcodec.SteimFrameBlock encodeSteim1(int recLenExp, int offset) throws SeedFormatException
recLenExp
- power of 2 for record size, generally 8-12offset
- starting point for encoding, first sample to useSeedFormatException
- if data is not integer or compression errors occurpublic edu.iris.dmc.seedcodec.SteimFrameBlock encodeSteim2(int recLenExp) throws SeedFormatException
recLenExp
- power of 2 for record size, generally 8-12SeedFormatException
- if data is not integer or compression errors occurpublic edu.iris.dmc.seedcodec.SteimFrameBlock encodeSteim2(int recLenExp, int offset) throws SeedFormatException
recLenExp
- power of 2 for record size, generally 8-12offset
- starting point for encoding, first sample to useSeedFormatException
- if data is not integer or compression errors occur@Deprecated public java.util.List<DataRecord> toMiniSeed(int recLenExp, boolean doSteim1) throws SeedFormatException
recLenExp
- power of 2 for record size, generally 8-12doSteim1
- if Steim1 compression should be appliedSeedFormatException
public static void checkRecordLengthExp(int recLenExp)
public java.util.List<DataRecord> toMiniSeedNoCompression(int recLenExp) throws SeedFormatException
SeedFormatException
public java.util.List<DataRecord> toMiniSeed(int recLenExp, int compressionType) throws SeedFormatException
SeedFormatException
public DataRecord toMiniSeedNoSplit(int recLenExp, boolean steim1) throws SeedFormatException
SeedFormatException
public int getSize()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringWithData()