Interface MeasurementDeviceInterface
- All Superinterfaces:
NamedInterface, ProcessElementInterface, Serializable
- All Known Implementing Classes:
CombustionEmissionsCalculator, CompressorMonitor, CricondenbarAnalyser, FireDetector, FlowInducedVibrationAnalyser, GasDetector, HydrateEquilibriumTemperatureAnalyser, HydrocarbonDewPointAnalyser, ImpurityMonitor, LevelTransmitter, MeasurementDeviceBaseClass, MolarMassAnalyser, MultiPhaseMeter, NMVOCAnalyser, OilLevelTransmitter, pHProbe, PressureTransmitter, PushButton, SevereSlugAnalyser, SoftSensor, StreamMeasurementDeviceBaseClass, TemperatureTransmitter, VirtualFlowMeter, VolumeFlowTransmitter, WaterContentAnalyser, WaterDewPointAnalyser, WaterLevelTransmitter, WellAllocator
MeasurementDeviceInterface interface.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
-
Method Summary
Modifier and TypeMethodDescriptionacknowledgeAlarm(double time) Acknowledges the currently active alarm if one exists.default voidApplies the field value to the connected stream or equipment.voiddisplayResult.booleanevaluateAlarm(double measuredValue, double dt, double time) Evaluates the alarm state using the supplied measurement value.Returns the alarm configuration, ornullif alarms are disabled.Returns the mutable alarm state for the device.default doubleReturns the deviation between the model-calculated value and the field value.doubleReturns the field data value received from the external data source.doublegetMaximumValue.doublegetMeasuredPercentValue.default doublegetMeasuredValue.doublegetMeasuredValue(String unit) Get Measured value in specified unit.doublegetMinimumValue.getOnlineSignal.default doublegetOnlineValue.default doubleReturns the relative deviation between model and field as a percentage.getTag()Returns the instrument tag identifier used for field data integration.Returns the role of this instrument in a digital-twin or field data integration context.getUnit()getUnit.booleanReturns whether a field data value has been set.inthashCode()booleanisLogging.booleanisOnlineSignal.voidsetAlarmConfig(AlarmConfig alarmConfig) Associates an alarm configuration with the measurement device.voidsetFieldValue(double value) Sets the field data value received from the external data source.voidsetLogging(boolean logging) setLogging.voidsetMaximumValue(double maximumValue) setMaximumValue.voidsetMinimumValue(double minimumValue) setMinimumValue.voidSets the instrument tag identifier for field data integration.voidsetTagRole(InstrumentTagRole role) Sets the role of this instrument for field data integration.voidsetUnit.Methods inherited from interface NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumber
-
Method Details
-
displayResult
void displayResult()displayResult.
-
getMeasuredValue
default double getMeasuredValue()getMeasuredValue.
- Returns:
- Get measured value in unit GetUnit()
-
getMeasuredValue
-
getOnlineSignal
-
getMeasuredPercentValue
double getMeasuredPercentValue()getMeasuredPercentValue.
- Returns:
- a double
-
getUnit
-
setUnit
-
getMaximumValue
double getMaximumValue()getMaximumValue.
- Returns:
- a double
-
setMaximumValue
void setMaximumValue(double maximumValue) setMaximumValue.
- Parameters:
maximumValue- a double
-
getMinimumValue
double getMinimumValue()getMinimumValue.
- Returns:
- a double
-
setMinimumValue
void setMinimumValue(double minimumValue) setMinimumValue.
- Parameters:
minimumValue- a double
-
isLogging
boolean isLogging()isLogging.
- Returns:
- a boolean
-
setLogging
void setLogging(boolean logging) setLogging.
- Parameters:
logging- a boolean
-
getOnlineValue
default double getOnlineValue()getOnlineValue.
- Returns:
- a double
-
isOnlineSignal
boolean isOnlineSignal()isOnlineSignal.
- Returns:
- a boolean
-
setAlarmConfig
Associates an alarm configuration with the measurement device.- Parameters:
alarmConfig- configuration to apply, ornullto disable alarms
-
getAlarmConfig
AlarmConfig getAlarmConfig()Returns the alarm configuration, ornullif alarms are disabled.- Returns:
- alarm configuration
-
getAlarmState
-
evaluateAlarm
Evaluates the alarm state using the supplied measurement value.- Parameters:
measuredValue- measured valuedt- simulation time steptime- current simulation time- Returns:
- events generated during the evaluation
-
acknowledgeAlarm
Acknowledges the currently active alarm if one exists.- Parameters:
time- simulation time of the acknowledgement- Returns:
- acknowledgement event, or
nullif nothing was acknowledged
-
getTag
String getTag()Returns the instrument tag identifier used for field data integration. The tag maps this instrument to a signal in the plant historian or data source (e.g. "PT-101", "TT-201").- Returns:
- tag string, or empty string if not set
-
setTag
Sets the instrument tag identifier for field data integration.- Parameters:
tag- tag string mapping to a plant historian signal
-
getTagRole
InstrumentTagRole getTagRole()Returns the role of this instrument in a digital-twin or field data integration context.- Returns:
- the tag role, defaulting to
InstrumentTagRole.VIRTUAL
-
setTagRole
Sets the role of this instrument for field data integration.- Parameters:
role- the tag role to assign
-
getFieldValue
double getFieldValue()Returns the field data value received from the external data source. Only meaningful forInstrumentTagRole.INPUTandInstrumentTagRole.BENCHMARKroles.- Returns:
- the field value, or
Double.NaNif not set
-
setFieldValue
void setFieldValue(double value) Sets the field data value received from the external data source.- Parameters:
value- the field measurement value
-
hasFieldValue
boolean hasFieldValue()Returns whether a field data value has been set.- Returns:
- true if a field value is available
-
getDeviation
default double getDeviation()Returns the deviation between the model-calculated value and the field value. Computed asgetMeasuredValue() - getFieldValue(). Useful forInstrumentTagRole.BENCHMARKinstruments.- Returns:
- deviation (model minus field), or
Double.NaNif no field value is set
-
getRelativeDeviation
default double getRelativeDeviation()Returns the relative deviation between model and field as a percentage. Computed as(getMeasuredValue() - getFieldValue()) / getFieldValue() * 100.0.- Returns:
- relative deviation in percent, or
Double.NaNif no field value is set or field value is zero
-
applyFieldValue
default void applyFieldValue()Applies the field value to the connected stream or equipment. Only effective for instruments with roleInstrumentTagRole.INPUT. Subclasses override to push the field value into their specific model property (pressure, temperature, flow, etc.). -
equals
-
hashCode
-