org.openmuc.openiec61850

## Class BdaTimestamp

- java.lang.Object
- - org.openmuc.openiec61850.ModelNode
  - - org.openmuc.openiec61850.FcModelNode
    - - org.openmuc.openiec61850.BasicDataAttribute
      - - org.openmuc.openiec61850.BdaTimestamp

All Implemented Interfaces:
  java.lang.Iterable<ModelNode>

    public final class BdaTimestamp
    extends BasicDataAttribute

### Field Summary

### Fields inherited from class org.openmuc.openiec61850.ModelNode

`children, objectReference`

### Constructor Summary

Constructors
Constructor and Description
`BdaTimestamp(ObjectReference objectReference, Fc fc, java.lang.String sAddr, boolean dchg, boolean dupd)`

### Method Summary

All Methods Instance Methods Concrete Methods
`BdaTimestamp` `copy()` Returns a copy of model 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()`
`boolean` `getLeapSecondsKnown()` The value TRUE of the attribute LeapSecondsKnown shall indicate that the value for SecondSinceEpoch takes into account all leap seconds occurred.
`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()`
`java.lang.String` `getValueString()`
`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)`
`void` `setValueFrom(BasicDataAttribute bda)`
`java.lang.String` `toString()`

### Methods inherited from class org.openmuc.openiec61850.BasicDataAttribute

`getBasicDataAttributes, getBasicType, getChild, getChild, getChildren, getDchg, getDupd, getQchg, getSAddr, iterator`

### Methods inherited from class org.openmuc.openiec61850.FcModelNode

`getFc`

### Methods inherited from class org.openmuc.openiec61850.ModelNode

`getIterators, getName, getParent, getReference`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### BdaTimestamp

    public BdaTimestamp(ObjectReference objectReference,
                        Fc fc,
                        java.lang.String sAddr,
                        boolean dchg,
                        boolean dupd)

### Method Detail

#### setDate

    public void setDate(java.util.Date date)

#### setDate

    public void setDate(java.util.Date date,
                        boolean leapSecondsKnown,
                        boolean clockFailure,
                        boolean clockNotSynchronized,
                        int timeAccuracy)

#### setValue

    public void setValue(byte[] value)

#### setValueFrom

    public void setValueFrom(BasicDataAttribute bda)

Specified by:
  `setValueFrom` in class `BasicDataAttribute`

#### getDate

    public java.util.Date getDate()

#### getValue

    public byte[] getValue()

#### getLeapSecondsKnown

    public boolean getLeapSecondsKnown()

The value TRUE of the attribute LeapSecondsKnown shall indicate that the value for SecondSinceEpoch takes into account all leap seconds occurred. If it is FALSE then the value does not take into account the leap seconds that occurred before the initialization of the time source of the device. Java `Date` and `Calendar` objects do handle leap seconds, so this is usually true.

Returns:
  TRUE of the attribute LeapSecondsKnown shall indicate that the value for SecondSinceEpoch takes into account all leap seconds occurred

#### getClockFailure

    public boolean getClockFailure()

The attribute clockFailure shall indicate that the time source of the sending device is unreliable. The value of the TimeStamp shall be ignored.

Returns:
  true if the time source of the sending device is unreliable

#### getClockNotSynchronized

    public boolean getClockNotSynchronized()

The attribute clockNotSynchronized shall indicate that the time source of the sending device is not synchronized with the external UTC time.

Returns:
  true if the time source of the sending device is not synchronized

#### getTimeAccuracy

    public 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. The timeAccuracy classes shall represent the number of significant bits in the FractionOfSecond If the time is set via Java `Date` objects, the accuracy is 1 ms, that is a timeAccuracy value of 10.

Returns:
  the time accuracy

#### setDefault

    public void setDefault()

Sets Timestamp the empty byte array (indicating an invalid Timestamp)

Specified by:
  `setDefault` in class `BasicDataAttribute`

#### setCurrentTime

    public void setCurrentTime()

Sets Timestamp to current time

#### copy

    public BdaTimestamp copy()

Description copied from class: `ModelNode`
Returns a copy of model node with all of its children. Creates new BasicDataAttribute values but reuses ObjectReferences, FunctionalConstraints.

Specified by:
  `copy` in class `ModelNode`
Returns:
  a copy of model node with all of its children.

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `FcModelNode`

#### getValueString

    public java.lang.String getValueString()

Overrides:
  `getValueString` in class `BasicDataAttribute`