Class CipInstance
- 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.CipInstance
-
- All Implemented Interfaces:
DataContext
,AttributeHolder
,java.lang.Comparable<CipInstance>
- Direct Known Subclasses:
AbstractPort
,Assembly
,ConxInstance
,CxManager
,EnetInstance
,Identity
,LgxChange
,LgxProgram
,LgxTag
,LgxTemplate
,MsgRouter
,Parameter
,TcpIpInstance
public abstract class CipInstance extends CipObject implements AttributeHolder, java.lang.Comparable<CipInstance>
-
-
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
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
attr_all
-
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 Modifier Constructor Description protected
CipInstance(InstanceSeg seg, InstanceHolder parent, java.lang.String name)
protected
CipInstance(InstanceHolder parent, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CipInstance inst)
CipAttribute
getAttribute(int inst)
Classes and class instances implement this interface, which indicates that this object contains attributes that can be retrieved by number.CipPath
getEPathImpl()
Retrieve the application path that leads to this object starting at the root (no parent).InstanceSeg
getSegment()
boolean
isPrivate()
int
number()
void
service(CipObject appContext, CipRequest request, int nesting)
Execute a CIP service on the object, using the request supplied.CipInstance
setParent(CipTree parent)
Set or remove the parent of this CipTree, possibly removing this object from a previous parent before assigning to the new parent.java.lang.String
toString()
-
Methods inherited from class com.automation_pros.odva.cip.types.CipObject
executor, getChild, getDevice, getDisplayName, getName, getParent, isShutdown, logger, onReplacement, removeChildSymbol, scheduler, setChild, setChildSymbol, setName, shutdown
-
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, getParent, isShutdown, logger, scheduler, shutdown
-
Methods inherited from interface com.automation_pros.odva.cip.data.DataContext
fromEnum, getCtxData, getCtxDataOrNull, getTypes, makeHosted, makeUnhosted, toEnum
-
-
-
-
Constructor Detail
-
CipInstance
protected CipInstance(InstanceSeg seg, InstanceHolder parent, java.lang.String name)
-
CipInstance
protected CipInstance(InstanceHolder parent, java.lang.String name)
-
-
Method Detail
-
getSegment
public InstanceSeg getSegment()
- Specified by:
getSegment
in interfaceAttributeHolder
- Overrides:
getSegment
in classCipTree
-
number
public int number()
-
compareTo
public int compareTo(CipInstance inst)
- Specified by:
compareTo
in interfacejava.lang.Comparable<CipInstance>
-
service
public void service(CipObject appContext, CipRequest request, int nesting)
Description copied from class:CipObject
Execute a CIP service on the object, using the request supplied. Supply a reply to the request and/or throw an appropriate CipException. Replies are not required before this routine returns.
Direct service() calls MUST NOT BLOCK. Any operation that will take any significant time must be delegated to an executor. "Significant" may vary by application, but typically would be in the fractional millisecond range.
- Specified by:
service
in interfaceAttributeHolder
- Overrides:
service
in classCipObject
- Parameters:
appContext
- Root object for application path lookups. Generally aMirrored Device
from a port context.request
- What to do and where to reply. Services to be handled by child objects are to be passed to their service() method with nesting+1.nesting
- How many leading path segments items to skip when processing this request. Avoids copying the balance of an application path into a new request when passing a request to a child object.
-
getEPathImpl
public CipPath getEPathImpl()
Description copied from class:CipTree
Retrieve the application path that leads to this object starting at the root (no parent). Will be called by getEPath() and the result cached by default.Root elements must override this to return an empty CipPath.
- Overrides:
getEPathImpl
in classCipTree
- Returns:
-
getAttribute
public CipAttribute getAttribute(int inst)
Description copied from interface:AttributeHolder
Classes and class instances implement this interface, which indicates that this object contains attributes that can be retrieved by number.- Specified by:
getAttribute
in interfaceAttributeHolder
- Parameters:
inst
- The attribute number to retrieve, 1-65535.- Returns:
- The attribute object or null if it doesn't exist
-
setParent
public CipInstance setParent(CipTree parent)
Description copied from class:CipTree
Set or remove the parent of this CipTree, possibly removing this object from a previous parent before assigning to the new parent. Override this method if additional housekeeping is required when assigning or removing parents.
-
isPrivate
public boolean isPrivate()
-
-