Class CipULINT
- java.lang.Object
-
- com.automation_pros.odva.cip.data.BaseDataType<java.lang.Long>
-
- com.automation_pros.odva.cip.data.CipULINT
-
- All Implemented Interfaces:
BitAddressable,BoolHost
public class CipULINT extends BaseDataType<java.lang.Long> implements BoolHost, BitAddressable
-
-
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).CipULINTcopy()Produce a deep clone of the object.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.java.lang.StringcrcName()Obtain the name of this type as used for computing structure CRCs.java.lang.Longget(int[] indices)Application-side value retrieval.booleangetBit(int b)booleangetBit(int[] indices, int b)DataDefinitionSeggetNestingDef()Return the element (not including array) type definition as a Path Segment, using the abbreviated form if a composite data type.java.math.BigIntegerlongValue(int... indices)For data types 64-bits wide or less, return the best available 64-bit representation.protected voidputPayloadImpl(java.nio.ByteBuffer dest, int[] indices)All concrete implementations must supply their per-element encoder here.voidset(int[] indices, java.lang.Long val)Application-side value storage.voidsetBit(int[] indices, int b, boolean v)voidsetBit(int b, boolean v)voidsetDimensions(int[] newDimensions)Update the lengths of the array dimensions to the given values.voidsetLong(long val, int... indices)For data types 64-bits wide or less, set the appropriate bits from a 64-bit representation.protected voidsetPayloadImpl(java.nio.ByteBuffer source, int[] indices)All concrete implementations must supply their per-element decoder here.java.lang.StringstructCRCString()Logix processors don't follow CIP Volume 1 Table C-6.9 in their tag read/write routines for structures.CipULINTwrap(int[] indices)Application-side wrapper for inner dimensions.-
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, makeInstance, maxEach, minEach, nestedBytes, nestedBytesEach, nestedBytesImpl, nestedPutPayload, nestedPutPayloadImpl, nestedSetPayload, nestedSetPayloadImpl, putAbbrevType, putPayload, range2suffix, rawCRC16, set, setFromTokenImpl, setFromTokenizer, setFromTokenizerImpl, setFromTokenString, setInt, setMemberOffsets, setPayload, setupTokenizer, setVariantContext, setVariantDimension, setVariantDimension, singleToString, sliceTo, toString
-
-
-
-
Constructor Detail
-
CipULINT
public CipULINT()
-
CipULINT
public CipULINT(long val)
-
CipULINT
public CipULINT(int[] dimensions)
-
CipULINT
protected CipULINT(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.lang.Long>
-
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.lang.Long>- Returns:
-
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.lang.Long>
-
structCRCString
public java.lang.String structCRCString()
Description copied from class:BaseDataTypeLogix processors don't follow CIP Volume 1 Table C-6.9 in their tag read/write routines for structures. Instead, they run the CRC over comma-separated ASCII type strings that make up the structure. This is referred to in the Logix Data Access Programming Manual as the "Structure Handle".- Overrides:
structCRCStringin classBaseDataType<java.lang.Long>- Returns:
-
longValue
public java.math.BigInteger longValue(int... indices)
Description copied from class:BaseDataTypeFor data types 64-bits wide or less, return the best available 64-bit representation. If the subscripts are incomplete, return the element with the remaining subscripts set to zero.- Overrides:
longValuein classBaseDataType<java.lang.Long>- Parameters:
indices- Array subscripts.- Returns:
-
setLong
public void setLong(long val, int... indices)Description copied from class:BaseDataTypeFor data types 64-bits wide or less, set the appropriate bits from a 64-bit representation. If the subscripts are incomplete, set the element with the remaining subscripts set to zero.- Overrides:
setLongin classBaseDataType<java.lang.Long>- Parameters:
val- New value, truncated to 8, 16, or 32 bits if needed.indices- Array subscripts.
-
get
public java.lang.Long 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.lang.Long>- Parameters:
indices- Array subscripts. Missing subscripts not allowed.- Returns:
-
set
public void set(int[] indices, java.lang.Long 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.lang.Long>- Parameters:
indices- Array subscripts. Missing subscripts not allowed.
-
getBit
public boolean getBit(int[] indices, int b)- Specified by:
getBitin interfaceBitAddressable
-
setBit
public void setBit(int[] indices, int b, boolean v)- Specified by:
setBitin interfaceBitAddressable
-
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.lang.Long>- Returns:
- encoded bytes per element
-
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.lang.Long>
-
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.lang.Long>
-
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.lang.Long>- Returns:
-
copy
public CipULINT copy()
Description copied from class:BaseDataTypeProduce a deep clone of the object.- Specified by:
copyin classBaseDataType<java.lang.Long>
-
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.lang.Long>
-
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.lang.Long>
-
wrap
public CipULINT 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.lang.Long>- Parameters:
indices- Array subscripts. Missing subscripts are allowed.
-
-