|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.db.EventDataAnalog
public class EventDataAnalog
EventDataAnalog class
Field Summary | |
---|---|
static CurveFit |
PROFILE_CYLINDER_CURVEFIT
|
static java.lang.String[] |
PROFILE_CYLINDER_NAME
|
static XYPair[] |
PROFILE_CYLINDER_XY
|
static CurveFit |
PROFILE_LINEAR_CURVEFIT
|
static java.lang.String[] |
PROFILE_LINEAR_NAME
|
static XYPair[] |
PROFILE_LINEAR_XY
|
static boolean |
USE_CURVEFIT
|
Constructor Summary | |
---|---|
EventDataAnalog(int ndx,
CurveFit cf)
CurveFit Constructor |
|
EventDataAnalog(int ndx,
CurveFit cf,
java.lang.String... fieldN)
CurveFit Constructor |
|
EventDataAnalog(int ndx,
double gain,
double offset)
Gain/Offset Constructor |
|
EventDataAnalog(int ndx,
double gain,
double offset,
java.lang.String... fieldN)
Gain/Offset Constructor |
|
EventDataAnalog(int ndx,
java.lang.String gof)
String Constructor |
|
EventDataAnalog(int ndx,
java.lang.String gof,
double dftGain,
double dftOffset)
String Constructor |
|
EventDataAnalog(int ndx,
XYPair[] api)
XYPair Constructor |
|
EventDataAnalog(int ndx,
XYPair[] api,
java.lang.String... fieldN)
XYPair Constructor |
Method Summary | |
---|---|
void |
addFieldNames(java.lang.String... fieldN)
Sets the EventData field name |
static double |
calculateAnalogValue(java.lang.String profStr,
double inpVal)
Gets the analog value based on the specified profile string |
double |
convert(double value)
Converts the specified analog value to the proper sensor value |
double |
convert(long value)
Converts the specified analog value to the proper sensor value |
static boolean |
convertSaveEventDataAnalogFieldValue(EventData evdb,
DCServerConfig dcsc,
int aNdx1,
java.util.Map<java.lang.String,EventDataAnalog> edaMap,
double value)
Get the EventDataAnalog instance for the specified DCServerConfig and Device. |
CurveFit |
getCurveFit()
Gets the contained CurveFit instance (may be null) |
java.lang.String |
getDCSPropertyID()
Gets the DCS Property ID (for informational/debug use only) |
static EventDataAnalog |
getEventDataAnalog(Device device,
DCServerConfig dcsc,
int aNdx1,
java.util.Map<java.lang.String,EventDataAnalog> edaMap)
Get the EventDataAnalog instance for the specified DCServerConfig and Device |
java.lang.String[] |
getFieldNames()
Gets an array of field names (returns an empty array if no fields are defined) |
double |
getGain()
Gets the Gain |
int |
getIndex()
Returns the Analog index (1-based) |
double |
getOffset()
Gets the Offset |
double |
getScale()
Gets the Scale |
java.lang.Object |
getValueObject(java.lang.String fieldN,
double value)
Converts/Gets the Object value for the specified field name. |
XYPair[] |
getXYPairProfile()
Gets the contained XYPair profile array (may be null) |
boolean |
hasCurveFit()
Returns true if this instance has a defined CurveFit |
boolean |
hasDCSPropertyID()
Returns true if this instance has a defined DCS Property ID |
boolean |
hasFieldName(java.lang.String fieldN)
Returns true this instance has the specified field name defined |
boolean |
hasScale()
Returns true if Scale is defined |
static java.util.Map<java.lang.String,EventDataAnalog> |
initEventDataAnalogMap(DCServerConfig dcsc,
java.lang.String keyPfx,
java.lang.Class<? extends EventDataAnalog> edaClass)
Initializes the DCS EventDataAnalog map. |
boolean |
isValid()
Returns true if this EventDataAnalog is valid |
static boolean |
isValid(EventDataAnalog eda)
Returns true if the specified EventDataAnalog is valid |
static void |
main(java.lang.String[] argv)
|
static EventDataAnalog |
newEventDataAnalog(java.lang.Class<? extends EventDataAnalog> edaClass,
int aNdx1,
java.lang.String alogStr)
Creates an instance of the EventDataAnalog subclass |
static void |
printEventDataAnalog(java.util.Map<java.lang.String,EventDataAnalog> edaMap,
int width)
Prints the defined Analog headers |
boolean |
saveEventDataFieldValue(EventData evdb,
double value)
Sets the EventData field to the specified value for the specified EventData instance |
double |
scaleValue(double val)
Scales the specified value |
void |
setDCSPropertyID(java.lang.String dcsPropID)
Sets the DCS Property ID (for informational/debug use only) |
void |
setFieldNames(java.lang.String... fieldN)
Sets the EventData field name |
void |
setGain(double gain)
Sets the Gain |
void |
setOffset(double offset)
Sets the Offset |
void |
setScale(double scale)
Sets the Scale |
java.lang.String |
toString()
Returns a String representation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean USE_CURVEFIT
public static final java.lang.String[] PROFILE_CYLINDER_NAME
public static final XYPair[] PROFILE_CYLINDER_XY
public static final CurveFit PROFILE_CYLINDER_CURVEFIT
public static final java.lang.String[] PROFILE_LINEAR_NAME
public static final XYPair[] PROFILE_LINEAR_XY
public static final CurveFit PROFILE_LINEAR_CURVEFIT
Constructor Detail |
---|
public EventDataAnalog(int ndx, double gain, double offset)
public EventDataAnalog(int ndx, double gain, double offset, java.lang.String... fieldN)
public EventDataAnalog(int ndx, XYPair[] api)
public EventDataAnalog(int ndx, XYPair[] api, java.lang.String... fieldN)
public EventDataAnalog(int ndx, CurveFit cf)
public EventDataAnalog(int ndx, CurveFit cf, java.lang.String... fieldN)
public EventDataAnalog(int ndx, java.lang.String gof)
public EventDataAnalog(int ndx, java.lang.String gof, double dftGain, double dftOffset)
Method Detail |
---|
public static EventDataAnalog newEventDataAnalog(java.lang.Class<? extends EventDataAnalog> edaClass, int aNdx1, java.lang.String alogStr)
edaClass
- The subclass of EventDataAnalog to instantiate (null for EventDataAnalog)aNdx1
- The 1-based index of this specific Analog sensoralogStr
- The analog configuration profilepublic static java.util.Map<java.lang.String,EventDataAnalog> initEventDataAnalogMap(DCServerConfig dcsc, java.lang.String keyPfx, java.lang.Class<? extends EventDataAnalog> edaClass)
public static EventDataAnalog getEventDataAnalog(Device device, DCServerConfig dcsc, int aNdx1, java.util.Map<java.lang.String,EventDataAnalog> edaMap)
device
- The Device instancedcsc
- The DCServerConfig instanceaNdx1
- The 1-based analog indexedaMap
- The map of EventDataAnalog instancespublic static boolean convertSaveEventDataAnalogFieldValue(EventData evdb, DCServerConfig dcsc, int aNdx1, java.util.Map<java.lang.String,EventDataAnalog> edaMap, double value)
evdb
- The EventData instance (ignored if this value is null)dcsc
- The DCServerConfig instanceaNdx1
- The 1-based analog index (ignored if this value is invalid)edaMap
- The map of EventDataAnalog instances (ignored if this value is null)value
- The value to set (ignored if this value is NaN)
public static void printEventDataAnalog(java.util.Map<java.lang.String,EventDataAnalog> edaMap, int width)
public static double calculateAnalogValue(java.lang.String profStr, double inpVal)
public void setDCSPropertyID(java.lang.String dcsPropID)
public java.lang.String getDCSPropertyID()
public boolean hasDCSPropertyID()
public int getIndex()
public boolean isValid()
public static boolean isValid(EventDataAnalog eda)
public XYPair[] getXYPairProfile()
public boolean hasCurveFit()
public CurveFit getCurveFit()
public void setScale(double scale)
public double getScale()
public boolean hasScale()
public double scaleValue(double val)
public void setGain(double gain)
public double getGain()
public void setOffset(double offset)
public double getOffset()
public double convert(long value)
public double convert(double value)
public void setFieldNames(java.lang.String... fieldN)
public void addFieldNames(java.lang.String... fieldN)
public java.lang.String[] getFieldNames()
public boolean hasFieldName(java.lang.String fieldN)
public java.lang.Object getValueObject(java.lang.String fieldN, double value)
public boolean saveEventDataFieldValue(EventData evdb, double value)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |