Class CipClass
- 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
-
- All Implemented Interfaces:
DataContext
,AttributeHolder
,InstanceHolder
- Direct Known Subclasses:
AssyMgr
,CipClassMirror
,ConxClass
,ConxMgrMgr
,EthernetMgr
,IdentityMgr
,LgxChangeMgr
,LgxTagMgr
,LgxTplMgr
,MsgRouterMgr
,ParamMgr
,PortMgr
,TcpIp
public abstract class CipClass extends CipObject implements AttributeHolder, InstanceHolder
-
-
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 protected int[]
attr_all
protected int
classCode
protected InstanceHolder.InstanceHolderDelegate
delegate
protected CipUINT
mxclsattr
protected CipUINT
mxinstattr
protected CipUINT
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 CipAttribute
getAttribute(int attr)
Classes and class instances implement this interface, which indicates that this object contains attributes that can be retrieved by number.int
getAutoInstanceNumber()
Instance holders may have specific rules for instance IDs for dynamically created instances (null InstanceSeg).protected CipPath
getEPathImpl()
Retrieve the application path that leads to this object starting at the root (no parent).CipInstance
getInstance(int inst)
int[]
getInstances()
Classes have a variety of reasons to inspect a list of their own instances, including finding unused IDs for new instances.int
getMaxInstance()
int
getNumInstances()
short
getRevision()
ClassSeg
getSegment()
void
service(CipObject appContext, CipRequest request, int nesting)
Execute a CIP service on the object, using the request supplied.void
shutdown()
-
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, 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, getParent, isShutdown, logger, scheduler
-
Methods inherited from interface com.automation_pros.odva.cip.data.DataContext
fromEnum, getCtxData, getCtxDataOrNull, getTypes, makeHosted, makeUnhosted, toEnum
-
-
-
-
Field Detail
-
revision
protected CipUINT revision
-
mxclsattr
protected CipUINT mxclsattr
-
mxinstattr
protected CipUINT mxinstattr
-
classCode
protected int classCode
-
attr_all
protected int[] attr_all
-
delegate
protected InstanceHolder.InstanceHolderDelegate delegate
-
-
Method Detail
-
getSegment
public ClassSeg getSegment()
- Specified by:
getSegment
in interfaceAttributeHolder
- Overrides:
getSegment
in classCipTree
-
getRevision
public short getRevision()
-
getMaxInstance
public int getMaxInstance()
- Specified by:
getMaxInstance
in interfaceInstanceHolder
-
getNumInstances
public int getNumInstances()
- Specified by:
getNumInstances
in interfaceInstanceHolder
-
getInstances
public int[] getInstances()
Classes have a variety of reasons to inspect a list of their own instances, including finding unused IDs for new instances.- Specified by:
getInstances
in interfaceInstanceHolder
- Returns:
- Sorted list of instance ID numbers
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceAttributeHolder
- Overrides:
shutdown
in classCipObject
-
getAutoInstanceNumber
public int getAutoInstanceNumber()
Description copied from interface:InstanceHolder
Instance holders may have specific rules for instance IDs for dynamically created instances (null InstanceSeg). The delegate uses the lowest open instance number. The caller should synchronize on the holder's public "children" field before calling this until after setting the child's segment.- Specified by:
getAutoInstanceNumber
in interfaceInstanceHolder
- Returns:
-
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
protected 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 attr)
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:
attr
- The attribute number to retrieve, 1-65535.- Returns:
- The attribute object or null if it doesn't exist
-
getInstance
public CipInstance getInstance(int inst)
- Specified by:
getInstance
in interfaceInstanceHolder
-
-