Class CipWallClock
- java.lang.Object
-
- com.automation_pros.odva.cip.data.BaseDataType<java.util.Date>
-
- com.automation_pros.odva.cip.data.BaseDate
-
- com.automation_pros.odva.cip.data.CipWallClock
-
public class CipWallClock extends BaseDate
Wraps a ULINT or one of its subclasses in a type that will be interpreted as Zulu microseconds.
-
-
Field Summary
-
Fields inherited from class com.automation_pros.odva.cip.data.BaseDataType
dimensions, memberOffsets, sLogger, variantContext, varyingDimension
-
-
Constructor Summary
Constructors Constructor Description CipWallClock(CipULINT data, int... indices)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseDataType<?>
copy()
Produce a deep clone of the object.protected void
copyToImpl(BaseDataType<?> dest, int[] indices)
Support deep copy operations one element at a time.java.lang.String
crcName()
Obtain the name of this type as used for computing structure CRCs.static java.lang.Long
fromDate(java.util.Date date)
java.util.Date
get(int[] indices)
Application-side value retrieval.void
putPayload(java.nio.ByteBuffer dest, int... indices)
All CIP datatypes must provide bytestream payloads.void
set(int[] indices, java.util.Date val)
Application-side value storage.void
setPayload(java.nio.ByteBuffer source, int... indices)
Decode a value from specification wire format to instance storage.static java.sql.Timestamp
toTimestamp(java.lang.Long zulu)
CipWallClock
wrap(int[] indices)
Application-side wrapper for inner dimensions.-
Methods inherited from class com.automation_pros.odva.cip.data.BaseDate
bytesEach, bytesImpl, copyToImpl, getNestingDef, putPayloadImpl, setDimensions, setFromTokenImpl, setPayloadImpl, singleToString
-
Methods inherited from class com.automation_pros.odva.cip.data.BaseDataType
alignment, browseInner, browseInnerImpl, bytes, checkDimensions, chkAbbrevType, concatIndices, conditionalSuffix, copyTo, CRC16, CRC16, CRC16, dim2linear, dim2linear, dim2qty, dim2suffix, dimensionToString, doubleValue, extendIntArray, fillIntArray, get, getCompleteDef, getDimensions, getMemberOffsets, getSymbolType, getTypeCode, getVariantContext, getVaryingDimension, hasOffset, incIdx, intArray, intValue, linear2dim, linear2dim, longValue, makeInstance, maxEach, minEach, nestedBytes, nestedBytesEach, nestedBytesImpl, nestedPutPayload, nestedPutPayloadImpl, nestedSetPayload, nestedSetPayloadImpl, putAbbrevType, range2suffix, rawCRC16, set, setFromTokenizer, setFromTokenizerImpl, setFromTokenString, setInt, setLong, setMemberOffsets, setupTokenizer, setVariantContext, setVariantDimension, setVariantDimension, sliceTo, structCRCString, toString
-
-
-
-
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 classBaseDataType<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 classBaseDataType<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 classBaseDataType<java.util.Date>
- Returns:
-
copy
public BaseDataType<?> copy()
Description copied from class:BaseDataType
Produce a deep clone of the object.- Specified by:
copy
in classBaseDataType<java.util.Date>
-
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 classBaseDate
-
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 classBaseDate
-
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 classBaseDate
-
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 classBaseDataType<java.util.Date>
- Parameters:
indices
- Array subscripts. Missing subscripts are allowed.
-
-