Class CxMgrReq
- java.lang.Object
-
- com.automation_pros.odva.cip.requests.CipRequest
-
- com.automation_pros.odva.cip.requests.CxMgrReq
-
- All Implemented Interfaces:
CipReplyConsumer
,CipMessage
,java.io.Externalizable
,java.io.Serializable
- Direct Known Subclasses:
FwdCloseReq
,FwdOpenReq
,UnCxSendReq
public abstract class CxMgrReq extends CipRequest
All connection manager-specific service requests use a timeout constructed from a milliseconds value and a shift multiplier. Provide a common implementation.- 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 byte
priotick
byte
ticktime
-
Fields inherited from class com.automation_pros.odva.cip.requests.CipRequest
acceptTrace, acceptTS, callbacks, creationTrace, deadline, forecastReply, maxreply, path, scheduler, sentTS, sLogger, svccode
-
-
Constructor Summary
Constructors Constructor Description CxMgrReq()
Required for external deserialization.CxMgrReq(CipPath target, int service)
CxMgrReq(CipPath target, int service, java.nio.ByteBuffer source)
CxMgrReq(CxMgrReq other)
Construct a new Connection Manager request from another, decrementing the timeout appropriately.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CxMgrReq
clone()
int
getTimeoutMillis()
Convert this request's ticktime and priotick multiplier into milliseconds.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.void
setTimeoutMillis(int millis)
Convert a desired milliseconds timeout into ticktime and priotick multiplier values, within the valid range.-
Methods inherited from class com.automation_pros.odva.cip.requests.CipRequest
accept, accept, accept, addCallback, addCallback, addFutureCallback, bytes, decode, forecast, getPayload, getServiceCode, getSyncReply, getSyncReply, getTarget, payloadBytes, payloadLength, payloadString, put, putSyncReplyPayload, putSyncReplyPayload, readExternal, replyLength, rewrapRequest, service, service, serviceName, set, takeCallbacks, toBytes, toString, writeExternal
-
-
-
-
Constructor Detail
-
CxMgrReq
public CxMgrReq(CipPath target, int service)
- Parameters:
target
- Required to be ConxMgr.CONXMGRPATH.service
- One of FwdOpen, FwdClose, or UncxSend
-
CxMgrReq
public CxMgrReq(CipPath target, int service, java.nio.ByteBuffer source)
- Parameters:
target
- Required to be ConxMgr.CONXMGRPATH.service
- One of FwdOpen, FwdClose, or UncxSendsource
- A payload starting with priotick and ticktime
-
CxMgrReq
public CxMgrReq(CxMgrReq other)
Construct a new Connection Manager request from another, decrementing the timeout appropriately. The implementation must call setPayload() or otherwise populate the request.- Parameters:
other
-
-
CxMgrReq
public CxMgrReq()
Required for external deserialization.
-
-
Method Detail
-
clone
public CxMgrReq clone()
- Overrides:
clone
in classCipRequest
-
getTimeoutMillis
public int getTimeoutMillis()
Convert this request's ticktime and priotick multiplier into milliseconds.- Returns:
-
setTimeoutMillis
public void setTimeoutMillis(int millis)
Convert a desired milliseconds timeout into ticktime and priotick multiplier values, within the valid range. The maximum timeout that can be represented is 8,355.84 seconds.- Parameters:
millis
-
-
setPayload
public void setPayload(java.nio.ByteBuffer source)
Implementations must call this method at the beginning of their setPayload() method.- Specified by:
setPayload
in interfaceCipMessage
- Overrides:
setPayload
in classCipRequest
- Parameters:
source
- Source buffer containing the encoded new payload.
-
putPayload
public void putPayload(java.nio.ByteBuffer dest)
Implementations must call this method at the beginning of their putPayload() method.- Specified by:
putPayload
in interfaceCipMessage
- Overrides:
putPayload
in classCipRequest
- Parameters:
dest
- Destination buffer for the encoded payload.
-
-