Package org.netxms.client.datacollection
Class DciValue
- java.lang.Object
-
- org.netxms.client.datacollection.DciValue
-
- Direct Known Subclasses:
SimpleDciValue,TableDciValue
public abstract class DciValue extends Object
DCI value
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DciValuecreateFromMessage(long nodeId, org.netxms.base.NXCPMessage msg, long base)Factory method to create correct DciValue subclass from NXCP message.Stringformat(String formatString)Returns formated DCI value or string with format error and correct type of DCI value;ThresholdgetActiveThreshold()DataTypegetDataType()intgetDcObjectType()StringgetDescription()intgetErrorCount()intgetFlags()longgetId()SeveritygetMostCriticalSeverity()StringgetName()longgetNodeId()intgetSource()intgetStatus()longgetTemplateDciId()SeveritygetThresholdSeverity()Get severity of active thresholdDategetTimestamp()StringgetValue()voidsetMostCriticalSeverity(Severity mostCriticalSeverity)
-
-
-
Field Detail
-
id
protected long id
-
nodeId
protected long nodeId
-
name
protected String name
-
description
protected String description
-
value
protected String value
-
source
protected int source
-
dataType
protected DataType dataType
-
status
protected int status
-
mostCriticalSeverity
protected Severity mostCriticalSeverity
-
-
Constructor Detail
-
DciValue
protected DciValue()
Simple constructor for DciValue
-
DciValue
protected DciValue(long nodeId, org.netxms.base.NXCPMessage msg, long base)Constructor for creating DciValue from NXCP message- Parameters:
nodeId- owning node IDmsg- NXCP messagebase- Base field ID for value object
-
-
Method Detail
-
createFromMessage
public static DciValue createFromMessage(long nodeId, org.netxms.base.NXCPMessage msg, long base)
Factory method to create correct DciValue subclass from NXCP message.- Parameters:
nodeId- owning node IDmsg- NXCP messagebase- Base variable ID for value object- Returns:
- DciValue object
-
format
public String format(String formatString)
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 value- Returns:
- The format
-
getId
public long getId()
- Returns:
- the id
-
getName
public String getName()
- Returns:
- the name
-
getDescription
public String getDescription()
- Returns:
- the description
-
getValue
public String getValue()
- Returns:
- the value
-
getSource
public int getSource()
- Returns:
- the source
-
getDataType
public DataType getDataType()
- Returns:
- the dataType
-
getStatus
public int getStatus()
- Returns:
- the status
-
getTimestamp
public Date getTimestamp()
- Returns:
- the timestamp
-
getNodeId
public long getNodeId()
- Returns:
- the nodeId
-
getActiveThreshold
public Threshold 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
public Severity 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
-
getMostCriticalSeverity
public Severity getMostCriticalSeverity()
- Returns:
- the mostCriticalSeverity
-
setMostCriticalSeverity
public void setMostCriticalSeverity(Severity mostCriticalSeverity)
- Parameters:
mostCriticalSeverity- the mostCriticalSeverity to set
-
-