Class 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
    • 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

      • 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 class CipRequest
        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 interface CipReplyConsumer
        Overrides:
        accept in class CipRequest