Package org.yamcs.parameter
Class ParameterValue
- java.lang.Object
-
- org.yamcs.parameter.BasicParameterValue
-
- org.yamcs.parameter.ParameterValue
-
- Direct Known Subclasses:
ContainerParameterValue
,PartialParameterValue
public class ParameterValue extends BasicParameterValue
-
-
Field Summary
-
Fields inherited from class org.yamcs.parameter.BasicParameterValue
engValue, generationTime, rawValue
-
-
Constructor Summary
Constructors Constructor Description ParameterValue(String fqn)
ParameterValue(ParameterValue pv)
ParameterValue(Parameter def)
Creates a parameter value for a parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAcquisitionTime()
Parameter
getParameter()
Retrieve the parameter definition for this parameter valueString
getParameterQualifiedNamed()
boolean
hasAcquisitionTime()
boolean
isExpired(long now)
Verifies if the parameter value is expired at a given timestamp.void
setAcquisitionTime(long instant)
void
setParameter(Parameter p)
org.yamcs.protobuf.Pvalue.ParameterValue
toGpb(int numericId)
org.yamcs.protobuf.Pvalue.ParameterValue
toGpb(org.yamcs.protobuf.Yamcs.NamedObjectId id)
org.yamcs.protobuf.Pvalue.ParameterValue
toProtobufParameterValue(Optional<org.yamcs.protobuf.Yamcs.NamedObjectId> id, OptionalInt numericId, boolean withUtc)
Convert a PV to a ProtobufPVString
toString()
-
Methods inherited from class org.yamcs.parameter.BasicParameterValue
addAlarmRanges, fromGpb, fromGpb, getAcquisitionStatus, getCriticalRange, getDeltaMonitoringResult, getDistressRange, getEngValue, getExpireMills, getGenerationTime, getMonitoringResult, getProcessingStatus, getRangeCondition, getRawValue, getSevereRange, getStatus, getWarningRange, getWatchRange, hasExpirationTime, hasGenerationTime, setAcquisitionStatus, setBinaryValue, setBooleanValue, setCriticalRange, setDeltaMonitoringResult, setDistressRange, setDoubleValue, setEngineeringValue, setEngValue, setExpireMillis, setFloatValue, setGenerationTime, setMonitoringResult, setProcessingStatus, setRangeCondition, setRawDoubleValue, setRawFloatValue, setRawSignedInteger, setRawSignedLong, setRawUnsignedInteger, setRawUnsignedLong, setRawValue, setRawValue, setRawValue, setRawValue, setSevereRange, setSignedIntegerValue, setSignedLongValue, setStatus, setStringValue, setUnsignedIntegerValue, setUnsignedLongValue, setWarningRange, setWatchRange, toGpbAlarmRange
-
-
-
-
Constructor Detail
-
ParameterValue
public ParameterValue(Parameter def)
Creates a parameter value for a parameter- Parameters:
def
- the parameter definition
-
ParameterValue
public ParameterValue(String fqn)
-
ParameterValue
public ParameterValue(ParameterValue pv)
-
-
Method Detail
-
setAcquisitionTime
public void setAcquisitionTime(long instant)
-
setParameter
public void setParameter(Parameter p)
-
getParameter
public Parameter getParameter()
Retrieve the parameter definition for this parameter value- Returns:
- parameter definition
-
getParameterQualifiedNamed
public String getParameterQualifiedNamed()
-
getAcquisitionTime
public long getAcquisitionTime()
-
toGpb
public org.yamcs.protobuf.Pvalue.ParameterValue toGpb(org.yamcs.protobuf.Yamcs.NamedObjectId id)
-
toGpb
public org.yamcs.protobuf.Pvalue.ParameterValue toGpb(int numericId)
-
toProtobufParameterValue
public org.yamcs.protobuf.Pvalue.ParameterValue toProtobufParameterValue(Optional<org.yamcs.protobuf.Yamcs.NamedObjectId> id, OptionalInt numericId, boolean withUtc)
Convert a PV to a ProtobufPV- Parameters:
id
- - the parameter identifierwithUtc
- - if true - set the UTC string times- Returns:
- the created ProtobufPV
-
hasAcquisitionTime
public boolean hasAcquisitionTime()
-
isExpired
public boolean isExpired(long now)
Verifies if the parameter value is expired at a given timestamp. Returns false if the expireMillis is not set.- Parameters:
now
-- Returns:
- true if the parameter is expired at the timestamp now.
-
-