Class GetGenericReq
- java.lang.Object
-
- com.automation_pros.odva.cip.requests.CipRequest
-
- com.automation_pros.odva.cip.requests.GetGenericReq
-
- All Implemented Interfaces:
CipReplyConsumer
,CipMessage
,java.io.Externalizable
,java.io.Serializable
public class GetGenericReq extends CipRequest
This generic service delivers the reply payload to a given data object's setPayload method. It can optionally include a request payload buffer. For services like GetAttributeSingle where the response is not a single elementary type, use a CipStruct composed of the necessary elements with the expected alignment.- 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 BaseDataType<?>
attrValue
Attribute value data object that will be filled from the payload in accept().int
payloadConsumed
-
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 GetGenericReq(CipPath target, int serviceCode, BaseDataType<?> attrValue)
GetGenericReq(CipPath target, int serviceCode, java.nio.ByteBuffer source, BaseDataType<?> attrValue)
-
Method Summary
All 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.GetGenericReq
clone()
int
replyLength()
If this request was created with a data object instance to fill in, and it has a fixed length payload, the reply packet size can be predicted.-
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, payloadLength, payloadString, put, putPayload, putSyncReplyPayload, putSyncReplyPayload, readExternal, rewrapRequest, service, service, serviceName, set, setPayload, takeCallbacks, toBytes, toString, writeExternal
-
-
-
-
Field Detail
-
attrValue
public final BaseDataType<?> attrValue
Attribute value data object that will be filled from the payload in accept().
-
payloadConsumed
public int payloadConsumed
-
-
Constructor Detail
-
GetGenericReq
public GetGenericReq(CipPath target, int serviceCode, BaseDataType<?> attrValue)
-
GetGenericReq
public GetGenericReq(CipPath target, int serviceCode, java.nio.ByteBuffer source, BaseDataType<?> attrValue)
-
-
Method Detail
-
clone
public GetGenericReq clone()
- Overrides:
clone
in classCipRequest
-
replyLength
public int replyLength()
If this request was created with a data object instance to fill in, and it has a fixed length payload, the reply packet size can be predicted. Otherwise returns zero.- Overrides:
replyLength
in classCipRequest
- Returns:
-
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
-
-