Esempio n. 1
0
def getParts(cache, qname):
    """
    Expand the parts of this node..
    """
    INFO("sys.getParts(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:hasPart")
Esempio n. 2
0
def getArguments(cache, qname):
    """
    Expand the arguments of a node.
    """
    INFO("soft.getArguments(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasArgument")
Esempio n. 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)")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 7
0
def getAttributes(cache, qname):
    """
    Expand the attributes of a node.
    """
    INFO("soft.getAttributes(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasAttribute")
Esempio n. 8
0
def getProperties(cache, qname):
    """
    Expand the properties of this node.
    """
    INFO("sys.getProperties(%s)" % (qname))

    return generic.getRelated(cache, qname, "sys:hasProperty")
Esempio n. 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")
Esempio n. 10
0
def getStates(cache, qname):
    """
    Expand the states of this node.
    """
    INFO("sys.getStates(%s)" % (qname))

    return generic.getRelated(cache, qname, "fsm:hasState")
Esempio n. 11
0
def getDesigns(cache, qname):
    """
    Expand the designs of this node.
    """
    INFO("sys.getDesigns(%s)" % (qname))

    return generic.getRelated(cache, qname, "^sys:realizes")
Esempio n. 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")
Esempio n. 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*")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 17
0
def getQualifiers(cache, qname):
    """
    Expand the qualifiers of a node.
    """
    INFO("soft.getQualifiers(%s)" % (qname))

    return generic.getRelated(cache, qname, "soft:hasQualifier")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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)
Esempio n. 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)"
    )