Пример #1
0
def getParts(cache, qname):
    """
    Expand the parts of this node..
    """
    INFO("sys.getParts(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:hasPart")
Пример #2
0
def getArguments(cache, qname):
    """
    Expand the arguments of a node.
    """
    INFO("soft.getArguments(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasArgument")
Пример #3
0
def getTypes(cache, qname):
    """
    Expand the types of a node.
    """
    INFO("soft.getTypes(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasType | (^soft:isTypeOf)")
Пример #4
0
def getDerives(cache, qname):
    """
    Expand the list of nodes which this node derives.
    """
    INFO("sys.getDerives(%s)" % (qname))

    return generic.getRelated(cache, qname, "dev:derives|^dev:isDerivedFrom")
Пример #5
0
def getRealizedRequirements(cache, qname):
    """
    Expand the realized requirements of a node.
    """
    INFO("sys.getRealizedRequirements(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:realizes/dev:hasRequirement")
Пример #6
0
def getTested(cache, qname):
    """
    Expand the list of nodes which this node tests.
    """
    INFO("sys.getTested(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:tests")
Пример #7
0
def getAttributes(cache, qname):
    """
    Expand the attributes of a node.
    """
    INFO("soft.getAttributes(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasAttribute")
Пример #8
0
def getProperties(cache, qname):
    """
    Expand the properties of this node.
    """
    INFO("sys.getProperties(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:hasProperty")
Пример #9
0
def getVerifies(cache, qname):
    """
    Expand the list of nodes which this node verifies.
    """
    INFO("sys.getVerifies(%s)" % (qname))

    return generic.getRelated(cache, qname, "dev:verifies")
Пример #10
0
def getStates(cache, qname):
    """
    Expand the states of this node.
    """
    INFO("sys.getStates(%s)" % (qname))

    return generic.getRelated(cache, qname, "fsm:hasState")
Пример #11
0
def getDesigns(cache, qname):
    """
    Expand the designs of this node.
    """
    INFO("sys.getDesigns(%s)" % (qname))

    return generic.getRelated(cache, qname, "^sys:realizes")
Пример #12
0
def getDerivedFrom(cache, qname):
    """
    Expand the list of nodes that are derived from this node.
    """
    INFO("sys.getDerivedFrom(%s)" % (qname))

    return generic.getRelated(cache, qname, "dev:isDerivedFrom|^dev:derives")
Пример #13
0
def getAllMembers(cache, qname):
    """
    Expand the direct and indirect members of a node.
    """
    INFO("soft.getAllMembers(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasVariable*")
Пример #14
0
def getRealizes(cache, qname):
    """
    Expand the list of nodes that the given node realizes.
    """
    INFO("sys.getRealizes(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:realizes")
Пример #15
0
def getDeclaredBy(cache, qname):
    """
    Expand the list of nodes which declare this node.
    """
    INFO("sys.getDeclaredBy(%s)" % (qname))

    return generic.getRelated(cache, qname, "^dev:hasRequirement")
Пример #16
0
def getInterfaceVariables(cache, qname):
    """
    Expand the interface variables of a node.
    """
    INFO("soft.getInterfaceVariables(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasVariable")
Пример #17
0
def getQualifiers(cache, qname):
    """
    Expand the qualifiers of a node.
    """
    INFO("soft.getQualifiers(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasQualifier")
Пример #18
0
def getInterfaceInstanceVariables(cache, qname):
    """
    Expand the interface instance variables of a node.
    """
    INFO("soft.getInterfaceInstanceVariables(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:hasElement")
Пример #19
0
def getSatisfiedBy(cache, qname):
    """
    Expand the list of nodes that are satisfied by this node.
    """
    INFO("sys.getSatisfiedBy(%s)" % (qname))

    return generic.getRelated(cache, qname,
                              "(^dev:satisfies)|dev:isSatisfiedBy")
Пример #20
0
def getSatisfies(cache, qname):
    """
    Expand the list of nodes which this node satisfies.
    """
    INFO("sys.getSatisfies(%s)" % (qname))

    return generic.getRelated(cache, qname,
                              "(^dev:isSatisfiedBy)|dev:satisfies")
Пример #21
0
def getLinks(cache, qname):
    """
    Expand the links of a node.
    """
    INFO("soft.getLinks(%s)" % (qname))

    return generic.getRelated(cache, qname,
                              "sys:isInterfacedWith | ^sys:isInterfacedWith")
Пример #22
0
def getNamespaces(cache, qname):
    """
    Expand the namespaces of a node.
    """
    INFO("soft.getNamespaces(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "cont:contains|(^cont:isContainedBy)",
                              restriction="soft:Namespace")
Пример #23
0
def getInstances(cache, qname):
    """
    Expand the instances of a node.
    """
    INFO("soft.getInstances(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "soft:isTypeOf",
                              restriction="soft:Type")
Пример #24
0
def getFBs(cache, qname):
    """
    Expand the function blocks of a node.
    """
    INFO("soft.getFBs(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "cont:contains|(^cont:isContainedBy)",
                              restriction="iec61131:FunctionBlock")
Пример #25
0
def getStructs(cache, qname):
    """
    Expand the structs of a node.
    """
    INFO("soft.getStructs(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "cont:contains|(^cont:isContainedBy)",
                              restriction="iec61131:Struct")
Пример #26
0
def getEnums(cache, qname):
    """
    Expand the enumerations of a node.
    """
    INFO("soft.getEnums(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "cont:contains|(^cont:isContainedBy)",
                              restriction="soft:Enumeration")
Пример #27
0
def getEnumItems(cache, qname):
    """
    Expand the enumeration items of a node.
    """
    INFO("soft.getEnumItems(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "cont:contains",
                              restriction="soft:EnumerationItem")
Пример #28
0
def show_enum_item(node, args=None):
    """
    Show the 'enum_item' view of the 'soft' category.
    """
    INFO("soft.show_enum_item(%s)" % node['qname'])

    generic.fillNumber(node, optional=True)
    node["item_of"] = generic.getRelated(
        node.cache, node["qname"], "(^cont:contains)|(cont:isContainedBy)")[0]
    node.cache[node["item_of"]].show("soft", "enum")
Пример #29
0
def getAssignments(cache, qname):
    """
    Expand the assignments of a node.
    """
    INFO("soft.getAssignments(%s)" % (qname))

    return generic.getRelated(cache,
                              qname,
                              "expr:hasAssignment",
                              sortedByNumber=True)
Пример #30
0
def getMemberOf(cache, qname):
    """
    Get the node of which this node is a member of.
    """
    INFO("soft.getMemberOf(%s)" % (qname))

    return generic.getRelated(
        cache, qname,
        "(^soft:hasVariable) | (^soft:hasAttribute) | (^iec61131:hasInputVariable) | (^iec61131:hasOutputVariable) | (^iec61131:hasInOutVariable) | (^iec61131:hasLocalVariable) | (^soft:hasCallable) | (^iec61131:hasMethod) | (^iec61131:hasMethodInstance)"
    )