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 short
connSN
byte
dirtrigcls
java.net.InetAddress
mcast
int
O2TconnID
ConxClass.CxParams
O2Tparams
int
O2Trpi
int
origSN
CipPath
route
protected static org.slf4j.Logger
sLogger
int
T2OconnID
ConxClass.CxParams
T2Oparams
int
T2Orpi
byte
timeoutMult
short
vendor
-
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 void
accept(CipReply reply)
Applications and routers call this method with the actual reply to pass back up the chain of callers.FwdOpenReq
clone()
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.int
payloadLength()
Subclasses must override this unless they populate the payload and payloadActual fields.void
putPayload(java.nio.ByteBuffer dest)
Implementations must call this method at the beginning of their putPayload() method.void
setPayload(java.nio.ByteBuffer source)
Implementations must call this method at the beginning of their setPayload() method.java.lang.String
toString()
-
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:CxMgrReq
Implementations must call this method at the beginning of their setPayload() method.- Specified by:
setPayload
in interfaceCipMessage
- Overrides:
setPayload
in classCxMgrReq
- Parameters:
source
- Source buffer containing the encoded new payload.
-
putPayload
public void putPayload(java.nio.ByteBuffer dest)
Description copied from class:CxMgrReq
Implementations must call this method at the beginning of their putPayload() method.- Specified by:
putPayload
in interfaceCipMessage
- Overrides:
putPayload
in classCxMgrReq
- Parameters:
dest
- Destination buffer for the encoded payload.
-
payloadLength
public int payloadLength()
Description copied from class:CipRequest
Subclasses must override this unless they populate the payload and payloadActual fields.- Specified by:
payloadLength
in interfaceCipMessage
- Overrides:
payloadLength
in classCipRequest
- Returns:
- The byte length of the encoded payload only.
-
accept
public void accept(CipReply reply)
Description copied from class:CipRequest
Applications 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:
accept
in interfaceCipReplyConsumer
- Overrides:
accept
in classCipRequest
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCipRequest
-
-