Package com.automation_pros.odva.encap
Class EncapPort
- java.lang.Object
-
- All Implemented Interfaces:
DataContext
,AttributeHolder
,CipMsgProcessor
,java.lang.Comparable<CipInstance>
- Direct Known Subclasses:
TcpIpPort
public class EncapPort extends AbstractPort
Partial implementation of an Ethernet/IP Encapsulation port. Includes just Class3 origination--no local listening TCP or UDP ports. If not null, the InetAddress provided at creation will be used as the source address for outbound connections.The TcpIpPort class extends this to provide the Class 3 listeners and the Class 0/1 UDP support.
-
-
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 io.netty.channel.EventLoopGroup
encapWork
protected boolean
inboundEnabled
protected java.net.InetAddress
inetaddr
static java.util.concurrent.atomic.AtomicInteger
newSessionID
protected boolean
outboundEnabled
-
Fields inherited from class com.automation_pros.odva.cip.core.AbstractPort
appContext, conxlist, conxmgr, description, msgrouter, portname, portnum, porttype, producerScheduler, routing, 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
EncapPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name, java.net.InetAddress fromAddress, int threads)
EncapPort(java.lang.String name, java.net.InetAddress fromAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CipMsgProcessor
dedicatedUCMM(java.net.InetSocketAddress target)
java.net.InetAddress
getInetAddr()
CipMsgProcessor
getUCMM(PortSeg seg)
boolean
isInboundEnabled()
boolean
isOutboundEnabled()
void
setInboundEnabled(boolean inboundEnabled)
void
setOutboundEnabled(boolean outboundEnabled)
void
shutdown()
-
Methods inherited from class com.automation_pros.odva.cip.core.AbstractPort
getConxClass, getConxMgr, getDescription, getMaxMsg, getMsgRouter, getParent, getPortMgr, getPortname, getPortnum, getPorttype, getProducerScheduler, getRouting, getTypename, send, send, setDescription, setParent, setPortnum, setRouting
-
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
-
newSessionID
public static java.util.concurrent.atomic.AtomicInteger newSessionID
-
inetaddr
protected final java.net.InetAddress inetaddr
-
inboundEnabled
protected boolean inboundEnabled
-
outboundEnabled
protected boolean outboundEnabled
-
encapWork
protected io.netty.channel.EventLoopGroup encapWork
-
-
Constructor Detail
-
EncapPort
public EncapPort(java.lang.String name, java.net.InetAddress fromAddress)
-
EncapPort
protected EncapPort(InstanceSeg seg, PortMgr parent, int port, java.lang.String name, java.net.InetAddress fromAddress, int threads)
-
-
Method Detail
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceAttributeHolder
- Overrides:
shutdown
in classAbstractPort
-
isInboundEnabled
public boolean isInboundEnabled()
-
setInboundEnabled
public void setInboundEnabled(boolean inboundEnabled)
-
isOutboundEnabled
public boolean isOutboundEnabled()
-
setOutboundEnabled
public void setOutboundEnabled(boolean outboundEnabled)
-
getInetAddr
public java.net.InetAddress getInetAddr()
-
dedicatedUCMM
public CipMsgProcessor dedicatedUCMM(java.net.InetSocketAddress target)
-
getUCMM
public CipMsgProcessor getUCMM(PortSeg seg)
- Specified by:
getUCMM
in classAbstractPort
-
-