Class CipTreeCtx
- java.lang.Object
-
- com.automation_pros.odva.cip.types.CipTree
-
- com.automation_pros.odva.cip.types.CipTreeCtx
-
- All Implemented Interfaces:
DataContext
- Direct Known Subclasses:
CipObject
public class CipTreeCtx extends CipTree implements DataContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.automation_pros.odva.cip.types.CipTree
CipTree.ChildMap
-
-
Field Summary
-
Fields inherited from class com.automation_pros.odva.cip.types.CipTree
children, objEPath, parent, segment
-
Fields inherited from interface com.automation_pros.odva.cip.data.DataContext
emptyContext
-
-
Constructor Summary
Constructors Constructor Description CipTreeCtx()
CipTreeCtx(PathSegment seg)
CipTreeCtx(PathSegment seg, CipTree parent)
CipTreeCtx(CipTree parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseDataType<?>
getCtxDataImpl(java.util.List<PathSegment> reference)
Look up reference data within this current context for use in indirection of various kinds, as described for getCtxData(), which uses this implementation and handles delegation to outer contexts.AnonStructSeg
getNamedDef(java.lang.String typeName)
Look up a named type for use expanding a stub definition or to apply to a different context.DataContext
getParentDataCtx()
Override this at the root of the application tree to supply an application's collection of named and abbreviated types.java.lang.String
getTypeByCRC(int crc)
Look up a named type by CRC for use directly by a StructureDefSeg or indirectly by an AnonTypeSeg.StructDef
getTypeByName(java.lang.String typeName)
Look up a named type for use constructing nested elements of a structure.java.util.ArrayList<StructDef>
getTypesImpl()
-
Methods inherited from class com.automation_pros.odva.cip.types.CipTree
cleanup, entrySet, follow, getChild, getChildren, getEPath, getEPathImpl, getParent, getSegment, keySet, removeChild, setChild, setParent, setSegment, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.automation_pros.odva.cip.data.DataContext
fromEnum, getCtxData, getCtxDataOrNull, getTypes, makeHosted, makeUnhosted, toEnum
-
-
-
-
Constructor Detail
-
CipTreeCtx
public CipTreeCtx()
-
CipTreeCtx
public CipTreeCtx(PathSegment seg)
-
CipTreeCtx
public CipTreeCtx(CipTree parent)
-
CipTreeCtx
public CipTreeCtx(PathSegment seg, CipTree parent)
-
-
Method Detail
-
getParentDataCtx
public DataContext getParentDataCtx()
Override this at the root of the application tree to supply an application's collection of named and abbreviated types.- Specified by:
getParentDataCtx
in interfaceDataContext
- Returns:
-
getNamedDef
public AnonStructSeg getNamedDef(java.lang.String typeName)
Description copied from interface:DataContext
Look up a named type for use expanding a stub definition or to apply to a different context.- Specified by:
getNamedDef
in interfaceDataContext
-
getTypeByName
public StructDef getTypeByName(java.lang.String typeName)
Description copied from interface:DataContext
Look up a named type for use constructing nested elements of a structure.- Specified by:
getTypeByName
in interfaceDataContext
- Parameters:
typeName
- The type name to look up in the predefined names.- Returns:
- The type suitable for use with CipStruct and/or StructMember.
-
getTypesImpl
public java.util.ArrayList<StructDef> getTypesImpl()
- Specified by:
getTypesImpl
in interfaceDataContext
-
getTypeByCRC
public java.lang.String getTypeByCRC(int crc)
Description copied from interface:DataContext
Look up a named type by CRC for use directly by a StructureDefSeg or indirectly by an AnonTypeSeg.- Specified by:
getTypeByCRC
in interfaceDataContext
- Returns:
- The type suitable for use with CipStruct and/or StructMember.
-
getCtxDataImpl
public BaseDataType<?> getCtxDataImpl(java.util.List<PathSegment> reference)
Description copied from interface:DataContext
Look up reference data within this current context for use in indirection of various kinds, as described for getCtxData(), which uses this implementation and handles delegation to outer contexts.- Specified by:
getCtxDataImpl
in interfaceDataContext
- Parameters:
reference
- The path to a data item.- Returns:
- A data object
-
-