public class RpcIIIFileDataObserver extends RpcIIIDataObserver
Modifier and Type | Field and Description |
---|---|
protected int |
blockSize |
protected java.nio.Buffer |
buffer |
protected int |
currentBlockOffset |
protected java.nio.channels.FileChannel |
fileChannel |
protected java.lang.String |
filename |
protected RpcIIIHeader |
hdr |
protected java.nio.MappedByteBuffer |
mappedByteBuffer |
protected int |
offset |
protected int |
position |
protected int |
pts_per_frame |
protected int |
pts_per_group |
protected java.io.RandomAccessFile |
raf |
protected double[] |
scale |
protected java.lang.Object[] |
valScale |
protected static int |
VALUE_SIZE |
Constructor and Description |
---|
RpcIIIFileDataObserver(java.lang.String fileSpec)
The constructor that receives the filename specification.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
protected int |
getBlockSize()
Get the block size.
|
boolean |
getBYPASS_FILTER()
Get the BYPASS_FILTER value.
|
int |
getChannelLength()
Get the length of a channel.
|
java.lang.String[] |
getChannelMap()
Get the channel map.
|
java.lang.String[] |
getChannelName()
Get the channel names of all channels.
|
java.lang.String |
getChannelName(int index)
Get the channel name.
|
java.lang.String[] |
getChannelNumber()
Get the channel number of all channels.
|
java.lang.String |
getChannelNumber(int index)
Get the channel number.
|
int |
getCHANNELS()
Get the CHANNELS value.
|
java.lang.String |
getDATA_TYPE()
Get the DATA_TYPE value.
|
protected int |
getDataSizeInByte()
Get the size of data in bytes.
|
java.util.Date |
getDATE()
Get the DATE value.
|
double |
getDELTA_T()
Get the DELTA_T value.
|
java.lang.String[] |
getDescription()
Get the description of all channels.
|
java.lang.String |
getFILE_TYPE()
Get the FILE_TYPE value.
|
java.lang.String |
getFORMAT()
Get the FORMAT value.
|
int |
getFRAMES()
Get the total number of frames.
|
boolean |
getHALF_FRAMES()
Get the HALF_FRAMES value.
|
java.lang.String |
getIdent()
Get the ident of the observer.
|
int |
getINT_FULL_SCALE()
Get the INT_FULL_SCALE value.
|
double[] |
getLowerLimit()
Get the lower limit of all channels.
|
double |
getLowerLimit(int index)
Get the lower limit of one channels.
|
java.lang.String |
getOPERATION()
Get the OPERATION string.
|
java.lang.String[] |
getPARENT()
Get all parents.
|
java.lang.String[] |
getPartitionChannel()
Get the first channels of the partitions.
|
java.lang.String[] |
getPartitionNChannel()
Get the totla number of channels of the partitions.
|
int |
getPARTITIONS()
Get the PARTITIONS string.
|
int |
getPTS_PER_FRAME()
Get the total number of points per frame.
|
int |
getPTS_PER_GROUP()
Get the total number of points per group.
|
int |
getREPEATS()
Get the REPEATS string.
|
double[] |
getScale()
Get the scale of all channels.
|
double |
getScale(int index)
Get the scale of one channels.
|
java.lang.String |
getTIME_TYPE()
Get the TIME_TYPE string.
|
java.lang.String[] |
getUnit()
Get the unit of all channels.
|
java.lang.String |
getUnit(int channel)
Get the unit of channel.
|
double[] |
getUpperLimit()
Get the upper limit of all channels.
|
double |
getUpperLimit(int index)
Get the upper limit of one channels.
|
double |
getValueAt(int channel,
int index)
Get a specifiy value of one channel.
|
double[] |
getValues(int channel)
Get all values belongs to one channel.
|
protected void |
initializeFile()
Initialize the file access.
|
static void |
main(java.lang.String[] args) |
protected int |
seek(int channel,
int index)
Seek to the position of the current index.
|
protected static final int VALUE_SIZE
protected java.lang.String filename
protected RpcIIIHeader hdr
protected java.io.RandomAccessFile raf
protected int position
protected int offset
protected int blockSize
protected int pts_per_frame
protected int pts_per_group
protected double[] scale
protected java.lang.Object[] valScale
protected java.nio.channels.FileChannel fileChannel
protected java.nio.MappedByteBuffer mappedByteBuffer
protected java.nio.Buffer buffer
protected int currentBlockOffset
public RpcIIIFileDataObserver(java.lang.String fileSpec) throws java.io.IOException
fileSpec
- the filename.java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String getIdent()
getIdent
in class RpcIIIDataObserver
public boolean getBYPASS_FILTER()
getBYPASS_FILTER
in interface RpcIIIDataObserverIF
getBYPASS_FILTER
in class RpcIIIDataObserver
public int getCHANNELS()
getCHANNELS
in interface RpcIIIDataObserverIF
getCHANNELS
in class RpcIIIDataObserver
public java.lang.String getDATA_TYPE()
getDATA_TYPE
in interface RpcIIIDataObserverIF
getDATA_TYPE
in class RpcIIIDataObserver
public java.util.Date getDATE()
getDATE
in interface RpcIIIDataObserverIF
getDATE
in class RpcIIIDataObserver
public double getDELTA_T()
getDELTA_T
in interface RpcIIIDataObserverIF
getDELTA_T
in class RpcIIIDataObserver
public java.lang.String getFILE_TYPE()
getFILE_TYPE
in interface RpcIIIDataObserverIF
getFILE_TYPE
in class RpcIIIDataObserver
public java.lang.String getFORMAT()
getFORMAT
in interface RpcIIIDataObserverIF
getFORMAT
in class RpcIIIDataObserver
public int getFRAMES()
getFRAMES
in interface RpcIIIDataObserverIF
getFRAMES
in class RpcIIIDataObserver
public boolean getHALF_FRAMES()
getHALF_FRAMES
in interface RpcIIIDataObserverIF
getHALF_FRAMES
in class RpcIIIDataObserver
public int getINT_FULL_SCALE()
getINT_FULL_SCALE
in interface RpcIIIDataObserverIF
getINT_FULL_SCALE
in class RpcIIIDataObserver
public java.lang.String getOPERATION()
getOPERATION
in interface RpcIIIDataObserverIF
getOPERATION
in class RpcIIIDataObserver
public int getPARTITIONS()
getPARTITIONS
in interface RpcIIIDataObserverIF
getPARTITIONS
in class RpcIIIDataObserver
public int getREPEATS()
getREPEATS
in interface RpcIIIDataObserverIF
getREPEATS
in class RpcIIIDataObserver
public java.lang.String getTIME_TYPE()
getTIME_TYPE
in interface RpcIIIDataObserverIF
getTIME_TYPE
in class RpcIIIDataObserver
public int getPTS_PER_FRAME()
getPTS_PER_FRAME
in interface RpcIIIDataObserverIF
getPTS_PER_FRAME
in class RpcIIIDataObserver
public int getPTS_PER_GROUP()
getPTS_PER_GROUP
in interface RpcIIIDataObserverIF
getPTS_PER_GROUP
in class RpcIIIDataObserver
public java.lang.String[] getPARENT()
getPARENT
in interface RpcIIIDataObserverIF
getPARENT
in class RpcIIIDataObserver
public java.lang.String[] getDescription()
getDescription
in class RpcIIIDataObserver
public double[] getScale()
getScale
in class RpcIIIDataObserver
public double getScale(int index)
index
- tha index of the channel.public double[] getLowerLimit()
getLowerLimit
in class RpcIIIDataObserver
public double getLowerLimit(int index)
index
- tha index of the channel.public double[] getUpperLimit()
getUpperLimit
in class RpcIIIDataObserver
public double getUpperLimit(int index)
index
- tha index of the channel.public java.lang.String[] getChannelNumber()
getChannelNumber
in class RpcIIIDataObserver
public java.lang.String getChannelNumber(int index)
getChannelNumber
in class RpcIIIDataObserver
index
- the channel index.public java.lang.String[] getChannelName()
getChannelName
in class RpcIIIDataObserver
public java.lang.String getChannelName(int index)
getChannelName
in class RpcIIIDataObserver
index
- the channel index.public java.lang.String[] getUnit()
getUnit
in class RpcIIIDataObserver
public java.lang.String getUnit(int channel)
getUnit
in class RpcIIIDataObserver
channel
- the channel index.public java.lang.String[] getPartitionChannel()
getPartitionChannel
in class RpcIIIDataObserver
public java.lang.String[] getPartitionNChannel()
getPartitionNChannel
in class RpcIIIDataObserver
public java.lang.String[] getChannelMap()
getChannelMap
in class RpcIIIDataObserver
public int getChannelLength() throws java.lang.Exception
getChannelLength
in class RpcIIIDataObserver
java.lang.Exception
protected void initializeFile()
protected int seek(int channel, int index) throws java.lang.Exception
channel
- the channel index.index
- The index of the value.java.lang.Exception
protected int getDataSizeInByte()
protected int getBlockSize()
public double getValueAt(int channel, int index) throws java.lang.Exception
getValueAt
in class RpcIIIDataObserver
channel
- the channel index.index
- the value index.java.lang.Exception
public double[] getValues(int channel) throws java.lang.Exception
getValues
in class RpcIIIDataObserver
channel
- the channel index.value
- the value index.java.lang.Exception
public static void main(java.lang.String[] args)