Class AbstractPort
- 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
-
- com.automation_pros.odva.cip.core.AbstractPort
-
- All Implemented Interfaces:
DataContext,AttributeHolder,CipMsgProcessor,java.lang.Comparable<CipInstance>
- Direct Known Subclasses:
EncapPort,LocalBusPort
public abstract class AbstractPort extends CipInstance implements CipMsgProcessor
-
-
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 CipDeviceMirrorappContextConxClassconxlistConxMgrMgrconxmgrprotected CipShortSTRINGdescriptionMsgRouterMgrmsgrouterprotected CipShortSTRINGportnameprotected CipUINTportnumprotected CipUINTporttypeprotected java.util.concurrent.ScheduledExecutorServiceproducerSchedulerprotected CipDWORDroutingprotected CipShortSTRINGtypename-
Fields inherited from class com.automation_pros.odva.cip.core.CipInstance
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 protectedAbstractPort(PortMgr parent, int port, java.lang.String name)protectedAbstractPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name)protectedAbstractPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name, int threads)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ConxClassgetConxClass()ConxMgrMgrgetConxMgr()java.lang.StringgetDescription()intgetMaxMsg()Return this message processor's max allowed message size in bytes.MsgRouterMgrgetMsgRouter()PortMgrgetParent()PortMgrgetPortMgr()java.lang.StringgetPortname()intgetPortnum()shortgetPorttype()java.util.concurrent.ScheduledExecutorServicegetProducerScheduler()intgetRouting()java.lang.StringgetTypename()abstract CipMsgProcessorgetUCMM(PortSeg seg)voidsend(CipRequest request)Core method to send or execute a request.voidsend(CipRequest request, int nesting)Given a request and a nesting level, evaluate the request in the UCMM's application context after skipping the specified nested path segments.voidsetDescription(java.lang.String description)CipInstancesetParent(CipTree parent)Set or remove the parent of this CipTree, possibly removing this object from a previous parent before assigning to the new parent.protected voidsetPortnum(int portnum)protected voidsetRouting(int routing)voidshutdown()-
Methods inherited from class com.automation_pros.odva.cip.core.CipInstance
compareTo, getAttribute, getEPathImpl, getSegment, isPrivate, number, service, toString
-
Methods inherited from class com.automation_pros.odva.cip.types.CipObject
executor, getChild, getDevice, getDisplayName, getName, isShutdown, logger, onReplacement, removeChildSymbol, scheduler, setChild, setChildSymbol, setName
-
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
-
porttype
protected final CipUINT porttype
-
portnum
protected final CipUINT portnum
-
portname
protected final CipShortSTRING portname
-
typename
protected final CipShortSTRING typename
-
description
protected final CipShortSTRING description
-
producerScheduler
protected final java.util.concurrent.ScheduledExecutorService producerScheduler
-
appContext
public final CipDeviceMirror appContext
-
msgrouter
public final MsgRouterMgr msgrouter
-
conxlist
public final ConxClass conxlist
-
conxmgr
public final ConxMgrMgr conxmgr
-
routing
protected CipDWORD routing
-
-
Constructor Detail
-
AbstractPort
protected AbstractPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name)
-
AbstractPort
protected AbstractPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name, int threads)
-
AbstractPort
protected AbstractPort(PortMgr parent, int port, java.lang.String name)
-
-
Method Detail
-
getProducerScheduler
public java.util.concurrent.ScheduledExecutorService getProducerScheduler()
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceAttributeHolder- Overrides:
shutdownin classCipObject
-
setParent
public CipInstance setParent(CipTree parent)
Description copied from class:CipTreeSet 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.- Overrides:
setParentin classCipInstance- Parameters:
parent- The new parent of this object.- Returns:
- The object replaced by this object in the parent, if any.
-
getPorttype
public short getPorttype()
-
getPortnum
public int getPortnum()
-
setPortnum
protected void setPortnum(int portnum)
-
getPortname
public java.lang.String getPortname()
-
getTypename
public java.lang.String getTypename()
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String description)
-
getRouting
public int getRouting()
-
setRouting
protected void setRouting(int routing)
-
send
public void send(CipRequest request)
Description copied from interface:CipMsgProcessorCore method to send or execute a request.- Specified by:
sendin interfaceCipMsgProcessor
-
send
public void send(CipRequest request, int nesting)
Description copied from interface:CipMsgProcessorGiven a request and a nesting level, evaluate the request in the UCMM's application context after skipping the specified nested path segments. Route paths may not be present in the application path. Implementations should override this naive default implementation if the request will be executed locally--no need to construct a trimmed request if it will not go over the wire.- Specified by:
sendin interfaceCipMsgProcessor
-
getMaxMsg
public int getMaxMsg()
Description copied from interface:CipMsgProcessorReturn this message processor's max allowed message size in bytes. Applies to both request and reply.- Specified by:
getMaxMsgin interfaceCipMsgProcessor- Returns:
-
getParent
public PortMgr getParent()
- Specified by:
getParentin interfaceAttributeHolder- Overrides:
getParentin classCipObject
-
getPortMgr
public PortMgr getPortMgr()
-
getUCMM
public abstract CipMsgProcessor getUCMM(PortSeg seg)
-
getMsgRouter
public MsgRouterMgr getMsgRouter()
-
getConxClass
public ConxClass getConxClass()
-
getConxMgr
public ConxMgrMgr getConxMgr()
-
-