Class CipOmronDT
- 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.CipOmronDT
-
public class CipOmronDT extends BaseDate
Wraps a ULINT or one of its subclasses in a type that will be interpreted as Zulu nanoseconds. Omron NJ processors' DATE_AND_TIME datatype is really a ULINT of this form. Note That such processors usually adjust for the time zone configured, not Zulu.
-
-
Field Summary
-
Fields inherited from class com.automation_pros.odva.cip.data.BaseDataType
dimensions, memberOffsets, sLogger, variantContext, varyingDimension
-
-
Constructor Summary
Constructors Constructor Description CipOmronDT(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.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.voidset(int[] indices, java.util.Date val)Application-side value storage.static java.sql.TimestamptoTimestamp(java.lang.Long zulu)CipOmronDTwrap(int[] indices)Application-side wrapper for inner dimensions.-
Methods inherited from class com.automation_pros.odva.cip.data.BaseDate
bytesEach, bytesImpl, copyToImpl, copyToImpl, getNestingDef, putPayload, putPayloadImpl, setDimensions, setFromTokenImpl, setPayload, 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
-
CipOmronDT
public CipOmronDT(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>
-
wrap
public CipOmronDT 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.
-
-