Class LgxTplMgr

    • Field Detail

      • namedTypes

        protected java.util.Map<java.lang.String,​LgxTemplate> namedTypes
      • baseTypes

        public static final java.util.Map<java.lang.String,​java.lang.Class<? extends BaseDataType<?>>> baseTypes
    • Constructor Detail

      • LgxTplMgr

        public LgxTplMgr​(LgxDevice parent)
    • 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.
      • getType

        public java.lang.Object getType​(java.lang.String name)
        Returns the class of a base data type or the Logix Template instance for the named type.
        Parameters:
        name -
        Returns:
      • getBaseType

        public java.lang.Class<? extends BaseDataType<?>> getBaseType​(java.lang.String name)
      • getNamedType

        public LgxTemplate getNamedType​(java.lang.String name)
      • validateType

        public void validateType​(java.lang.String typeName)
      • createLgxMbr

        public StructMember createLgxMbr​(java.lang.String name,
                                         java.lang.String typeName,
                                         int[] dims)
        Construct a logix template type member item given a name, the type name, and the dimensions. Cannot create a boolean hosted in another integer member. Use the LgxStructMbr constructor directly in that case.
        Parameters:
        name -
        typeName -
        dims -
        Returns:
      • unRegisterName

        public void unRegisterName​(java.lang.String name,
                                   LgxTemplate tpl)
      • getTemplates

        public java.util.List<LgxTemplate> getTemplates()
      • setChild

        public CipObject setChild​(CipTree child,
                                  PathSegment seg)
        Description copied from class: CipTree
        Assign a given CipTree as a child of this CipTree identified by a specific PathSegment. If that path segment is already registered to a different child CipTree, replace it and return that old child.
        Overrides:
        setChild in class CipObject
        Parameters:
        child - The CipTree to register.
        seg - The Path Segment that identifies this child.
        Returns:
        The replaced CipTree, if any.