Class SymbolicSeg
- java.lang.Object
-
- com.automation_pros.odva.cip.path.PathSegment
-
- com.automation_pros.odva.cip.path.SymbolicSeg
-
- All Implemented Interfaces:
SymbolSeg
,java.lang.Comparable<PathSegment>
public class SymbolicSeg extends PathSegment implements SymbolSeg
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SymbolicSeg.Decoder
Decode bytes expected to contain one encoded path segment.static class
SymbolicSeg.Parser
A symbolic segment is not restricted to ISO-8859-1 characters.-
Nested classes/interfaces inherited from class com.automation_pros.odva.cip.path.PathSegment
PathSegment.HasAlternateHex
-
-
Field Summary
Fields Modifier and Type Field Description protected byte
charLen
protected byte
extType
static byte
SEGTYPE
protected java.lang.String
symbol
-
Fields inherited from class com.automation_pros.odva.cip.path.PathSegment
identifierChars, segtype
-
-
Constructor Summary
Constructors Constructor Description SymbolicSeg()
SymbolicSeg(java.lang.String symbol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(PathSegment o)
boolean
equals(java.lang.Object o)
int
getBytes()
Obtain the number of bytes needed to encode this segment instance in packed format.java.lang.String
getSymbol()
java.util.List<java.lang.String>
getTokens()
int
hashCode()
void
put(java.nio.ByteBuffer dest, boolean padded)
Encode the current instance to the given destination.PathSegment
set(java.nio.ByteBuffer source, boolean padded)
Replace the current instance content with the decoded source bytes.void
setSymbol(int val)
void
setSymbol(java.lang.String symb)
java.lang.String
simpleString()
Supply s simple descriptive name usable when browsing a hierarchy.-
Methods inherited from class com.automation_pros.odva.cip.path.PathSegment
decode, decodeAll, getSegtype, getWords, hexString, mergeTokens, registerHandler, setSegtype, toString
-
-
-
-
Field Detail
-
SEGTYPE
public static final byte SEGTYPE
- See Also:
- Constant Field Values
-
charLen
protected byte charLen
-
extType
protected byte extType
-
symbol
protected java.lang.String symbol
-
-
Method Detail
-
setSymbol
public void setSymbol(java.lang.String symb)
-
setSymbol
public void setSymbol(int val)
-
set
public PathSegment set(java.nio.ByteBuffer source, boolean padded)
Description copied from class:PathSegment
Replace the current instance content with the decoded source bytes.The caller must ensure that the instance is appropriate for the bytes supplied. This permits instance re-use in optimized applications.
- Specified by:
set
in classPathSegment
- Parameters:
source
- The bytes to be decoded. The position will be left after the last byte of the decoded segment.padded
- Alternate format selection. Packed format when false.- Returns:
- The same instance.
-
put
public void put(java.nio.ByteBuffer dest, boolean padded)
Description copied from class:PathSegment
Encode the current instance to the given destination.- Specified by:
put
in interfaceSymbolSeg
- Specified by:
put
in classPathSegment
- Parameters:
dest
- The buffer receiving the complete encoded instance.padded
- Alternate format selection. Packed format when false.
-
getBytes
public int getBytes()
Description copied from class:PathSegment
Obtain the number of bytes needed to encode this segment instance in packed format.- Specified by:
getBytes
in interfaceSymbolSeg
- Specified by:
getBytes
in classPathSegment
- Returns:
- Number of bytes, assuming put() will be called with padded false.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classPathSegment
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(PathSegment o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<PathSegment>
- Overrides:
compareTo
in classPathSegment
-
simpleString
public java.lang.String simpleString()
Description copied from class:PathSegment
Supply s simple descriptive name usable when browsing a hierarchy. A simple type name for elementary types, a non-detailed description for complex types.- Specified by:
simpleString
in classPathSegment
- Returns:
-
getTokens
public java.util.List<java.lang.String> getTokens()
- Specified by:
getTokens
in classPathSegment
-
-