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.IOExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic java.lang.String getIdent()
getIdent in class RpcIIIDataObserverpublic boolean getBYPASS_FILTER()
getBYPASS_FILTER in interface RpcIIIDataObserverIFgetBYPASS_FILTER in class RpcIIIDataObserverpublic int getCHANNELS()
getCHANNELS in interface RpcIIIDataObserverIFgetCHANNELS in class RpcIIIDataObserverpublic java.lang.String getDATA_TYPE()
getDATA_TYPE in interface RpcIIIDataObserverIFgetDATA_TYPE in class RpcIIIDataObserverpublic java.util.Date getDATE()
getDATE in interface RpcIIIDataObserverIFgetDATE in class RpcIIIDataObserverpublic double getDELTA_T()
getDELTA_T in interface RpcIIIDataObserverIFgetDELTA_T in class RpcIIIDataObserverpublic java.lang.String getFILE_TYPE()
getFILE_TYPE in interface RpcIIIDataObserverIFgetFILE_TYPE in class RpcIIIDataObserverpublic java.lang.String getFORMAT()
getFORMAT in interface RpcIIIDataObserverIFgetFORMAT in class RpcIIIDataObserverpublic int getFRAMES()
getFRAMES in interface RpcIIIDataObserverIFgetFRAMES in class RpcIIIDataObserverpublic boolean getHALF_FRAMES()
getHALF_FRAMES in interface RpcIIIDataObserverIFgetHALF_FRAMES in class RpcIIIDataObserverpublic int getINT_FULL_SCALE()
getINT_FULL_SCALE in interface RpcIIIDataObserverIFgetINT_FULL_SCALE in class RpcIIIDataObserverpublic java.lang.String getOPERATION()
getOPERATION in interface RpcIIIDataObserverIFgetOPERATION in class RpcIIIDataObserverpublic int getPARTITIONS()
getPARTITIONS in interface RpcIIIDataObserverIFgetPARTITIONS in class RpcIIIDataObserverpublic int getREPEATS()
getREPEATS in interface RpcIIIDataObserverIFgetREPEATS in class RpcIIIDataObserverpublic java.lang.String getTIME_TYPE()
getTIME_TYPE in interface RpcIIIDataObserverIFgetTIME_TYPE in class RpcIIIDataObserverpublic int getPTS_PER_FRAME()
getPTS_PER_FRAME in interface RpcIIIDataObserverIFgetPTS_PER_FRAME in class RpcIIIDataObserverpublic int getPTS_PER_GROUP()
getPTS_PER_GROUP in interface RpcIIIDataObserverIFgetPTS_PER_GROUP in class RpcIIIDataObserverpublic java.lang.String[] getPARENT()
getPARENT in interface RpcIIIDataObserverIFgetPARENT in class RpcIIIDataObserverpublic java.lang.String[] getDescription()
getDescription in class RpcIIIDataObserverpublic double[] getScale()
getScale in class RpcIIIDataObserverpublic double getScale(int index)
index - tha index of the channel.public double[] getLowerLimit()
getLowerLimit in class RpcIIIDataObserverpublic double getLowerLimit(int index)
index - tha index of the channel.public double[] getUpperLimit()
getUpperLimit in class RpcIIIDataObserverpublic double getUpperLimit(int index)
index - tha index of the channel.public java.lang.String[] getChannelNumber()
getChannelNumber in class RpcIIIDataObserverpublic java.lang.String getChannelNumber(int index)
getChannelNumber in class RpcIIIDataObserverindex - the channel index.public java.lang.String[] getChannelName()
getChannelName in class RpcIIIDataObserverpublic java.lang.String getChannelName(int index)
getChannelName in class RpcIIIDataObserverindex - the channel index.public java.lang.String[] getUnit()
getUnit in class RpcIIIDataObserverpublic java.lang.String getUnit(int channel)
getUnit in class RpcIIIDataObserverchannel - the channel index.public java.lang.String[] getPartitionChannel()
getPartitionChannel in class RpcIIIDataObserverpublic java.lang.String[] getPartitionNChannel()
getPartitionNChannel in class RpcIIIDataObserverpublic java.lang.String[] getChannelMap()
getChannelMap in class RpcIIIDataObserverpublic int getChannelLength()
throws java.lang.Exception
getChannelLength in class RpcIIIDataObserverjava.lang.Exceptionprotected 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.Exceptionprotected int getDataSizeInByte()
protected int getBlockSize()
public double getValueAt(int channel,
int index)
throws java.lang.Exception
getValueAt in class RpcIIIDataObserverchannel - the channel index.index - the value index.java.lang.Exceptionpublic double[] getValues(int channel)
throws java.lang.Exception
getValues in class RpcIIIDataObserverchannel - the channel index.value - the value index.java.lang.Exceptionpublic static void main(java.lang.String[] args)