Class OmronProbe


  • public class OmronProbe
    extends java.lang.Object
    Reverse engineered probe for Omron NJ/NX global variables and associated data types. Global variables set to "Do Not Publish" are excluded from the responses described here.

    Basic Sequence:

    1. Open a large messaging connection, size 1996 bytes, for the following.
    2. Obtain UDINT quantity from class 0x6a instance 0 attribute 0x68. Note: this is not a max instance number, but the actual quantity to recover.
    3. Request start of tag list via service 0x5f class 0x6a instance 0 with payload StartInstance=UDINT Qty=UDINT Unk=UINT where StartInstance is 1, Qty is from above, and Unk is 2.
    4. Decode response. Buffer starts with UDINT response quantity, followed by that many of tag browse structures, which include instance numbers and tag names.

    5. Request continuation if necessary, where StartInstance is one beyond the last instance previously reported.
    6. For each tag instance reported, issue GAA against class 0x6b for that instance. See gaaTagSrc.
    7. For defined types, issue GAA against class 0x6c for the start instance, which names the type, and linked instances, which name each member. See gaaTypeSrc. For the start instance, allocation is the size of the complete type, nested and dimq must be zero, and innerinst2/4 points at the first member. For member instances, membersq and crc are zero, chaininst2/4 points at the next member, and innerinst2/4 point at nested type instances.

    Results are delivered at the end via the serializable type OmronProbeReport.

    Tag names, type names, and type member names are limited to 127 bytes, not including the padding, and after UTF-8 encoding.

    Final results are expected to be wrapped in an OmronProbeContext for instance (decoder/encoders) creation and path traversals.

    • Constructor Detail

      • OmronProbe

        public OmronProbe​(boolean verbose)
        No variant probe behavior for Omron.
    • Method Detail

      • addLog

        protected void addLog​(java.lang.String s)
      • conditionalLogException

        protected boolean conditionalLogException​(CipReply reply)
      • resetLog

        protected java.lang.String resetLog()
      • send

        protected void send​(CipRequest bare)
        Common code for sending the queries the probe state machine produces. The next downstream message processor performs the batching. If necessary, another downstream message processor adds an unconnected messaging route wrapper.
        Parameters:
        bare - Single CipRequest with sequence callback already attached.
      • start

        public java.util.concurrent.CompletableFuture<OmronProbeReport> start​(CipMsgProcessor mp,
                                                                              CipPath route)
        Actual message traffic begins when a Message Processor is supplied, either an UnConnected Message Manager, or an established Messaging Connection. If the former, include any necessary route path to the target processor (through the port). If the latter, route must be null or empty. Execution proceeds asynchronously via a dedicated thread.

        Progress reports are delivered to listeners as responses are received, except when assembling fragments of a data type template definition.

        Parameters:
        mp - The message processor instance. If an UnConnected Message Manager, it will typically be an instance of TcpConx, though it could also be an implementation of AbstractPort.
        route - The route may be null or empty if connecting to a target processor's built-in ethernet port.
        Returns:
        The completable future that will receive the final OmronProbeReport. Use of the CompletableFuture.whenComplete(BiConsumer) method to attach a handler is recommended.
      • main

        public static void main​(java.lang.String[] args)