Package org.netxms.client.datacollection
Class DciValue
java.lang.Object
org.netxms.client.datacollection.DciValue
- Direct Known Subclasses:
SimpleDciValue,TableDciValue
DCI value
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Thresholdprotected booleanprotected Stringprotected DataTypeprotected intprotected Stringprotected intprotected intprotected longprotected MeasurementUnitprotected intstatic final intstatic final intstatic final intprotected Stringprotected longprotected booleanprotected DataOriginprotected intprotected longprotected Dateprotected Stringprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDciValue()Simple constructor for DciValueprotectedDciValue(NXCPMessage msg, long base) Constructor for creating DciValue from NXCP message -
Method Summary
Modifier and TypeMethodDescriptionstatic DciValuecreateFromMessage(NXCPMessage msg, long base) Factory method to create correct DciValue subclass from NXCP message.format(String formatString, TimeFormatter formatter) Returns formated DCI value or string with format error and correct type of DCI value;Get DCI comments.intGet DCi description.intintgetFlags()getFormattedValue(boolean useMultipliers, TimeFormatter formatter) Returns formated DCI value or string with format error and correct type of DCI value;longgetId()intintGet multipliers selection.getName()longintfinal longGet severity of active thresholdgetValue()Get current (last collected) DCI value.booleanbooleantoString()
-
Field Details
-
MULTIPLIERS_DEFAULT
public static final int MULTIPLIERS_DEFAULT- See Also:
-
MULTIPLIERS_YES
public static final int MULTIPLIERS_YES- See Also:
-
MULTIPLIERS_NO
public static final int MULTIPLIERS_NO- See Also:
-
id
protected long id -
nodeId
protected long nodeId -
templateDciId
protected long templateDciId -
name
-
description
-
value
-
userTag
-
comments
-
source
-
dataType
-
status
protected int status -
errorCount
protected int errorCount -
dcObjectType
protected int dcObjectType -
timestamp
-
activeThreshold
-
flags
protected int flags -
measurementUnit
-
multiplier
protected int multiplier -
noValueObject
protected boolean noValueObject -
anomalyDetected
protected boolean anomalyDetected
-
-
Constructor Details
-
DciValue
protected DciValue()Simple constructor for DciValue -
DciValue
Constructor for creating DciValue from NXCP message- Parameters:
msg- NXCP messagebase- Base field ID for value object
-
-
Method Details
-
createFromMessage
Factory method to create correct DciValue subclass from NXCP message.- Parameters:
msg- NXCP messagebase- Base variable ID for value object- Returns:
- DciValue object
-
format
Returns formated DCI value or string with format error and correct type of DCI value;- Parameters:
formatString- the string into which will be placed DCI valueformatter- date/time formatter- Returns:
- The format
-
getFormattedValue
Returns formated DCI value or string with format error and correct type of DCI value;- Parameters:
useMultipliers- the string into which will be placed DCI valueformatter- date/time formatter- Returns:
- The format
-
getId
public long getId()- Returns:
- the id
-
getName
- Returns:
- the name
-
getDescription
Get DCi description.- Returns:
- DCI description
-
getValue
Get current (last collected) DCI value.- Returns:
- current DCI value
-
getUserTag
- Returns:
- the userTag
-
getComments
Get DCI comments.- Returns:
- DCI comments
-
getSource
- Returns:
- the source
-
getDataType
- Returns:
- the dataType
-
getStatus
public int getStatus()- Returns:
- the status
-
getTimestamp
- Returns:
- the timestamp
-
getNodeId
public long getNodeId()- Returns:
- the nodeId
-
getActiveThreshold
- Returns:
- the activeThreshold
-
getDcObjectType
public int getDcObjectType()- Returns:
- the dcObjectType
-
getErrorCount
public int getErrorCount()- Returns:
- the errorCount
-
getTemplateDciId
public final long getTemplateDciId()- Returns:
- the templateDciId
-
getThresholdSeverity
Get severity of active threshold- Returns:
- severity of active threshold or NORMAL if there are no active thresholds
-
getFlags
public int getFlags()- Returns:
- the flags
-
getMultipliersSelection
public int getMultipliersSelection()Get multipliers selection.- Returns:
- multiplier usage mode (DEFAULT, YES, or NO)
-
getMostCriticalSeverity
- Returns:
- the mostCriticalSeverity
-
getMeasurementUnit
- Returns:
- the unitName
-
getMultiplier
public int getMultiplier()- Returns:
- the multiplier
-
isNoValueObject
public boolean isNoValueObject()- Returns:
- the noValueObject
-
isAnomalyDetected
public boolean isAnomalyDetected()- Returns:
- the anomalyDetected
-
toString
-