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 voidcopyToImpl(BaseDataType<?> dest, int[] indices)Support deep copy operations one element at a time.java.lang.StringcrcName()Obtain the name of this type as used for computing structure CRCs.static java.lang.LongfromDate(java.util.Date date)java.util.Dateget(int[] indices)Application-side value retrieval.voidputPayload(java.nio.ByteBuffer dest, int... indices)All CIP datatypes must provide bytestream payloads.voidset(int[] indices, java.util.Date val)Application-side value storage.voidsetPayload(java.nio.ByteBuffer source, int... indices)Decode a value from specification wire format to instance storage.static java.sql.TimestamptoTimestamp(java.lang.Long zulu)CipWallClockwrap(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:BaseDataTypeApplication-side value retrieval. Subclasses must implement this function to retrieve elements of the storage array in the application data type.- Specified by:
getin 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:BaseDataTypeApplication-side value storage. Subclasses must implement this function to store one value or complex element into the storage array.- Specified by:
setin classBaseDataType<java.util.Date>- Parameters:
indices- Array subscripts. Missing subscripts not allowed.
-
crcName
public java.lang.String crcName()
Description copied from class:BaseDataTypeObtain the name of this type as used for computing structure CRCs. Can be different from the name(s) used by the CipPath parser.- Overrides:
crcNamein classBaseDataType<java.util.Date>- Returns:
-
copy
public BaseDataType<?> copy()
Description copied from class:BaseDataTypeProduce a deep clone of the object.- Specified by:
copyin classBaseDataType<java.util.Date>
-
copyToImpl
protected void copyToImpl(BaseDataType<?> dest, int[] indices)
Description copied from class:BaseDataTypeSupport deep copy operations one element at a time.- Overrides:
copyToImplin classBaseDate
-
setPayload
public void setPayload(java.nio.ByteBuffer source, int... indices)Description copied from class:BaseDataTypeDecode a value from specification wire format to instance storage.- Overrides:
setPayloadin classBaseDate
-
putPayload
public void putPayload(java.nio.ByteBuffer dest, int... indices)Description copied from class:BaseDataTypeAll 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:
putPayloadin classBaseDate
-
wrap
public CipWallClock wrap(int[] indices)
Description copied from class:BaseDataTypeApplication-side wrapper for inner dimensions. Implementations must update memberOffsets if not not using the protected constructor.- Specified by:
wrapin classBaseDataType<java.util.Date>- Parameters:
indices- Array subscripts. Missing subscripts are allowed.
-
-