|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--SDDS.java.SDDS.SDDSParameter
The SDDS Parameter object is used by the SDDS File object. It was not the intention of the author to use this object directly but it is still supported. After initializing the SDDS Parameter the setupParameter method must be used to give the parameter a name and a valid data type (long, short, float, double, string, character). The setValue method is used next to give the parameter values for different pages. The writeValue method can be used to print the value for a particular page.
| Constructor Summary | |
SDDSParameter()
Create a new SDDS parameter that can be used to store parameter information for SDDS files. |
|
| Method Summary | |
boolean |
deletePage(int page)
Delete a page at the specified index |
java.lang.String |
getDescription()
Returns the description of the parameter |
java.lang.String |
getFixed_Value()
Returns the fixed value of the parameter |
java.lang.String |
getFormat_String()
Returns the format string of the parameter |
java.lang.String |
getName()
Returns the name of the parameter |
int |
getPageCount()
Returns the number of pages that the parameter contains |
java.lang.String |
getSymbol()
Returns the symbol of the parameter |
int |
getType()
Returns the type of the parameter |
java.lang.String |
getUnits()
Returns the units of the parameter |
java.lang.Object |
getValue(int page,
boolean string_quotes)
Get the values of the parameter for a chosen page |
boolean |
insertPage(int page)
Inserts a blank page at the specified index |
void |
makeBlankPages(int lastpage)
Create blank pages up to the last page specified |
void |
setDescription(java.lang.String description)
Set the parameter description |
void |
setFixed_Value(java.lang.String fixed_value)
Set the fixed value of the parameter |
void |
setFormat_String(java.lang.String format_string)
Set the parameter format string |
void |
setName(java.lang.String name)
Set the parameter name |
void |
setSymbol(java.lang.String symbol)
Set the parameter symbol |
void |
setUnits(java.lang.String units)
Set the parameter units |
void |
setupParameter(java.lang.String name,
java.lang.String symbol,
java.lang.String units,
java.lang.String description,
java.lang.String format_string,
int type,
java.lang.String fixed_value)
Set up the parameter information. |
void |
setValue(double value,
int page)
Set the value of the parameter at a chosen page |
void |
setValue(long value,
int page)
Set the value of the parameter at a chosen page |
void |
setValue(java.lang.String value,
int page)
Set the value of the parameter at a chosen page |
boolean |
writeHeader(java.io.DataOutputStream dos)
Write the header to a file. |
boolean |
writeValue(java.io.DataOutputStream dos,
int page,
boolean ascii)
Write the value of the parameter for a chosen page |
boolean |
writeValue(SDDS.java.SDDS.LEDataOutputStream ledos,
int page)
Write the little endian binary value of the parameter for a chosen page |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SDDSParameter()
| Method Detail |
public void setupParameter(java.lang.String name,
java.lang.String symbol,
java.lang.String units,
java.lang.String description,
java.lang.String format_string,
int type,
java.lang.String fixed_value)
name - should be a valid name as defined by
SDDSUtil.isValidNamesymbol - may be nullunits - may be nulldescription - may be nullformat_string - may be nulltype - valid values are:
1 for double2 for float3 for long4 for short5 for string6 for characterfixed_value - may be nullpublic java.lang.String getName()
String value of the parameter name.public void setName(java.lang.String name)
name - name of the parameterpublic java.lang.String getSymbol()
String value of the parameter symbol.public void setSymbol(java.lang.String symbol)
symbol - symbol of the parameterpublic java.lang.String getUnits()
String value of the parameter units.public void setUnits(java.lang.String units)
units - units of the parameterpublic java.lang.String getDescription()
String value of the parameter description.public void setDescription(java.lang.String description)
description - description of the parameterpublic java.lang.String getFormat_String()
String value of the parameter format string.public void setFormat_String(java.lang.String format_string)
format_string - format string of the parameterpublic int getType()
int value of the parameter type.public java.lang.String getFixed_Value()
String value of the parameter fixed value.public void setFixed_Value(java.lang.String fixed_value)
fixed_value - fixed_value of the parameterpublic int getPageCount()
int value of the number of pages the parameter contains.public boolean insertPage(int page)
page - index of page to create inserttrue on successfalse on error.public boolean deletePage(int page)
page - index of page to deletetrue on successfalse on error.public void makeBlankPages(int lastpage)
lastpage - last page to create blank page
public void setValue(long value,
int page)
value - a long precision numberpage - the page of the parameter, must be greater then 0
public void setValue(double value,
int page)
value - a double precision floating-point numberpage - the page of the parameter, must be greater then 0
public void setValue(java.lang.String value,
int page)
value - a string valuepage - the page of the parameter, must be greater then 0public boolean writeHeader(java.io.DataOutputStream dos)
dos - a valid DataOutputStreamtrue if the header was successfully writtenfalse if an error occured
public boolean writeValue(java.io.DataOutputStream dos,
int page,
boolean ascii)
dos - a valid DataOutputStreampage - the page of the parameter, must be greater then 0ascii - set true to write ascii parameters,
false to write big endian binary parameterstrue if the value was successfully writtenfalse if an invalid page was encountered or if
the parameter type is undefined.
public boolean writeValue(SDDS.java.SDDS.LEDataOutputStream ledos,
int page)
ledos - a valid LEDataOutputStreampage - the page of the parameter, must be greater then 0true if the value was successfully writtenfalse if an invalid page was encountered or if
the parameter type is undefined.
public java.lang.Object getValue(int page,
boolean string_quotes)
page - the page of the parameter, must be greater then 0string_quotes - true if quotes are to be added around stringsfalse if raw strings are to be outputed.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||