Class LgxTemplate

    • Field Detail

      • name

        protected final java.lang.String name
      • templateReadName

        protected java.lang.String templateReadName
      • tagtypecode

        protected final CipUINT tagtypecode
      • defsize

        protected final CipUDINT defsize
      • datasize

        protected final CipUDINT datasize
    • Method Detail

      • getDevice

        public LgxDevice getDevice()
        Description copied from class: CipObject
        CipObjects are expected to be organized as a tree, typically with a CipDevice at the root. (CipDevices can have a parent too, if an implementer chooses to represent a virtual chassis that way.)

        By default, any CipObject will simply ask its parent for the device if asked for the device. A CipDevice returns itself.

        Overrides:
        getDevice in class CipObject
        Returns:
        The CipDevice found in the parents of this object, if any.
      • setParent

        public CipInstance setParent​(CipTree parent)
        Description copied from class: CipTree
        Set or remove the parent of this CipTree, possibly removing this object from a previous parent before assigning to the new parent. Override this method if additional housekeeping is required when assigning or removing parents.
        Overrides:
        setParent in class CipInstance
        Parameters:
        parent - The new parent of this object.
        Returns:
        The object replaced by this object in the parent, if any.
      • getTemplateReadName

        public java.lang.String getTemplateReadName()
      • setTemplateReadName

        public LgxTemplate setTemplateReadName​(java.lang.String templateReadName)
        When a template definition is read from another processor, the name delivered in the template read service may include additional text after a semi-colon that is only meaningful to logix processors but should be delivered to other clients that query this implementation.

        Also, many predefined datatypes in Logix processors report a different, more verbose name in the template read service. When creating such types manually, the common name (as used in processor XML exports) should be given in the constructor, and the verbose name and suffix set here.

        Parameters:
        templateReadName -
      • getTagTypeCode

        public short getTagTypeCode()
      • setTagTypeCode

        public LgxTemplate setTagTypeCode​(short ttc)
        When a template definition is read from another processor, it may be a built-in or module-defined type whose structure handle doesn't follow the published algorithm. The code that constructs an instance from a remote must follow up by setting the remote's tag type code on this instance.
        Parameters:
        ttc -
      • structCRCString

        public java.lang.String structCRCString()
      • service

        public void service​(CipObject appContext,
                            CipRequest request,
                            int nesting)
        Description copied from class: CipObject

        Execute a CIP service on the object, using the request supplied. Supply a reply to the request and/or throw an appropriate CipException. Replies are not required before this routine returns.

        Direct service() calls MUST NOT BLOCK. Any operation that will take any significant time must be delegated to an executor. "Significant" may vary by application, but typically would be in the fractional millisecond range.

        Specified by:
        service in interface AttributeHolder
        Overrides:
        service in class CipInstance
        Parameters:
        appContext - Root object for application path lookups. Generally a Mirrored Device from a port context.
        request - What to do and where to reply. Services to be handled by child objects are to be passed to their service() method with nesting+1.
        nesting - How many leading path segments items to skip when processing this request. Avoids copying the balance of an application path into a new request when passing a request to a child object.
      • bytesEach

        public int bytesEach()
      • putAbbrevType

        public void putAbbrevType​(java.nio.ByteBuffer dest)
      • chkAbbrevType

        public void chkAbbrevType​(java.nio.ByteBuffer source)
      • removeListener

        public void removeListener​(LgxTplListener listener)
      • getListenerCount

        public int getListenerCount()
      • getDataSize

        public int getDataSize()
      • getDepth

        public int getDepth()
      • getCRC

        public short getCRC()