org.openmuc.openiec61850
public final class BdaTimestamp extends BasicDataAttribute
basicType, dchg, dupd, qchg, sAddr
children, objectReference
Constructor and Description |
---|
BdaTimestamp(ObjectReference objectReference,
Fc fc,
java.lang.String sAddr,
boolean dchg,
boolean dupd) |
Modifier and Type | Method and Description |
---|---|
BdaTimestamp |
copy()
Copies the whole node with all of its children.
|
boolean |
getClockFailure()
The attribute clockFailure shall indicate that the time source of the sending device is unreliable.
|
boolean |
getClockNotSynchronized()
The attribute clockNotSynchronized shall indicate that the time source of the sending device is not synchronized
with the external UTC time.
|
java.util.Date |
getDate() |
int |
getFractionOfSecond()
The attribute FractionOfSecond shall be the fraction of the current second when the value of the TimeStamp has
been determined.
|
boolean |
getLeapSecondsKnown()
The value TRUE of the attribute LeapSecondsKnown shall indicate that the value for SecondSinceEpoch takes into
account all leap seconds occurred.
|
long |
getSecondsSinceEpoch()
The SecondSinceEpoch shall be the interval in seconds continuously counted from the epoch 1970-01-01 00:00:00 UTC
|
int |
getTimeAccuracy()
The attribute TimeAccuracy shall represent the time accuracy class of the time source of the sending device
relative to the external UTC time.
|
byte[] |
getValue() |
void |
setCurrentTime()
Sets Timestamp to current time
|
void |
setDate(java.util.Date date) |
void |
setDate(java.util.Date date,
boolean leapSecondsKnown,
boolean clockFailure,
boolean clockNotSynchronized,
int timeAccuracy) |
void |
setDefault()
Sets Timestamp the empty byte array (indicating an invalid Timestamp)
|
void |
setValue(byte[] value) |
java.lang.String |
toString() |
getBasicDataAttributes, getBasicType, getChild, getChild, getChildren, getDchg, getDupd, getQchg, getSAddr, iterator
getFc
getIterators, getName, getParent, getReference
public BdaTimestamp(ObjectReference objectReference, Fc fc, java.lang.String sAddr, boolean dchg, boolean dupd)
public long getSecondsSinceEpoch()
public int getFractionOfSecond()
(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.public void setDate(java.util.Date date)
public void setDate(java.util.Date date, boolean leapSecondsKnown, boolean clockFailure, boolean clockNotSynchronized, int timeAccuracy)
public void setValue(byte[] value)
public java.util.Date getDate()
public byte[] getValue()
getValue
in class BasicDataAttribute
public boolean getLeapSecondsKnown()
Date
and Calendar
objects do handle leap seconds, so this is usually true.public boolean getClockFailure()
public boolean getClockNotSynchronized()
public int getTimeAccuracy()
Date
objects, the accuracy is 1 ms, that is a timeAccuracy value of 10.public void setDefault()
setDefault
in class BasicDataAttribute
public void setCurrentTime()
public BdaTimestamp copy()
ModelNode
public java.lang.String toString()
toString
in class FcModelNode