Class CipEPATH
- java.lang.Object
-
- com.automation_pros.odva.cip.data.BaseDataType<CipPath>
-
- com.automation_pros.odva.cip.data.CipEPATH
-
- Direct Known Subclasses:
CipEPATH.CipPadEPATH,DynEPATH
public class CipEPATH extends BaseDataType<CipPath>
Packed and Padded EPath implementation, with variants, with options for no length prefix, an USINT length, or an UINT length. Defaults to an UINT length prefix for constructors that don't specify it.- Author:
- philip
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCipEPATH.CipPadEPATH
-
Field Summary
Fields Modifier and Type Field Description booleanpadded-
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).CipEPATHcopy()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.CipPathget(int[] indices)Application-side value retrieval.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.voidset(int[] indices, CipPath val)Application-side value storage.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.CipEPATHwrap(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, longValue, makeInstance, maxEach, minEach, nestedBytes, nestedBytesEach, nestedBytesImpl, nestedPutPayload, nestedPutPayloadImpl, nestedSetPayload, nestedSetPayloadImpl, putAbbrevType, range2suffix, rawCRC16, set, setDimensions, setFromTokenImpl, setFromTokenizer, setFromTokenizerImpl, setFromTokenString, setInt, setLong, setMemberOffsets, setupTokenizer, setVariantContext, setVariantDimension, setVariantDimension, singleToString, sliceTo, structCRCString, toString
-
-
-
-
Constructor Detail
-
CipEPATH
public CipEPATH()
-
CipEPATH
public CipEPATH(boolean padded)
-
CipEPATH
public CipEPATH(boolean padded, CipPath path)
-
CipEPATH
public CipEPATH(int[] dimensions)
-
CipEPATH
public CipEPATH(boolean padded, int[] dimensions)
-
CipEPATH
protected CipEPATH(CipEPATH 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<CipPath>
-
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<CipPath>- Returns:
-
get
public CipPath 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<CipPath>- Parameters:
indices- Array subscripts. Missing subscripts not allowed.- Returns:
-
set
public void set(int[] indices, CipPath 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<CipPath>- Parameters:
indices- Array subscripts. Missing subscripts not allowed.
-
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<CipPath>- Returns:
- encoded bytes per element
-
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<CipPath>
-
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<CipPath>
-
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<CipPath>
-
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<CipPath>
-
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<CipPath>- Returns:
-
copy
public CipEPATH copy()
Description copied from class:BaseDataTypeProduce a deep clone of the object.- Specified by:
copyin classBaseDataType<CipPath>
-
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<CipPath>
-
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<CipPath>
-
wrap
public CipEPATH 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<CipPath>- Parameters:
indices- Array subscripts. Missing subscripts are allowed.
-
-