public class RpcIIIHeader extends Fwk
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
BLOCKSIZE |
protected java.lang.String[] |
channelNames |
protected java.lang.String[] |
channelNumbers |
static java.lang.String[] |
DATA_TYPE |
static java.text.SimpleDateFormat |
DATE_FORMATTER |
static java.lang.String[] |
FILE_TYPE |
static java.lang.String[] |
FORMATS |
static int |
INT_FULL_SCALE |
static int |
KEYWORDSIZE |
static int |
MAXHEADERBLOCKS |
protected java.lang.String |
name |
static int |
PARTITIONS |
protected FwkPropertyGroupInterface |
propertyGroup |
static int[] |
PTS_PER_FRAME |
static int |
RECORDSIZE |
static int |
REPEATS |
protected java.lang.String |
spec |
static java.lang.String[] |
TIME_TYPES |
static int |
VALUESIZE |
static java.lang.String |
version |
Modifier | Constructor and Description |
---|---|
protected |
RpcIIIHeader() |
|
RpcIIIHeader(java.lang.String spec)
The constructor receiving the file or URL specification of a file
containing the RPCIII header.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(double val)
Format a double string value.
|
java.lang.String |
getBYPASS_FILTER()
Get the BYPASS_FILTER value.
|
java.lang.String[] |
getChannelMap()
Get the channel map.
|
java.lang.String |
getChannelMap(int index)
Get the Map entry belongs to the given channel.
|
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.
|
java.lang.String |
getCHANNELS()
Get the CHANNELS value.
|
java.lang.String |
getDATA_TYPE()
Get the DATA_TYPE value.
|
java.lang.String |
getDATE()
Get the DATE value.
|
java.lang.String |
getDELTA_T()
Get the DELTA_T value.
|
java.lang.String[] |
getDescription()
Get the description of all channels.
|
java.lang.String |
getDescription(int index)
Get the description of the channel specified by the index (start at 0).
|
java.lang.String |
getFILE_TYPE()
Get the FILE_TYPE value.
|
java.lang.String |
getFilename()
Get the filename of the file.
|
java.lang.String |
getFORMAT()
Get the FORMAT value.
|
java.lang.String |
getFRAMES()
Get the total number of frames.
|
java.lang.String |
getHALF_FRAMES()
Get the HALF_FRAMES value.
|
java.lang.String |
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 the channel specified by the index (start at 0).
|
java.lang.String |
getNUM_HEADER_BLOCKS()
Get the total number of header blocks NUM_HEADER_BLOCKS.
|
java.lang.String |
getNUM_PARAMS()
Get the total number of parameters in header NUM_PARAMS.
|
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 |
getPartitionChannel(int index)
Get the first channel of the partition specified by the index (start at 0).
|
java.lang.String[] |
getPartitionNChannel()
Get the totla number of channels of the partitions.
|
java.lang.String |
getPartitionNChannel(int index)
Get the total number of channel in the partition specified by the index (start at 0).
|
java.lang.String |
getPARTITIONS()
Get the PARTITIONS string.
|
java.lang.String |
getPTS_PER_FRAME()
Get the total number of points per frame.
|
java.lang.String |
getPTS_PER_GROUP()
Get the total number of points per group.
|
java.lang.String |
getREPEATS()
Get the REPEATS string.
|
double[] |
getScale()
Get the scale of all channels.
|
double |
getScale(int index)
Get the scale of the channel specified by the index (start at 0).
|
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 index)
Get the unit of the channel specified by the index (start at 0).
|
double[] |
getUpperLimit()
Get the upper limit of all channels.
|
double |
getUpperLimit(int index)
Get the upper limit of the channel specified by the index (start at 0).
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
void |
init()
Initialize the header with the defaults.
|
protected void |
initializeNumberNames()
Initialize the channel names and numbers.
|
static void |
main(java.lang.String[] args)
Main module of this application.
|
void |
read(java.io.InputStream is)
Read the header from input stream.
|
void |
setBYPASS_FILTER(boolean flag)
Set the HALF_FRAMES value.
|
void |
setBYPASS_FILTER(java.lang.String flag)
Set the BYPASS_FILTER value.
|
void |
setChannelMap(int[] entries)
Set the all channel map entries.
|
void |
setChannelMap(int index,
int count)
Set the map entry for the given channel index.
|
void |
setCHANNELS(int num)
Set the CHANNELS value.
|
void |
setCHANNELS(java.lang.String val)
Set the CHANNELS value.
|
void |
setDATA_TYPE(java.lang.String type)
Set the DATA_TYPE value.
|
void |
setDATE(java.util.Date date)
Set the DATE value.
|
void |
setDATE(java.lang.String date)
Set the DATE value.
|
void |
setDELTA_T(double delta)
Set the DELTA_T value.
|
void |
setDELTA_T(java.lang.String delta)
Set the DELTA_T value.
|
void |
setDescription(int index,
java.lang.String desc)
Set the description of the channel specified by the index (start at 0).
|
void |
setDescription(int index,
java.lang.String[] name,
java.lang.String[] no)
Set the description of all channels.
|
void |
setDescription(int index,
java.lang.String name,
java.lang.String no)
Set the description of the channel specified by the index (start at 0).
|
void |
setDescription(java.lang.String[] desc)
Set the description of all channel.
|
void |
setFILE_TYPE(java.lang.String type)
Set the FILE_TYPE value.
|
void |
setFORMAT(java.lang.String format)
Set the FORMAT value.
|
void |
setFRAMES(int val)
Set the total number of header blocks FRAMES.
|
void |
setFRAMES(java.lang.String val)
Set the total number of header blocks NUM_PARAMS.
|
void |
setHALF_FRAMES(boolean flag)
Set the HALF_FRAMES value.
|
void |
setHALF_FRAMES(java.lang.String flag)
Set the HALF_FRAMES value.
|
void |
setINT_FULL_SCALE(int val)
Set the total number of header blocks INT_FULL_SCALE.
|
void |
setINT_FULL_SCALE(java.lang.String val)
Set the total number of header blocks INT_FULL_SCALE.
|
void |
setLowerLimit(double[] ll)
Set the lower limit of all channel.
|
void |
setLowerLimit(int index,
double ll)
Set the lower limit of the channel specified by the index (start at 0).
|
void |
setNUM_HEADER_BLOCKS(int val)
Set the total number of header blocks NUM_HEADER_BLOCKS.
|
void |
setNUM_HEADER_BLOCKS(java.lang.String val)
Set the total number of header blocks NUM_PARAMS.
|
void |
setNUM_PARAMS(int val)
Set the total number of header blocks NUM_PARAMS.
|
void |
setNUM_PARAMS(java.lang.String val)
Set the total number of header blocks NUM_PARAMS.
|
void |
setOPERATION(java.lang.String val)
Set the OPERATION string.
|
void |
setPARENT(java.lang.String[] parents)
Set all parents.
|
void |
setPartitionChannel(int[] chan)
Set the first channels of all partitions.
|
void |
setPartitionChannel(int index,
int chan)
Set the first channel of the partition specified by the index (start at 0).
|
void |
setPartitionNChannel(int[] counts)
Set the total number of channels of all partitions.
|
void |
setPartitionNChannel(int index,
int count)
Set the total number of channels inside the partition specified by the index (start at 0).
|
void |
setPARTITIONS(int val)
Set the PARTITIONS string.
|
void |
setPARTITIONS(java.lang.String val)
Set the PARTITIONS string.
|
void |
setPTS_PER_FRAME(int num)
Set the total number of points per frame.
|
void |
setPTS_PER_FRAME(java.lang.String num)
Set the total number of points per frame.
|
void |
setPTS_PER_GROUP(int num)
Set the total number of points per group.
|
void |
setPTS_PER_GROUP(java.lang.String num)
Set the total number of points per group.
|
void |
setREPEATS(int val)
Set the REPEATS value.
|
void |
setREPEATS(java.lang.String val)
Set the REPEATS value.
|
void |
setScale(double[] desc)
Set the scale of all channel.
|
void |
setScale(int index,
double scale)
Set the scale of the channel specified by the index (start at 0).
|
void |
setTIME_TYPE(java.lang.String type)
Set the TIME_TYPE string.
|
void |
setUnit(int index,
java.lang.String unit)
Set the unit of the channel specified by the index (start at 0).
|
void |
setUnit(java.lang.String[] unit)
Set the unit of all channel.
|
void |
setUpperLimit(double[] ul)
Set the upper limit of all channel.
|
void |
setUpperLimit(int index,
double ul)
Set the upper limit of the channel specified by the index (start at 0).
|
java.lang.String |
toString()
Print out the string presentation of the class.
|
getNiceVersion, release
public static final int MAXHEADERBLOCKS
public static final int BLOCKSIZE
public static final int RECORDSIZE
public static final int KEYWORDSIZE
public static final int VALUESIZE
public static final int INT_FULL_SCALE
public static final int PARTITIONS
public static final int REPEATS
public static final int[] PTS_PER_FRAME
public static final java.lang.String[] TIME_TYPES
public static final java.lang.String[] FORMATS
public static final java.lang.String[] FILE_TYPE
public static final java.lang.String[] DATA_TYPE
public static final java.text.SimpleDateFormat DATE_FORMATTER
public static final java.lang.String version
protected FwkPropertyGroupInterface propertyGroup
protected java.lang.String spec
protected java.lang.String name
protected java.lang.String[] channelNumbers
protected java.lang.String[] channelNames
protected RpcIIIHeader()
public RpcIIIHeader(java.lang.String spec) throws java.io.IOException, java.io.FileNotFoundException
spec
- the resource location of the header.java.io.IOException
java.io.FileNotFoundException
public java.lang.String getVersion()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class Fwk
public void init()
public java.lang.String getFilename()
public void read(java.io.InputStream is)
is
- the input stream.public java.lang.String getBYPASS_FILTER()
public void setBYPASS_FILTER(java.lang.String flag)
flag
- true to set bypass filter behaviour.public void setBYPASS_FILTER(boolean flag)
flag
- true to set bypass filter behaviour.public java.lang.String getCHANNELS()
public void setCHANNELS(int num)
num
- the total number of channels.public void setCHANNELS(java.lang.String val)
val
- the value.public java.lang.String getDATA_TYPE()
public void setDATA_TYPE(java.lang.String type)
type
- the DATA_TYPE string.public java.lang.String getDATE()
public void setDATE(java.util.Date date)
date
- the date.public void setDATE(java.lang.String date)
date
- the date string.public java.lang.String getDELTA_T()
public void setDELTA_T(double delta)
val
- the time delta.public void setDELTA_T(java.lang.String delta)
val
- the time delta.public java.lang.String getFILE_TYPE()
public void setFILE_TYPE(java.lang.String type)
type
- the FILE_TYPE string.public java.lang.String getFORMAT()
public void setFORMAT(java.lang.String format)
format
- the format string.public java.lang.String getFRAMES()
public void setFRAMES(int val)
val
- the value.public void setFRAMES(java.lang.String val)
val
- the value.public java.lang.String getHALF_FRAMES()
public void setHALF_FRAMES(java.lang.String flag)
flag
- true to set HALF Frame behaviourpublic void setHALF_FRAMES(boolean flag)
flag
- true to set HALF Frame behaviourpublic java.lang.String getINT_FULL_SCALE()
public void setINT_FULL_SCALE(int val)
val
- the value.public void setINT_FULL_SCALE(java.lang.String val)
val
- the value.public java.lang.String getNUM_HEADER_BLOCKS()
public void setNUM_HEADER_BLOCKS(int val)
val
- the value.public void setNUM_HEADER_BLOCKS(java.lang.String val)
val
- the value.public java.lang.String getNUM_PARAMS()
public void setNUM_PARAMS(int val)
val
- the value.public void setNUM_PARAMS(java.lang.String val)
val
- the value.public java.lang.String getOPERATION()
public void setOPERATION(java.lang.String val)
val
- the operation value.public java.lang.String getPARTITIONS()
public void setPARTITIONS(int val)
val
- the value.public void setPARTITIONS(java.lang.String val)
val
- the value.public java.lang.String getREPEATS()
public void setREPEATS(int val)
val
- the value.public void setREPEATS(java.lang.String val)
val
- the value.public java.lang.String getTIME_TYPE()
public void setTIME_TYPE(java.lang.String type)
type
- the type string.public java.lang.String getPTS_PER_FRAME()
public void setPTS_PER_FRAME(int num)
num
- the total number of points.public void setPTS_PER_FRAME(java.lang.String num)
num
- the total number of points.public java.lang.String getPTS_PER_GROUP()
public void setPTS_PER_GROUP(int num)
num
- the total number of points.public void setPTS_PER_GROUP(java.lang.String num)
num
- the total number of points.public java.lang.String[] getPARENT()
public void setPARENT(java.lang.String[] parents)
parents
- The strin garray containing all parentspublic java.lang.String[] getDescription()
public java.lang.String getDescription(int index)
index
- the channel index.public void setDescription(int index, java.lang.String desc)
index
- the channel index.desc
- the channel description.public void setDescription(int index, java.lang.String name, java.lang.String no)
index
- the channel index.name
- the name of the channel.no
- the number of the channel.public void setDescription(int index, java.lang.String[] name, java.lang.String[] no)
index
- the channel index.name
- the names of the channel.no
- the numbers of the channel.public void setDescription(java.lang.String[] desc)
desc
- the array containing channel description.public double[] getScale()
public double getScale(int index)
index
- the channel index.public void setScale(int index, double scale)
index
- the channel index.desc
- the channel scale.public void setScale(double[] desc)
desc
- the array containing channel scale.public double[] getLowerLimit()
public double getLowerLimit(int index)
index
- the channel index.public void setLowerLimit(int index, double ll)
index
- the channel index.ll
- the channel lower limit.public void setLowerLimit(double[] ll)
ll
- the array containing channel lower limit.public double[] getUpperLimit()
public double getUpperLimit(int index)
index
- the channel index.public void setUpperLimit(int index, double ul)
index
- the channel index.ul
- the channel upper limit.public void setUpperLimit(double[] ul)
ul
- the array containing channel upper limit.public java.lang.String[] getUnit()
public java.lang.String getUnit(int index)
index
- the channel index.protected void initializeNumberNames()
public java.lang.String[] getChannelNumber()
public java.lang.String getChannelNumber(int index)
index
- the channel index.public java.lang.String[] getChannelName()
public java.lang.String getChannelName(int index)
index
- the channel index.public void setUnit(int index, java.lang.String unit)
index
- the channel index.desc
- the channel unit.public void setUnit(java.lang.String[] unit)
desc
- the array containing channel unit.public java.lang.String[] getPartitionChannel()
public java.lang.String getPartitionChannel(int index)
index
- the partition index.public void setPartitionChannel(int index, int chan)
index
- the partition index.chan
- the channel.public void setPartitionChannel(int[] chan)
chan
- the array containing channels.public java.lang.String[] getPartitionNChannel()
public java.lang.String getPartitionNChannel(int index)
index
- the partition index.public void setPartitionNChannel(int index, int count)
index
- the partition index.count
- the channel count.public void setPartitionNChannel(int[] counts)
counts
- the array containing channels counts.public java.lang.String[] getChannelMap()
public java.lang.String getChannelMap(int index)
index
- the channel index.public void setChannelMap(int index, int count)
index
- the partition index.count
- the channel count.public void setChannelMap(int[] entries)
entries
- the map entries.public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String format(double val)
val
- the value.public static void main(java.lang.String[] args)