public abstract class QdsToD2sStream
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
QdsToD2sStream.PacketXferInfo |
protected static class |
QdsToD2sStream.QdsXferInfo
Determine and hold the information needed to transfer values out of a
given QDataSet into a byte buffer.
|
protected static class |
QdsToD2sStream.Sequence1D |
Modifier and Type | Field and Description |
---|---|
protected boolean |
bBinary |
static int |
DEFAUT_FRAC_SEC |
static int |
DEFAUT_SIG_DIGIT |
static int |
FIXED_PKT_TAGS |
static java.lang.String |
FORMAT_2_2 |
static java.lang.String |
FORMAT_2_3_BASIC |
static java.lang.String |
FORMAT_2_4_GENERAL |
static java.lang.String[] |
formats |
protected int |
nSecDigit |
protected int |
nSigDigit |
static int |
VAR_PKT_TAGS |
Constructor and Description |
---|
QdsToD2sStream()
Initialize a binary QDataSet to das2 stream exporter
|
QdsToD2sStream(int genSigDigits,
int fracSecDigits)
Initialize a text QDataSet to das2 stream exporter
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
_stripDotProps(QDataSet qds) |
abstract boolean |
canWrite(QDataSet qds)
Determine if the given dataset can be written
|
protected int |
copySimpleProps(MutablePropertyDataSet dsDest,
QDataSet dsSrc)
Only copy over the simple properties of a dataset, ignore the structural
items such as depend, offset, axis, reference, bundle etc.
|
static java.lang.String |
getQdsAxis(QDataSet qds)
Determine the name of the das2 axis on which values from a dataset
would typically be plotted.
|
protected QdsToD2sStream.Sequence1D |
getSequenceRank1(QDataSet qds,
double rMaxJitter)
Determine if a rank 1 dataset is really just a sequence
|
protected java.lang.String |
makeNameFromUnits(Units units) |
protected org.w3c.dom.Document |
newXmlDoc() |
abstract boolean |
write(QDataSet qds,
java.io.OutputStream os)
Write the given dataset
|
protected void |
writeData(java.io.OutputStream out,
int nTagType,
int iPktId,
QdsToD2sStream.PacketXferInfo pktXfer) |
public static final java.lang.String FORMAT_2_2
public static final java.lang.String FORMAT_2_3_BASIC
public static final java.lang.String FORMAT_2_4_GENERAL
public static final java.lang.String[] formats
public static final int DEFAUT_FRAC_SEC
public static final int DEFAUT_SIG_DIGIT
public static final int FIXED_PKT_TAGS
public static final int VAR_PKT_TAGS
protected int nSigDigit
protected int nSecDigit
protected boolean bBinary
public QdsToD2sStream()
public QdsToD2sStream(int genSigDigits, int fracSecDigits)
genSigDigits
- The number of significant digits used for general
text value data output. If you don't know what else to use, 5 is
typically a fine precision without being ridiculous.fracSecDigits
- The number of fractional seconds digits to
use for ISO-8601 date-time values. The number of fraction seconds
can be set as low as 0 and as high as 12 (picoseconds). If
successive time values vary by less than the specified precision
(but not 0, repeats are accepted) then stream writing fails. Use 3 (i.e.
microseconds) if you don't know what else to choose.public abstract boolean canWrite(QDataSet qds)
qds
- public abstract boolean write(QDataSet qds, java.io.OutputStream os) throws java.io.IOException
qds
- os
- java.io.IOException
protected void writeData(java.io.OutputStream out, int nTagType, int iPktId, QdsToD2sStream.PacketXferInfo pktXfer) throws java.io.IOException
java.io.IOException
protected java.lang.String makeNameFromUnits(Units units)
protected boolean _stripDotProps(QDataSet qds)
protected org.w3c.dom.Document newXmlDoc()
protected QdsToD2sStream.Sequence1D getSequenceRank1(QDataSet qds, double rMaxJitter)
qds
- rMaxJitter
- Recommend 1e-4 if no other values comes to mindpublic static java.lang.String getQdsAxis(QDataSet qds)
qds
- protected int copySimpleProps(MutablePropertyDataSet dsDest, QDataSet dsSrc)
dsDest
- dsSrc
-