How to use the canmatrix.importany.importany function in canmatrix

To help you get started, we’ve selected a few canmatrix examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ebroecker / canmatrix / cancompare.py View on Github external
def main():
    if len(sys.argv) < 3:
        sys.stderr.write('Usage: sys.argv[0] matrix1 matrix2\n')
        sys.stderr.write('matrixX can be any of *.dbc|*.dbf|*.kcd|*.arxml\n')
        sys.exit(1)

    matrix1 = sys.argv[1]
    matrix2 = sys.argv[2]

    print("Importing " + matrix1 + " ... ")
    db1 = im.importany(matrix1)
    print("%d Frames found" % (db1._fl._list.__len__()))

    print("Importing " + matrix2 + " ... ")
    db2 = im.importany(matrix2)
    print("%d Frames found" % (db2._fl._list.__len__()))


    print("\n\n")


    ignore = {}
    #ignore["ATTRIBUTE"] = "*"
    #ignore["DEFINE"] = "*"
    obj = compareDb(db1, db2, ignore)
    dumpResult(obj)
github ebroecker / canmatrix / cancompare.py View on Github external
def main():
    if len(sys.argv) < 3:
        sys.stderr.write('Usage: sys.argv[0] matrix1 matrix2\n')
        sys.stderr.write('matrixX can be any of *.dbc|*.dbf|*.kcd|*.arxml\n')
        sys.exit(1)

    matrix1 = sys.argv[1]
    matrix2 = sys.argv[2]

    print("Importing " + matrix1 + " ... ")
    db1 = im.importany(matrix1)
    print("%d Frames found" % (db1._fl._list.__len__()))

    print("Importing " + matrix2 + " ... ")
    db2 = im.importany(matrix2)
    print("%d Frames found" % (db2._fl._list.__len__()))


    print("\n\n")


    ignore = {}
    #ignore["ATTRIBUTE"] = "*"
    #ignore["DEFINE"] = "*"
    obj = compareDb(db1, db2, ignore)
    dumpResult(obj)