Class IOConx
- java.lang.Object
-
- All Implemented Interfaces:
DataContext,CipReplyConsumer,AppLinkBase,AppOwner,AppProducer,AttributeHolder,LinkConsumer,java.lang.Comparable<CipInstance>
public class IOConx extends LocalConx
-
-
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 AppOwnerAdapteraoaprotected AppProducerAdapterapaprotected ConnectableappProducerprotected byte[]lastProducedprotected intlastProducedActualprotected java.lang.ref.Cleaner.CleanablelastProducedCleanprotected longlastTxIDprotected java.util.concurrent.ScheduledFuture<?>producerFutureprotected longTxInhDeadlinelongTxInhnsecprotected longTxT2ODeadlinelongTxT2Onsec-
Fields inherited from class com.automation_pros.odva.cip.core.ConxInstance
appConsumer, connSN, consapi, consid, conssize, consumer, cxstate, deadline, dirtrigcls, DNconsid, DNmsggrps, DNprodid, insttype, linkProducer, O2Tapi, O2TconnID, O2TconnIDrq, O2Tparams, O2Trpi, oport, origSN, pktrate, prodapi, prodid, prodinh, prodsize, producer, T2Oapi, T2OconnID, T2OconnIDrq, T2Oparams, T2Orpi, timeoutMult, tport, vendor, WDTDeadline, WDTnsec, wdtoact
-
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 Constructor Description IOConx(ConxClass parent, FwdOpenReq request, java.util.List<CipPath> appPaths, java.util.List<CipObject> appObjects, SimpleDataSeg data, int inhibit)IOConx(InstanceSeg inst, ConxClass parent, FwdOpenReq request, java.util.List<CipPath> appPaths, java.util.List<CipObject> appObjects, SimpleDataSeg data, int inhibit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(CipReply t)Subclasses whose constructor defers replying to the forward open request must add the connection to the request's callback list, and call super.accept() to finalize the connection details.voidappProduce(long txID, java.nio.ByteBuffer payload)Connections must be able to receive arbitrary payloads from their connected applications.protected voidensureLastProduced(int size)protected AppConsumergetAppConsumer(CipObject obj)voidlinkConsume(long txID, java.nio.ByteBuffer payload)Connections must be able to receive arbitrary payloads from port links.voidshutdown()-
Methods inherited from class com.automation_pros.odva.cip.core.ConxInstance
disconnect, getConsumer, getConsumerID, getConsumerSize, getConsumeRTF, getConxData, getCXState, getDeadline, getDirTrigCls, getDNConsumerID, getDNMsgGroups, getDNProducerID, getInhibit, getInstanceType, getPacketRate, getParent, getProducer, getProducerID, getProducerSize, getProduceRTF, getRealTimeMode, isDisconnected, setRealTimeMode, toString
-
Methods inherited from class com.automation_pros.odva.cip.core.CipInstance
compareTo, getAttribute, getEPathImpl, getSegment, isPrivate, number, service, setParent
-
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
-
appProducer
protected Connectable appProducer
-
TxT2Onsec
public long TxT2Onsec
-
TxInhnsec
public long TxInhnsec
-
producerFuture
protected java.util.concurrent.ScheduledFuture<?> producerFuture
-
TxT2ODeadline
protected long TxT2ODeadline
-
TxInhDeadline
protected long TxInhDeadline
-
aoa
protected AppOwnerAdapter aoa
-
apa
protected AppProducerAdapter apa
-
lastProduced
protected byte[] lastProduced
-
lastProducedActual
protected int lastProducedActual
-
lastProducedClean
protected java.lang.ref.Cleaner.Cleanable lastProducedClean
-
lastTxID
protected long lastTxID
-
-
Constructor Detail
-
IOConx
public IOConx(InstanceSeg inst, ConxClass parent, FwdOpenReq request, java.util.List<CipPath> appPaths, java.util.List<CipObject> appObjects, SimpleDataSeg data, int inhibit)
-
IOConx
public IOConx(ConxClass parent, FwdOpenReq request, java.util.List<CipPath> appPaths, java.util.List<CipObject> appObjects, SimpleDataSeg data, int inhibit)
-
-
Method Detail
-
getAppConsumer
protected AppConsumer getAppConsumer(CipObject obj)
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceAttributeHolder- Overrides:
shutdownin classConxInstance
-
accept
public void accept(CipReply t)
Description copied from class:ConxInstanceSubclasses whose constructor defers replying to the forward open request must add the connection to the request's callback list, and call super.accept() to finalize the connection details. If not shutdown on return, proceed with subclass-specific finalization. That must include a call to getParent().bgPing().- Specified by:
acceptin interfaceCipReplyConsumer- Overrides:
acceptin classConxInstance- Parameters:
t- Any CipReply. If a Forward Open Response, apply the final connection parameters.
-
linkConsume
public void linkConsume(long txID, java.nio.ByteBuffer payload)Description copied from class:ConxInstanceConnections must be able to receive arbitrary payloads from port links. These would be TCP or UDP sockets in Ethernet/IP, platform-dependent OS devices in DeviceNet or other physical transports, or peer connections in bridging.The connection's watchdog timer is updated on link packet processing.
- Specified by:
linkConsumein interfaceLinkConsumer- Overrides:
linkConsumein classConxInstance- Parameters:
txID- Link-specific transaction ID. Not always 64 bits, if used at all.payload- The CIP payload extracted from the outer transport protocol.
-
ensureLastProduced
protected void ensureLastProduced(int size)
-
appProduce
public void appProduce(long txID, java.nio.ByteBuffer payload)Description copied from class:ConxInstanceConnections must be able to receive arbitrary payloads from their connected applications. These would be producing assemblies in typical I/O connections, producing tags in a Logix system, message replies from a message router, or a bridging connection peer.Application packet production does not normally update the connection's watchdog timer.
- Specified by:
appProducein interfaceAppProducer- Overrides:
appProducein classConxInstance- Parameters:
txID- Transaction ID. Not always 64 bits, if used at all. If applicable, matches the txID consumed by the application for this message.payload- The CIP payload to send to the outer transport protocol.
-
-