Class FwdOpenReq
- java.lang.Object
-
- com.automation_pros.odva.cip.requests.CipRequest
-
- com.automation_pros.odva.cip.requests.CxMgrReq
-
- com.automation_pros.odva.cip.requests.FwdOpenReq
-
- All Implemented Interfaces:
CipReplyConsumer,CipMessage,java.io.Externalizable,java.io.Serializable
public class FwdOpenReq extends CxMgrReq
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.automation_pros.odva.cip.requests.CipRequest
CipRequest.CallbackException, CipRequest.ChainedException, CipRequest.ReplyFuture
-
-
Field Summary
Fields Modifier and Type Field Description shortconnSNbytedirtrigclsjava.net.InetAddressmcastintO2TconnIDConxClass.CxParamsO2TparamsintO2TrpiintorigSNCipPathrouteprotected static org.slf4j.LoggersLoggerintT2OconnIDConxClass.CxParamsT2OparamsintT2OrpibytetimeoutMultshortvendor-
Fields inherited from class com.automation_pros.odva.cip.requests.CipRequest
acceptTrace, acceptTS, callbacks, creationTrace, deadline, forecastReply, maxreply, path, scheduler, sentTS, svccode
-
-
Constructor Summary
Constructors Constructor Description FwdOpenReq()Required for external deserialization.FwdOpenReq(boolean large)FwdOpenReq(int service, java.nio.ByteBuffer source)FwdOpenReq(CipPath target, int service)FwdOpenReq(CipPath target, int service, java.nio.ByteBuffer payload)FwdOpenReq(FwdOpenReq other, int nesting)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(CipReply reply)Applications and routers call this method with the actual reply to pass back up the chain of callers.FwdOpenReqclone()static FwdOpenReqmakeMessagingReq(CipPath route, int size)Given a network route path and desired size, construct a forward open request to the target's message router.intpayloadLength()Subclasses must override this unless they populate the payload and payloadActual fields.voidputPayload(java.nio.ByteBuffer dest)Implementations must call this method at the beginning of their putPayload() method.voidsetPayload(java.nio.ByteBuffer source)Implementations must call this method at the beginning of their setPayload() method.java.lang.StringtoString()-
Methods inherited from class com.automation_pros.odva.cip.requests.CxMgrReq
getTimeoutMillis, setTimeoutMillis
-
Methods inherited from class com.automation_pros.odva.cip.requests.CipRequest
accept, accept, addCallback, addCallback, addFutureCallback, bytes, decode, forecast, getPayload, getServiceCode, getSyncReply, getSyncReply, getTarget, payloadBytes, payloadString, put, putSyncReplyPayload, putSyncReplyPayload, readExternal, replyLength, rewrapRequest, service, service, serviceName, set, takeCallbacks, toBytes, writeExternal
-
-
-
-
Field Detail
-
sLogger
protected static org.slf4j.Logger sLogger
-
O2TconnID
public int O2TconnID
-
T2OconnID
public int T2OconnID
-
connSN
public short connSN
-
vendor
public short vendor
-
origSN
public int origSN
-
timeoutMult
public byte timeoutMult
-
O2Trpi
public int O2Trpi
-
O2Tparams
public ConxClass.CxParams O2Tparams
-
T2Orpi
public int T2Orpi
-
T2Oparams
public ConxClass.CxParams T2Oparams
-
dirtrigcls
public byte dirtrigcls
-
route
public CipPath route
-
mcast
public java.net.InetAddress mcast
-
-
Constructor Detail
-
FwdOpenReq
public FwdOpenReq()
Required for external deserialization.
-
FwdOpenReq
public FwdOpenReq(FwdOpenReq other, int nesting)
-
FwdOpenReq
public FwdOpenReq(CipPath target, int service)
-
FwdOpenReq
public FwdOpenReq(CipPath target, int service, java.nio.ByteBuffer payload)
-
FwdOpenReq
public FwdOpenReq(boolean large)
-
FwdOpenReq
public FwdOpenReq(int service, java.nio.ByteBuffer source)
-
-
Method Detail
-
makeMessagingReq
public static FwdOpenReq makeMessagingReq(CipPath route, int size)
Given a network route path and desired size, construct a forward open request to the target's message router.- Parameters:
route- Port segments, electronic keys, and network parameter segments only.size- Desired buffer size. The result will be a Large Forward Open if > 511.- Returns:
-
clone
public FwdOpenReq clone()
-
setPayload
public void setPayload(java.nio.ByteBuffer source)
Description copied from class:CxMgrReqImplementations must call this method at the beginning of their setPayload() method.- Specified by:
setPayloadin interfaceCipMessage- Overrides:
setPayloadin classCxMgrReq- Parameters:
source- Source buffer containing the encoded new payload.
-
putPayload
public void putPayload(java.nio.ByteBuffer dest)
Description copied from class:CxMgrReqImplementations must call this method at the beginning of their putPayload() method.- Specified by:
putPayloadin interfaceCipMessage- Overrides:
putPayloadin classCxMgrReq- Parameters:
dest- Destination buffer for the encoded payload.
-
payloadLength
public int payloadLength()
Description copied from class:CipRequestSubclasses must override this unless they populate the payload and payloadActual fields.- Specified by:
payloadLengthin interfaceCipMessage- Overrides:
payloadLengthin classCipRequest- Returns:
- The byte length of the encoded payload only.
-
accept
public void accept(CipReply reply)
Description copied from class:CipRequestApplications and routers call this method with the actual reply to pass back up the chain of callers. Routers must embed some form of ID code in their protocol packets to associate requests with replies. DeviceNet uses originator node address and a 16-bit transaction ID. Ethernet/IP uses the 64-bit Sender Context field of its encapsulation header. CIP over DF1 uses the 16-bit Transaction Number inside of PCCC encapsulation.- Specified by:
acceptin interfaceCipReplyConsumer- Overrides:
acceptin classCipRequest
-
toString
public java.lang.String toString()
- Overrides:
toStringin classCipRequest
-
-