def METHOD_NAME():
    from optparse import OptionParser
    usage = """
    %prog [options] canDatabaseFile targetFile.c
    import-file: *.dbc|*.dbf|*.kcd|*.arxml|*.xls(x)|*.sym
    """
    parser = OptionParser(usage=usage)
    parser.add_option("", "--frame",
                      dest="exportframe", default=None,
                      help="create macros for Frame(s); Comma seperated list of Names ")
    parser.add_option("", "--ecu",
                      dest="exportecu", default=None,
                      help="create macros for Ecu(s) Comma seperated ")
    (cmdlineOptions, args) = parser.parse_args()
    if len(args) < 2:
        parser.print_help()
        sys.exit(1)
    infile = args[0]
    outfile = args[1]
    dbs = canmatrix.formats.loadp(infile)
    db = next(iter(dbs.values()))
    sourceCode = ""
    if cmdlineOptions.exportframe is None and cmdlineOptions.exportecu is None:
        for frame in db.frames:
            sourceCode += createDecodeMacrosForFrame(
                frame, "_" + frame.name + "_")
            sourceCode += createStoreMacrosForFrame(
                frame, "_" + frame.name + "_")
    if cmdlineOptions.exportframe is not None:
        for frameId in cmdlineOptions.exportframe.split(','):
            try:
                frame = db.frame_by_id(canmatrix.ArbitrationId(frameId))
            except ValueError:
                frame = db.frame_by_name(frameId)
            if frame is not None:
                sourceCode += createDecodeMacrosForFrame(
                    frame, "_" + frame.name + "_")
                sourceCode += createStoreMacrosForFrame(
                    frame, "_" + frame.name + "_")
    if cmdlineOptions.exportecu is not None:
        ecuList = cmdlineOptions.exportecu.split(',')
        for frame in db.frames:
            for ecu in ecuList:
                if ecu in frame.transmitters:
                    sourceCode += createStoreMacrosForFrame(
                        frame, "_" + frame.name + "_")
                for signal in frame.signals:
                    if ecu in signal.receiver:
                        sourceCode += createDecodeMacro(signal,
                                                        "_" + frame.name + "_")
    cfile = open(outfile, "w")
    cfile.write(sourceCode)
    cfile.close()