Package com.automation_pros.odva.logix
Class LgxTplMgr
- java.lang.Object
-
- com.automation_pros.odva.cip.types.CipTree
-
- com.automation_pros.odva.cip.types.CipTreeCtx
-
- com.automation_pros.odva.cip.types.CipObject
-
- com.automation_pros.odva.cip.core.CipClass
-
- com.automation_pros.odva.logix.LgxTplMgr
-
- All Implemented Interfaces:
DataContext
,AttributeHolder
,InstanceHolder
public class LgxTplMgr extends CipClass
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.automation_pros.odva.cip.types.CipObject
CipObject.FutureMultipleReply
-
Nested classes/interfaces inherited from class com.automation_pros.odva.cip.types.CipTree
CipTree.ChildMap
-
Nested classes/interfaces inherited from interface com.automation_pros.odva.cip.types.InstanceHolder
InstanceHolder.InstanceHolderDelegate, InstanceHolder.MaxInstData, InstanceHolder.NumInstData
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.Class<? extends BaseDataType<?>>>
baseTypes
protected java.util.Map<java.lang.String,LgxTemplate>
namedTypes
-
Fields inherited from class com.automation_pros.odva.cip.core.CipClass
attr_all, classCode, delegate, mxclsattr, mxinstattr, revision
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StructMember
createLgxMbr(java.lang.String name, java.lang.String typeName, int[] dims)
Construct a logix template type member item given a name, the type name, and the dimensions.java.lang.Class<? extends BaseDataType<?>>
getBaseType(java.lang.String name)
LgxDevice
getDevice()
CipObjects are expected to be organized as a tree, typically with a CipDevice at the root.LgxTemplate
getInstance(int inst)
LgxTemplate
getNamedType(java.lang.String name)
LgxDevice
getParent()
java.util.List<LgxTemplate>
getTemplates()
java.lang.Object
getType(java.lang.String name)
Returns the class of a base data type or the Logix Template instance for the named type.LgxTemplate
registerName(java.lang.String name, LgxTemplate tpl)
CipObject
setChild(CipTree child, PathSegment seg)
Assign a given CipTree as a child of this CipTree identified by a specific PathSegment.void
shutdown()
void
unRegisterName(java.lang.String name, LgxTemplate tpl)
void
validateType(java.lang.String typeName)
-
Methods inherited from class com.automation_pros.odva.cip.core.CipClass
getAttribute, getAutoInstanceNumber, getEPathImpl, getInstances, getMaxInstance, getNumInstances, getRevision, getSegment, service
-
Methods inherited from class com.automation_pros.odva.cip.types.CipObject
executor, getChild, getDisplayName, getName, isShutdown, logger, onReplacement, removeChildSymbol, scheduler, setChildSymbol, setName, setParent, toString
-
Methods inherited from class com.automation_pros.odva.cip.types.CipTreeCtx
getCtxDataImpl, getNamedDef, getParentDataCtx, getTypeByCRC, getTypeByName, getTypesImpl
-
Methods inherited from class com.automation_pros.odva.cip.types.CipTree
cleanup, entrySet, follow, getChildren, getEPath, keySet, removeChild, setSegment
-
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.types.AttributeHolder
executor, getChild, getDisplayName, getEPath, isShutdown, logger, scheduler
-
Methods inherited from interface com.automation_pros.odva.cip.data.DataContext
fromEnum, getCtxData, getCtxDataOrNull, getTypes, makeHosted, makeUnhosted, toEnum
-
-
-
-
Field Detail
-
namedTypes
protected java.util.Map<java.lang.String,LgxTemplate> namedTypes
-
baseTypes
public static final java.util.Map<java.lang.String,java.lang.Class<? extends BaseDataType<?>>> baseTypes
-
-
Constructor Detail
-
LgxTplMgr
public LgxTplMgr(LgxDevice parent)
-
-
Method Detail
-
getParent
public LgxDevice getParent()
- Specified by:
getParent
in interfaceAttributeHolder
- Overrides:
getParent
in classCipObject
-
getDevice
public LgxDevice getDevice()
Description copied from class:CipObject
CipObjects are expected to be organized as a tree, typically with a CipDevice at the root. (CipDevices can have a parent too, if an implementer chooses to represent a virtual chassis that way.)By default, any CipObject will simply ask its parent for the device if asked for the device. A CipDevice returns itself.
-
getType
public java.lang.Object getType(java.lang.String name)
Returns the class of a base data type or the Logix Template instance for the named type.- Parameters:
name
-- Returns:
-
getBaseType
public java.lang.Class<? extends BaseDataType<?>> getBaseType(java.lang.String name)
-
getNamedType
public LgxTemplate getNamedType(java.lang.String name)
-
validateType
public void validateType(java.lang.String typeName)
-
createLgxMbr
public StructMember createLgxMbr(java.lang.String name, java.lang.String typeName, int[] dims)
Construct a logix template type member item given a name, the type name, and the dimensions. Cannot create a boolean hosted in another integer member. Use the LgxStructMbr constructor directly in that case.- Parameters:
name
-typeName
-dims
-- Returns:
-
registerName
public LgxTemplate registerName(java.lang.String name, LgxTemplate tpl)
-
unRegisterName
public void unRegisterName(java.lang.String name, LgxTemplate tpl)
-
getTemplates
public java.util.List<LgxTemplate> getTemplates()
-
setChild
public CipObject setChild(CipTree child, PathSegment seg)
Description copied from class:CipTree
Assign a given CipTree as a child of this CipTree identified by a specific PathSegment. If that path segment is already registered to a different child CipTree, replace it and return that old child.
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceAttributeHolder
- Overrides:
shutdown
in classCipClass
-
getInstance
public LgxTemplate getInstance(int inst)
- Specified by:
getInstance
in interfaceInstanceHolder
- Overrides:
getInstance
in classCipClass
-
-