Class CipWallClock


  • public class CipWallClock
    extends BaseDate
    Wraps a ULINT or one of its subclasses in a type that will be interpreted as Zulu microseconds.
    • Constructor Detail

      • CipWallClock

        public CipWallClock​(CipULINT data,
                            int... indices)
    • Method Detail

      • toTimestamp

        public static java.sql.Timestamp toTimestamp​(java.lang.Long zulu)
      • fromDate

        public static java.lang.Long fromDate​(java.util.Date date)
      • get

        public java.util.Date get​(int[] indices)
        Description copied from class: BaseDataType
        Application-side value retrieval. Subclasses must implement this function to retrieve elements of the storage array in the application data type.
        Specified by:
        get in class BaseDataType<java.util.Date>
        Parameters:
        indices - Array subscripts. Missing subscripts not allowed.
        Returns:
      • set

        public void set​(int[] indices,
                        java.util.Date val)
        Description copied from class: BaseDataType
        Application-side value storage. Subclasses must implement this function to store one value or complex element into the storage array.
        Specified by:
        set in class BaseDataType<java.util.Date>
        Parameters:
        indices - Array subscripts. Missing subscripts not allowed.
      • crcName

        public java.lang.String crcName()
        Description copied from class: BaseDataType
        Obtain the name of this type as used for computing structure CRCs. Can be different from the name(s) used by the CipPath parser.
        Overrides:
        crcName in class BaseDataType<java.util.Date>
        Returns:
      • copyToImpl

        protected void copyToImpl​(BaseDataType<?> dest,
                                  int[] indices)
        Description copied from class: BaseDataType
        Support deep copy operations one element at a time.
        Overrides:
        copyToImpl in class BaseDate
      • setPayload

        public void setPayload​(java.nio.ByteBuffer source,
                               int... indices)
        Description copied from class: BaseDataType
        Decode a value from specification wire format to instance storage.
        Overrides:
        setPayload in class BaseDate
      • putPayload

        public void putPayload​(java.nio.ByteBuffer dest,
                               int... indices)
        Description copied from class: BaseDataType
        All CIP datatypes must provide bytestream payloads. When an array, and fewer indices are supplied than dimensions, multiple consecutive payloads are to be written from the array into the destination buffer.
        Overrides:
        putPayload in class BaseDate
      • wrap

        public CipWallClock wrap​(int[] indices)
        Description copied from class: BaseDataType
        Application-side wrapper for inner dimensions. Implementations must update memberOffsets if not not using the protected constructor.
        Specified by:
        wrap in class BaseDataType<java.util.Date>
        Parameters:
        indices - Array subscripts. Missing subscripts are allowed.