Class BaseDate
- java.lang.Object
-
- com.automation_pros.odva.cip.data.BaseDataType<java.util.Date>
-
- com.automation_pros.odva.cip.data.BaseDate
-
- Direct Known Subclasses:
CipOmronDT,CipWallClock
public abstract class BaseDate extends BaseDataType<java.util.Date>
-
-
Field Summary
-
Fields inherited from class com.automation_pros.odva.cip.data.BaseDataType
dimensions, memberOffsets, sLogger, variantContext, varyingDimension
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytesEach()Obtain the bytes-per-element of this object's payload encoding.protected intbytesImpl(int[] indices)Retrieve the bytes payload size of a single array element (or sole element).protected voidcopyToImpl(BaseDataType<?> dest, int[] indices)Support deep copy operations one element at a time.protected voidcopyToImpl(BaseDataType<?> dest, int[] toIndices, int[] fromIndices)Support slice copy operations one element at a time.DataDefinitionSeggetNestingDef()Return the element (not including array) type definition as a Path Segment, using the abbreviated form if a composite data type.voidputPayload(java.nio.ByteBuffer dest, int... indices)All CIP datatypes must provide bytestream payloads.protected voidputPayloadImpl(java.nio.ByteBuffer dest, int[] indices)All concrete implementations must supply their per-element encoder here.voidsetDimensions(int[] newDimensions)Update the lengths of the array dimensions to the given values.protected voidsetFromTokenImpl(java.lang.String token, int[] indices)Override this if single elements can be set from single tokens.voidsetPayload(java.nio.ByteBuffer source, int... indices)Decode a value from specification wire format to instance storage.protected voidsetPayloadImpl(java.nio.ByteBuffer source, int[] indices)All concrete implementations must supply their per-element decoder here.protected java.lang.StringsingleToString(int[] indices)-
Methods inherited from class com.automation_pros.odva.cip.data.BaseDataType
alignment, browseInner, browseInnerImpl, bytes, checkDimensions, chkAbbrevType, concatIndices, conditionalSuffix, copy, copyTo, CRC16, CRC16, CRC16, crcName, dim2linear, dim2linear, dim2qty, dim2suffix, dimensionToString, doubleValue, extendIntArray, fillIntArray, get, 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, set, setFromTokenizer, setFromTokenizerImpl, setFromTokenString, setInt, setLong, setMemberOffsets, setupTokenizer, setVariantContext, setVariantDimension, setVariantDimension, sliceTo, structCRCString, toString, wrap
-
-
-
-
Constructor Detail
-
BaseDate
public BaseDate(CipULINT data, int... indices)
-
-
Method Detail
-
getNestingDef
public DataDefinitionSeg getNestingDef()
Description copied from class:BaseDataTypeReturn the element (not including array) type definition as a Path Segment, using the abbreviated form if a composite data type.- Specified by:
getNestingDefin classBaseDataType<java.util.Date>
-
setDimensions
public void setDimensions(int[] newDimensions)
Description copied from class:BaseDataTypeUpdate the lengths of the array dimensions to the given values. The number of subscripts must match the current number of subscripts. The operation must be data-preserving.This implementation handles pure Object storage types. Anything else must override.
- Overrides:
setDimensionsin classBaseDataType<java.util.Date>
-
bytesEach
public int bytesEach()
Description copied from class:BaseDataTypeObtain the bytes-per-element of this object's payload encoding. Objects with variable length encodings must return zero and implement the bytesImpl(), minEach(), maxEach(), and alignment() methods instead.- Specified by:
bytesEachin classBaseDataType<java.util.Date>- Returns:
- encoded bytes per element
-
bytesImpl
protected int bytesImpl(int[] indices)
Description copied from class:BaseDataTypeRetrieve the bytes payload size of a single array element (or sole element). Objects with fixed element sizes may simply return bytesEach() here.- Specified by:
bytesImplin classBaseDataType<java.util.Date>- Returns:
-
setPayloadImpl
protected void setPayloadImpl(java.nio.ByteBuffer source, int[] indices)Description copied from class:BaseDataTypeAll concrete implementations must supply their per-element decoder here.- Specified by:
setPayloadImplin classBaseDataType<java.util.Date>
-
setFromTokenImpl
protected void setFromTokenImpl(java.lang.String token, int[] indices)Description copied from class:BaseDataTypeOverride this if single elements can be set from single tokens. The default decodes as Long and uses setLong().- Overrides:
setFromTokenImplin classBaseDataType<java.util.Date>- Parameters:
token- The single token obtained from the tokenizer for this one element.indices- The complete set of subscripts
-
putPayloadImpl
protected void putPayloadImpl(java.nio.ByteBuffer dest, int[] indices)Description copied from class:BaseDataTypeAll concrete implementations must supply their per-element encoder here.- Specified by:
putPayloadImplin 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.- Specified by:
copyToImplin classBaseDataType<java.util.Date>
-
copyToImpl
protected void copyToImpl(BaseDataType<?> dest, int[] toIndices, int[] fromIndices)
Description copied from class:BaseDataTypeSupport slice copy operations one element at a time.- Specified by:
copyToImplin classBaseDataType<java.util.Date>
-
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 classBaseDataType<java.util.Date>
-
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 classBaseDataType<java.util.Date>
-
singleToString
protected java.lang.String singleToString(int[] indices)
- Overrides:
singleToStringin classBaseDataType<java.util.Date>
-
-