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 CipDeviceMirror
appContext
ConxClass
conxlist
ConxMgrMgr
conxmgr
protected CipShortSTRING
description
MsgRouterMgr
msgrouter
protected CipShortSTRING
portname
protected CipUINT
portnum
protected CipUINT
porttype
protected java.util.concurrent.ScheduledExecutorService
producerScheduler
protected CipDWORD
routing
protected CipShortSTRING
typename
-
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 protected
AbstractPort(PortMgr parent, int port, java.lang.String name)
protected
AbstractPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name)
protected
AbstractPort(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 ConxClass
getConxClass()
ConxMgrMgr
getConxMgr()
java.lang.String
getDescription()
int
getMaxMsg()
Return this message processor's max allowed message size in bytes.MsgRouterMgr
getMsgRouter()
PortMgr
getParent()
PortMgr
getPortMgr()
java.lang.String
getPortname()
int
getPortnum()
short
getPorttype()
java.util.concurrent.ScheduledExecutorService
getProducerScheduler()
int
getRouting()
java.lang.String
getTypename()
abstract CipMsgProcessor
getUCMM(PortSeg seg)
void
send(CipRequest request)
Core method to send or execute a request.void
send(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.void
setDescription(java.lang.String description)
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.protected void
setPortnum(int portnum)
protected void
setRouting(int routing)
void
shutdown()
-
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:
shutdown
in interfaceAttributeHolder
- Overrides:
shutdown
in classCipObject
-
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.- Overrides:
setParent
in 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:CipMsgProcessor
Core method to send or execute a request.- Specified by:
send
in interfaceCipMsgProcessor
-
send
public void send(CipRequest request, int nesting)
Description copied from interface:CipMsgProcessor
Given 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:
send
in interfaceCipMsgProcessor
-
getMaxMsg
public int getMaxMsg()
Description copied from interface:CipMsgProcessor
Return this message processor's max allowed message size in bytes. Applies to both request and reply.- Specified by:
getMaxMsg
in interfaceCipMsgProcessor
- Returns:
-
getParent
public PortMgr getParent()
- Specified by:
getParent
in interfaceAttributeHolder
- Overrides:
getParent
in classCipObject
-
getPortMgr
public PortMgr getPortMgr()
-
getUCMM
public abstract CipMsgProcessor getUCMM(PortSeg seg)
-
getMsgRouter
public MsgRouterMgr getMsgRouter()
-
getConxClass
public ConxClass getConxClass()
-
getConxMgr
public ConxMgrMgr getConxMgr()
-
-