org.openiec61850.common.model.datypes.commonacsi
Class Timestamp

java.lang.Object
  extended by org.openiec61850.common.model.ModelNode
      extended by org.openiec61850.common.model.BasicDataAttribute
          extended by org.openiec61850.common.model.datypes.commonacsi.Timestamp
All Implemented Interfaces:
java.lang.Comparable<Timestamp>, java.lang.Iterable<ModelNode>

public class Timestamp
extends BasicDataAttribute
implements java.lang.Comparable<Timestamp>

See 61850-7-2 chapter TypeDefinitions/BasicTypes


Field Summary
 int fractionOfSecond
          The attribute FractionOfSecond shall be the fraction of the current second when the value of the TimeStamp has been determined.
 long secondsSinceEpoch
          The SecondSinceEpoch shall be the interval in seconds continuously counted from the epoch 1970-01-01 00:00:00 UTC
 TimeQuality timeQuality
          The TimeQuality shall provide information about the time source of the sending IED
 
Fields inherited from class org.openiec61850.common.model.BasicDataAttribute
basicType, dchg, dupd, qchg, sAddr
 
Fields inherited from class org.openiec61850.common.model.ModelNode
children, fc, objectReference
 
Constructor Summary
Timestamp(ObjectReference objectReference, FunctionalConstraint fc, java.lang.String sAddr, java.util.Date date, boolean dchg, boolean dupd)
           
 
Method Summary
 int compareTo(Timestamp o)
           
 Timestamp copy()
          Copies the whole node with all of its children.
 boolean equals(java.lang.Object obj)
           
 java.util.Date getValue()
           
 int hashCode()
           
 void setDefault()
           
 void setValue(java.util.Date newValue)
           
 
Methods inherited from class org.openiec61850.common.model.BasicDataAttribute
getBasicDataAttributes, getBasicType, getChild, getChild, getChildren, getDchg, getDupd, getQchg, getSAddr, iterator
 
Methods inherited from class org.openiec61850.common.model.ModelNode
findSubNode, getFunctionalConstraint, getIterators, getNodeName, getReference, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

secondsSinceEpoch

public long secondsSinceEpoch
The SecondSinceEpoch shall be the interval in seconds continuously counted from the epoch 1970-01-01 00:00:00 UTC


fractionOfSecond

public int fractionOfSecond
The attribute FractionOfSecond shall be the fraction of the current second when the value of the TimeStamp has been determined. The fraction of second shall be calculated as (SUM from I = 0 to 23 of bi*2**–(I+1) s). NOTE 1 The resolution is the smallest unit by which the time stamp is updated. The 24 bits of the integer provides 1 out of 16777216 counts as the smallest unit; calculated by 1/2**24 which equals approximately 60 ns. NOTE 2 The resolution of a time stamp may be 1/2**1 (= 0,5 s) if only the first bit is used; or may be 1/2**2 (= 0,25 s) if the first two bits are used; or may be approximately 60 ns if all 24 bits are used. The resolution provided by an IED is outside the scope of this standard.


timeQuality

public TimeQuality timeQuality
The TimeQuality shall provide information about the time source of the sending IED

Constructor Detail

Timestamp

public Timestamp(ObjectReference objectReference,
                 FunctionalConstraint fc,
                 java.lang.String sAddr,
                 java.util.Date date,
                 boolean dchg,
                 boolean dupd)
Method Detail

setValue

public void setValue(java.util.Date newValue)

getValue

public java.util.Date getValue()
Specified by:
getValue in class BasicDataAttribute

compareTo

public int compareTo(Timestamp o)
Specified by:
compareTo in interface java.lang.Comparable<Timestamp>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setDefault

public void setDefault()
Specified by:
setDefault in class BasicDataAttribute

copy

public Timestamp copy()
Description copied from class: ModelNode
Copies the whole node with all of its children. Creates new BasicDataAttribute values but reuses ObjectReferences, FunctionalConstraints.

Specified by:
copy in class ModelNode