public abstract class HdbData extends Object
Constructor and Description |
---|
HdbData() |
Modifier and Type | Method and Description |
---|---|
abstract void |
applyConversionFactor(double f) |
HdbData |
copy() |
static HdbData |
createData(int type)
Create HdbData accroding to the given type
|
long |
getDataTime()
Return time of this datum
|
String |
getErrorMessage()
Returns error message if this record has failed
|
long |
getInsertTime()
Return receive time of this datum
|
int |
getQualityFactor()
Returns quality factor
|
long |
getRecvTime()
Return receive time of this datum
|
int |
getType()
Return data type
|
abstract double |
getValueAsDouble()
Returns the value as double if it can be converted.
|
abstract double[] |
getValueAsDoubleArray()
Returns the value as double array it can be converted.
|
abstract long |
getValueAsLong()
Returns the value as long if it can be converted.
|
abstract long[] |
getValueAsLongArray()
Returns the value as long array it can be converted.
|
abstract String |
getValueAsString()
Returns the value as a String
|
abstract double |
getWriteValueAsDouble()
Returns the write value as double if it can be converted.
|
abstract double[] |
getWriteValueAsDoubleArray()
Returns the write value as double array it can be converted.
|
abstract long |
getWriteValueAsLong()
Returns the write value as long if it can be converted.
|
abstract long[] |
getWriteValueAsLongArray()
Returns the write value as long array it can be converted.
|
abstract String |
getWriteValueAsString()
Returns the write value as a String
|
boolean |
hasFailed()
Returns true if this record has failed
|
boolean |
hasWriteValue()
Returns true whether this datum has a write value
|
boolean |
isArray()
Returns true whether this datum is an array
|
boolean |
isInvalid()
Returns true if this value is ATTR_INVALID
|
void |
parse(long data_time,
long recv_time,
long insert_time,
String error_desc,
int quality,
ArrayList<Object> value_r,
ArrayList<Object> value_w)
Parse value
|
abstract void |
parseValue(ArrayList<Object> value)
Parse value
|
abstract void |
parseWriteValue(ArrayList<Object> value)
Parse write value
|
String |
qualitytoStr(int quality) |
void |
setDataTime(long time)
Set the dataTime
|
void |
setRecvTime(long time)
Set the receive time
|
int |
size()
Return number of item of the read value of this HdbData (1 is returned in case of scalar data).
|
int |
sizeW()
Return number of item of the write value of this HdbData (1 is returned in case of scalar data).
|
String |
timeToStr(long time)
Return time representation of the give time (ex: 22/07/2015 08:12:15.718908)
|
public long getDataTime()
public void setDataTime(long time)
public long getRecvTime()
public void setRecvTime(long time)
public long getInsertTime()
public int getQualityFactor()
public int getType()
public boolean hasFailed()
public int size()
public int sizeW()
public String getErrorMessage()
public boolean hasWriteValue()
public boolean isArray()
public abstract double getValueAsDouble() throws HdbFailed
HdbFailed
- In case of failurepublic abstract double[] getValueAsDoubleArray() throws HdbFailed
HdbFailed
- In case of failurepublic abstract double getWriteValueAsDouble() throws HdbFailed
HdbFailed
- In case of failurepublic abstract double[] getWriteValueAsDoubleArray() throws HdbFailed
HdbFailed
- In case of failurepublic abstract long getValueAsLong() throws HdbFailed
HdbFailed
- In case of failurepublic abstract long[] getValueAsLongArray() throws HdbFailed
HdbFailed
- In case of failurepublic abstract long getWriteValueAsLong() throws HdbFailed
HdbFailed
- In case of failurepublic abstract long[] getWriteValueAsLongArray() throws HdbFailed
HdbFailed
- In case of failurepublic abstract void parseValue(ArrayList<Object> value) throws HdbFailed
value
- Value to be parsedHdbFailed
public abstract void parseWriteValue(ArrayList<Object> value) throws HdbFailed
value
- Value to be parsedHdbFailed
public abstract String getValueAsString()
public abstract String getWriteValueAsString()
public void parse(long data_time, long recv_time, long insert_time, String error_desc, int quality, ArrayList<Object> value_r, ArrayList<Object> value_w) throws HdbFailed
data_time
- Tango timestamprecv_time
- Event recieve timestampinsert_time
- Recording timestamperror_desc
- Error stringquality
- Quality valuevalue_r
- Read valuevalue_w
- Write valueHdbFailed
public String timeToStr(long time)
time
- Number of micro second since epochpublic boolean isInvalid()
public String qualitytoStr(int quality)
public abstract void applyConversionFactor(double f)
Copyright © 2017. All rights reserved.