From c1f10d5051d00c7e746d3f69ea85665c9e5c2871 Mon Sep 17 00:00:00 2001 From: Daniel Hrisca Date: Sat, 18 May 2019 23:14:58 +0300 Subject: [PATCH 01/39] include LICENSE in source distribution (#365) --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 859006e7..97ddb97e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include versioneer.py include canmatrix/_version.py +include LICENSE \ No newline at end of file From 55a4709e926f8c99c373d756aefd47cca727c712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 27 May 2019 08:09:44 +0200 Subject: [PATCH 02/39] arxml: rx/tx typo fix fix for #366 --- src/canmatrix/formats/arxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 9fd06aac..dbeed2da 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -675,7 +675,7 @@ def dump(dbs, f, **options): create_sub_element(frame_port, 'SHORT-NAME', frame.name) create_sub_element(frame_port, 'COMMUNICATION-DIRECTION', 'IN') rec_temp = 1 - if ecu.name + "_Tx" not in rx_ipdu_groups: + if ecu.name + "_Rx" not in rx_ipdu_groups: rx_ipdu_groups[ecu.name + "_Rx"] = [] rx_ipdu_groups[ecu.name + "_Rx"].append(frame.name) From 2b7de13b1f1827f9b50db09e9240c5a21421c350 Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Tue, 11 Jun 2019 21:46:48 +0200 Subject: [PATCH 03/39] annotate and fix codestyle dbc (#369) --- src/canmatrix/formats/dbc.py | 494 +++++++++++++++++------------------ 1 file changed, 242 insertions(+), 252 deletions(-) diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 3e6b2641..d500a403 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -21,7 +21,7 @@ # # this script exports dbc-files from a canmatrix-object -# dbc-files are the can-matrix-definitions of the CanOe (Vector Informatic) +# dbc-files are the can-matrix-definitions of the CANoe (Vector Informatic) from __future__ import absolute_import from __future__ import division @@ -39,12 +39,14 @@ import canmatrix logger = logging.getLogger(__name__) -default_float_factory = decimal.Decimal +def default_float_factory(value): # type: (typing.Any) -> decimal.Decimal + return decimal.Decimal(value) -def normalizeName(name, whitespaceReplacement): - name = re.sub(r'\s+', whitespaceReplacement, name) + +def normalize_name(name, whitespace_replacement): # type: (str, str) -> str + name = re.sub(r'\s+', whitespace_replacement, name) if ' ' in name: name = '"' + name + '"' @@ -52,7 +54,7 @@ def normalizeName(name, whitespaceReplacement): return name -def format_float(f): +def format_float(f): # type: (typing.Any) -> str s = str(f).upper() if s.endswith('.0'): s = s[:-2] @@ -64,15 +66,16 @@ def format_float(f): return s.upper() -def check_define(define): - # check if define is compatible with dbc. else repace by STRING +def check_define(define): # type: (canmatrix.Define) -> None + # check if define is compatible with dbc. else replace by STRING if define.type not in ["ENUM", "STRING", "INT", "HEX", "FLOAT"]: - logger.warn("dbc export of attribute type {} not supported; replaced by STRING".format(define.type)) + logger.warning("dbc export of attribute type %s not supported; replaced by STRING", define.type) define.definition = "STRING" define.type = "STRING" def create_define(data_type, define, define_type, defaults): + # type: (str, canmatrix.Define, str, typing.MutableMapping[str, str]) -> str check_define(define) define_string = "BA_DEF_ " + define_type define_string += ' "' + data_type + '" ' @@ -87,6 +90,7 @@ def create_define(data_type, define, define_type, defaults): def create_attribute_string(attribute, attribute_class, name, value, is_string): + # type: (str, str, str, typing.Any, bool) -> str if is_string: value = '"' + value + '"' elif not value: @@ -96,29 +100,29 @@ def create_attribute_string(attribute, attribute_class, name, value, is_string): return attribute_string -def create_comment_string(comment_class, comment_ident, comment, dbcExportEncoding, dbcExportCommentEncoding): +def create_comment_string(comment_class, comment_ident, comment, export_encoding, export_comment_encoding): + # type: (str, str, str, str, str) -> bytes if len(comment) == 0: return b"" - comment_string = ("CM_ " + comment_class + " " + comment_ident + ' "').encode(dbcExportEncoding, 'ignore') - comment_string += comment.replace('"', '\\"').encode(dbcExportCommentEncoding, 'ignore') - comment_string += '";\n'.encode(dbcExportEncoding) + comment_string = ("CM_ " + comment_class + " " + comment_ident + ' "').encode(export_encoding, 'ignore') + comment_string += comment.replace('"', '\\"').encode(export_comment_encoding, 'ignore') + comment_string += '";\n'.encode(export_encoding) return comment_string -def dump(mydb, f, **options): +def dump(in_db, f, **options): + # type: (canmatrix.CanMatrix, typing.IO, **typing.Any) -> None # create copy because export changes database - db = copy.deepcopy(mydb) + db = copy.deepcopy(in_db) - dbcExportEncoding = options.get("dbcExportEncoding", 'iso-8859-1') - dbcExportCommentEncoding = options.get("dbcExportCommentEncoding", dbcExportEncoding) - writeValTable = options.get("writeValTable", True) + dbc_export_encoding = options.get("dbcExportEncoding", 'iso-8859-1') + dbc_export_comment_encoding = options.get("dbcExportCommentEncoding", dbc_export_encoding) + write_val_table = options.get("writeValTable", True) compatibility = options.get('compatibility', True) - whitespaceReplacement = options.get("whitespaceReplacement", '_') - if whitespaceReplacement in ['', None] or set( - [' ', '\t']).intersection(whitespaceReplacement): - print("Warning: Settings may result in whitespace in DBC variable names. This is not supported by the DBC format.") - + whitespace_replacement = options.get("whitespaceReplacement", '_') + if whitespace_replacement in ['', None] or {' ', '\t'}.intersection(whitespace_replacement): + logger.warning("Settings may result in whitespace in DBC variable names. This is not supported by the DBC format.") if db.contains_fd or db.contains_j1939: if db.contains_fd: @@ -149,21 +153,20 @@ def dump(mydb, f, **options): free_signals_dummy_frame = canmatrix.Frame("VECTOR__INDEPENDENT_SIG_MSG") free_signals_dummy_frame.arbitration_id = canmatrix.ArbitrationId(0x40000000, extended=True) free_signals_dummy_frame.signals = db.signals - db.addFrame(free_signals_dummy_frame) + db.add_frame(free_signals_dummy_frame) - # shorten long enviroment variable names - for envVarName in db.env_vars: - if len(envVarName) > 32: - db.add_env_attribute(envVarName, "SystemEnvVarLongSymbol", envVarName) - db.env_vars[envVarName[:32]] = db.env_vars.pop(envVarName) + # shorten long environment variable names + for env_var_name in db.env_vars: + if len(env_var_name) > 32: + db.add_env_attribute(env_var_name, "SystemEnvVarLongSymbol", env_var_name) + db.env_vars[env_var_name[:32]] = db.env_vars.pop(env_var_name) db.add_env_defines("SystemEnvVarLongSymbol", "STRING") - header = "VERSION \"created by canmatrix\"\n\n\nNS_ :\n\nBS_:\n\n" - f.write(header.encode(dbcExportEncoding)) + f.write(header.encode(dbc_export_encoding)) # ECUs - f.write("BU_: ".encode(dbcExportEncoding)) + f.write("BU_: ".encode(dbc_export_encoding)) for ecu in db.ecus: # fix long ecu names: @@ -172,26 +175,20 @@ def dump(mydb, f, **options): ecu.name = ecu.name[0:32] db.add_ecu_defines("SystemNodeLongSymbol", "STRING") - f.write((ecu.name + " ").encode(dbcExportEncoding)) + f.write((ecu.name + " ").encode(dbc_export_encoding)) - f.write("\n\n".encode(dbcExportEncoding)) + f.write("\n\n".encode(dbc_export_encoding)) - if writeValTable: + if write_val_table: # ValueTables for table in sorted(db.value_tables): - f.write(("VAL_TABLE_ " + table).encode(dbcExportEncoding)) + f.write(("VAL_TABLE_ " + table).encode(dbc_export_encoding)) for row in db.value_tables[table]: - f.write( - (' ' + - str(row) + - ' "' + - db.value_tables[table][row] + - '"').encode(dbcExportEncoding)) - f.write(";\n".encode(dbcExportEncoding)) - f.write("\n".encode(dbcExportEncoding)) - - output_names = collections.defaultdict(dict) + f.write(' {} "{}"'.format(str(row), db.value_tables[table][row]).encode(dbc_export_encoding)) + f.write(";\n".encode(dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding)) + output_names = collections.defaultdict(dict) # type: typing.Dict[canmatrix.Frame, typing.Dict[canmatrix.Signal, str]] for frame in db.frames: # fix long frame names @@ -208,24 +205,23 @@ def dump(mydb, f, **options): db.add_signal_defines("SystemSignalLongSymbol", "STRING") normalized_names = collections.OrderedDict(( - (s, normalizeName(s.name, whitespaceReplacement)) + (s, normalize_name(s.name, whitespace_replacement)) for s in frame.signals )) # remove "-" from frame names if compatibility: - frame.name = re.sub("[^A-Za-z0-9]", whitespaceReplacement, frame.name) - + frame.name = re.sub("[^A-Za-z0-9]", whitespace_replacement, frame.name) duplicate_signal_totals = collections.Counter(normalized_names.values()) - duplicate_signal_counter = collections.Counter() + duplicate_signal_counter = collections.Counter() # type: typing.Counter[str] - numbered_names = collections.OrderedDict() + numbered_names = collections.OrderedDict() # type: ignore for signal in frame.signals: name = normalized_names[signal] if compatibility: - name = re.sub("[^A-Za-z0-9]",whitespaceReplacement, name) + name = re.sub("[^A-Za-z0-9]", whitespace_replacement, name) duplicate_signal_counter[name] += 1 if duplicate_signal_totals[name] > 1: # TODO: pad to 01 in case of 10+ instances, for example? @@ -235,7 +231,7 @@ def dump(mydb, f, **options): # Frames for frame in db.frames: multiplex_written = False - if frame.transmitters.__len__() == 0: + if len(frame.transmitters) == 0: frame.add_transmitter("Vector__XXX") f.write( @@ -245,10 +241,10 @@ def dump(mydb, f, **options): ": %d " % frame.size + frame.transmitters[0] + - "\n").encode(dbcExportEncoding)) + "\n").encode(dbc_export_encoding)) duplicate_signal_totals = collections.Counter( - normalizeName(s.name, whitespaceReplacement) for s in frame.signals + normalize_name(s.name, whitespace_replacement) for s in frame.signals ) duplicate_signal_counter = collections.Counter() for signal in frame.signals: @@ -265,20 +261,19 @@ def dump(mydb, f, **options): signal_line += "M " multiplex_written = True - - startbit = signal.get_startbit(bit_numbering=1) + start_bit = signal.get_startbit(bit_numbering=1) if signal.is_signed: sign = '-' else: sign = '+' signal_line += (": %d|%d@%d%c" % - (startbit, - signal.size, - signal.is_little_endian, - sign)) + (start_bit, + signal.size, + signal.is_little_endian, + sign)) signal_line += " (%s,%s)" % (format_float(signal.factor), format_float(signal.offset)) - signal_line += " [{}|{}]".format(format_float(signal.min),format_float(signal.max)) + signal_line += " [{}|{}]".format(format_float(signal.min), format_float(signal.max)) signal_line += ' "' if signal.unit is None: @@ -286,83 +281,84 @@ def dump(mydb, f, **options): signal_line += signal.unit signal_line += '" ' - if signal.receivers.__len__() == 0: + if len(signal.receivers) == 0: signal.add_receiver('Vector__XXX') signal_line += ','.join(signal.receivers) + "\n" - f.write(signal_line.encode(dbcExportEncoding)) + f.write(signal_line.encode(dbc_export_encoding)) - f.write("\n".encode(dbcExportEncoding)) - f.write("\n".encode(dbcExportEncoding)) + f.write("\n".encode(dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding)) # second Sender: for frame in db.frames: - if frame.transmitters.__len__() > 1: - f.write(("BO_TX_BU_ %d : %s;\n" % (frame.arbitration_id.to_compound_integer(), ','.join(frame.transmitters))).encode(dbcExportEncoding)) + if len(frame.transmitters) > 1: + f.write(("BO_TX_BU_ %d : %s;\n" % (frame.arbitration_id.to_compound_integer(), ','.join(frame.transmitters))).encode(dbc_export_encoding)) # frame comments # wow, there are dbcs where comments are encoded with other coding than rest of dbc... for frame in db.frames: - f.write(create_comment_string("BO_", "%d " % frame.arbitration_id.to_compound_integer(), frame.comment, dbcExportEncoding, dbcExportCommentEncoding)) - f.write("\n".encode(dbcExportEncoding)) + f.write(create_comment_string("BO_", "%d " % frame.arbitration_id.to_compound_integer(), frame.comment, dbc_export_encoding, dbc_export_comment_encoding)) + f.write("\n".encode(dbc_export_encoding)) # signal comments for frame in db.frames: for signal in frame.signals: - if signal.comment is not None and signal.comment.__len__() > 0: + if signal.comment: name = output_names[frame][signal] - f.write(create_comment_string("SG_", "%d " % frame.arbitration_id.to_compound_integer() + name, signal.comment, dbcExportEncoding, - dbcExportCommentEncoding)) - f.write("\n".encode(dbcExportEncoding)) + f.write(create_comment_string( + "SG_", + "%d " % frame.arbitration_id.to_compound_integer() + name, + signal.comment, + dbc_export_encoding, + dbc_export_comment_encoding)) + f.write("\n".encode(dbc_export_encoding)) # ecu comments for ecu in db.ecus: - if ecu.comment is not None and ecu.comment.__len__() > 0: - f.write(create_comment_string("BU_", ecu.name, ecu.comment, dbcExportEncoding, - dbcExportCommentEncoding)) - f.write("\n".encode(dbcExportEncoding)) - - defaults = {} + if ecu.comment: + f.write(create_comment_string("BU_", ecu.name, ecu.comment, dbc_export_encoding, + dbc_export_comment_encoding)) + f.write("\n".encode(dbc_export_encoding)) + defaults = {} # type: typing.Dict[str, str] # write defines for (data_type, define) in sorted(list(db.frame_defines.items())): - f.write(create_define(data_type, define, "BO_", defaults).encode(dbcExportEncoding, 'replace')) - + f.write(create_define(data_type, define, "BO_", defaults).encode(dbc_export_encoding, 'replace')) for (data_type, define) in sorted(list(db.signal_defines.items())): - f.write(create_define(data_type, define, "SG_", defaults).encode(dbcExportEncoding, 'replace')) + f.write(create_define(data_type, define, "SG_", defaults).encode(dbc_export_encoding, 'replace')) for (data_type, define) in sorted(list(db.ecu_defines.items())): - f.write(create_define(data_type, define, "BU_", defaults).encode(dbcExportEncoding, 'replace')) + f.write(create_define(data_type, define, "BU_", defaults).encode(dbc_export_encoding, 'replace')) for (data_type, define) in sorted(list(db.env_defines.items())): - f.write(create_define(data_type, define, "EV_", defaults).encode(dbcExportEncoding, 'replace')) + f.write(create_define(data_type, define, "EV_", defaults).encode(dbc_export_encoding, 'replace')) for (data_type, define) in sorted(list(db.global_defines.items())): - f.write(create_define(data_type, define, "", defaults).encode(dbcExportEncoding, 'replace')) - - for define in sorted(defaults): - f.write(('BA_DEF_DEF_ "' + define + '" ').encode(dbcExportEncoding) + - defaults[define].encode(dbcExportEncoding,'replace') + ';\n'.encode(dbcExportEncoding)) + f.write(create_define(data_type, define, "", defaults).encode(dbc_export_encoding, 'replace')) + for define_name in sorted(defaults): + f.write(('BA_DEF_DEF_ "' + define_name + '" ').encode(dbc_export_encoding) + + defaults[define_name].encode(dbc_export_encoding, 'replace') + ';\n'.encode(dbc_export_encoding)) # ecu-attributes: for ecu in db.ecus: for attrib, val in sorted(ecu.attributes.items()): - f.write(create_attribute_string(attrib, "BU_", ecu.name, val, db.ecu_defines[attrib].type == "STRING").encode(dbcExportEncoding)) - f.write("\n".encode(dbcExportEncoding)) + f.write(create_attribute_string(attrib, "BU_", ecu.name, val, db.ecu_defines[attrib].type == "STRING").encode(dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding)) # global-attributes: for attrib, val in sorted(db.attributes.items()): f.write(create_attribute_string(attrib, "", "", val, db.global_defines[attrib].type == "STRING").encode( - dbcExportEncoding)) - f.write("\n".encode(dbcExportEncoding)) + dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding)) # messages-attributes: for frame in db.frames: for attrib, val in sorted(frame.attributes.items()): - f.write(create_attribute_string(attrib, "BO_", str(frame.arbitration_id.to_compound_integer()), val, db.frame_defines[attrib].type == "STRING").encode(dbcExportEncoding)) - f.write("\n".encode(dbcExportEncoding)) + f.write(create_attribute_string(attrib, "BO_", str(frame.arbitration_id.to_compound_integer()), val, db.frame_defines[attrib].type == "STRING").encode(dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding)) # signal-attributes: for frame in db.frames: @@ -372,16 +368,15 @@ def dump(mydb, f, **options): if isinstance(val, float): val = format_float(val) f.write(create_attribute_string(attrib, "SG_", '%d ' % frame.arbitration_id.to_compound_integer() + name, val, - db.signal_defines[attrib].type == "STRING").encode(dbcExportEncoding)) + db.signal_defines[attrib].type == "STRING").encode(dbc_export_encoding)) - f.write("\n".encode(dbcExportEncoding)) + f.write("\n".encode(dbc_export_encoding)) for env_var_name, env_var in db.env_vars.items(): if "attributes" in env_var: for attribute, value in env_var["attributes"].items(): f.write(create_attribute_string(attribute, "EV_", "", value, - db.env_defines[attribute].type == "STRING").encode(dbcExportEncoding)) - + db.env_defines[attribute].type == "STRING").encode(dbc_export_encoding)) # signal-values: for frame in db.frames: @@ -396,12 +391,11 @@ def dump(mydb, f, **options): f.write( ('VAL_ %d ' % frame.arbitration_id.to_compound_integer() + - output_names[frame][signal]).encode(dbcExportEncoding)) - for attrib, val in sorted( - signal.values.items(), key=lambda x: int(x[0])): + output_names[frame][signal]).encode(dbc_export_encoding)) + for attr_name, val in sorted(signal.values.items(), key=lambda x: int(x[0])): f.write( - (' ' + str(attrib) + ' "' + val + '"').encode(dbcExportEncoding)) - f.write(";\n".encode(dbcExportEncoding)) + (' ' + str(attr_name) + ' "' + val + '"').encode(dbc_export_encoding)) + f.write(";\n".encode(dbc_export_encoding)) # SIG_VALTYPE for frame in db.frames: @@ -409,113 +403,113 @@ def dump(mydb, f, **options): if signal.is_float: if int(signal.size) > 32: f.write(('SIG_VALTYPE_ %d %s : 2;\n' % (frame.arbitration_id.to_compound_integer(), output_names[frame][signal])).encode( - dbcExportEncoding)) + dbc_export_encoding)) else: f.write(('SIG_VALTYPE_ %d %s : 1;\n' % (frame.arbitration_id.to_compound_integer(), output_names[frame][signal])).encode( - dbcExportEncoding)) + dbc_export_encoding)) # signal-groups: for frame in db.frames: for sigGroup in frame.signalGroups: f.write(("SIG_GROUP_ " + str(frame.arbitration_id.to_compound_integer()) + " " + sigGroup.name + - " " + str(sigGroup.id) + " :").encode(dbcExportEncoding)) + " " + str(sigGroup.id) + " :").encode(dbc_export_encoding)) for signal in sigGroup.signals: - f.write((" " + output_names[frame][signal]).encode(dbcExportEncoding)) - f.write(";\n".encode(dbcExportEncoding)) + f.write((" " + output_names[frame][signal]).encode(dbc_export_encoding)) + f.write(";\n".encode(dbc_export_encoding)) for frame in db.frames: if frame.is_complex_multiplexed: for signal in frame.signals: if signal.muxer_for_signal is not None: - f.write(("SG_MUL_VAL_ %d %s %s " % (frame.arbitration_id.to_compound_integer(), signal.name, signal.muxer_for_signal)).encode(dbcExportEncoding)) - f.write((", ".join(["%d-%d" % (a, b) for a, b in signal.mux_val_grp])).encode(dbcExportEncoding)) + f.write(("SG_MUL_VAL_ %d %s %s " % (frame.arbitration_id.to_compound_integer(), signal.name, signal.muxer_for_signal)).encode(dbc_export_encoding)) + f.write((", ".join(["%d-%d" % (a, b) for a, b in signal.mux_val_grp])).encode(dbc_export_encoding)) + + f.write(";\n".encode(dbc_export_encoding)) - f.write(";\n".encode(dbcExportEncoding)) + for env_var_name in db.env_vars: + env_var = db.env_vars[env_var_name] + f.write(("EV_ {0} : {1} [{2}|{3}] \"{4}\" {5} {6} {7} {8};\n".format( + env_var_name, env_var["varType"], env_var["min"], + env_var["max"], env_var["unit"], env_var["initialValue"], + env_var["evId"], env_var["accessType"], + ",".join(env_var["accessNodes"]))).encode(dbc_export_encoding)) - for envVarName in db.env_vars: - envVar = db.env_vars[envVarName] - f.write(("EV_ {0} : {1} [{2}|{3}] \"{4}\" {5} {6} {7} {8};\n".format(envVarName, envVar["varType"], envVar["min"], - envVar["max"], envVar["unit"],envVar["initialValue"], - envVar["evId"], envVar["accessType"], - ",".join(envVar["accessNodes"])) ).encode(dbcExportEncoding)) +class _FollowUps(object): + NOTHING, SIGNAL_COMMENT, FRAME_COMMENT, BOARD_UNIT_COMMENT, GLOBAL_COMMENT = range(5) -def load(f, **options): - dbcImportEncoding = options.get("dbcImportEncoding", 'iso-8859-1') - dbcCommentEncoding = options.get("dbcImportCommentEncoding", dbcImportEncoding) + +def load(f, **options): # type: (typing.IO, **typing.Any) -> canmatrix.CanMatrix + dbc_import_encoding = options.get("dbcImportEncoding", 'iso-8859-1') + dbc_comment_encoding = options.get("dbcImportCommentEncoding", dbc_import_encoding) float_factory = options.get('float_factory', default_float_factory) i = 0 - class FollowUps(object): - nothing, signalComment, frameComment, boardUnitComment, globalComment = list( - range(5)) - followUp = FollowUps.nothing + follow_up = _FollowUps.NOTHING comment = "" signal = None # type: typing.Optional[canmatrix.Signal] frame = None - boardUnit = None + board_unit = None db = canmatrix.CanMatrix() - framesById = {} # type: typing.Dict[int, canmatrix.Frame] + frames_by_id = {} # type: typing.Dict[int, canmatrix.Frame] def hash_arbitration_id(arbitration_id): # type: (canmatrix.ArbitrationId) -> int return hash((arbitration_id.id, arbitration_id.extended)) def get_frame_by_id(arbitration_id): # type: (canmatrix.ArbitrationId) -> typing.Optional[canmatrix.Frame] try: - return framesById[hash_arbitration_id(arbitration_id)] + return frames_by_id[hash_arbitration_id(arbitration_id)] except KeyError: return None - def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None - framesById[hash_arbitration_id(frame.arbitration_id)] = frame + def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None + frames_by_id[hash_arbitration_id(new_frame.arbitration_id)] = new_frame for line in f: i = i + 1 l = line.strip() - if l.__len__() == 0: + if len(l) == 0: continue try: -# if 1==1: - if followUp == FollowUps.signalComment: + # if 1==1: + if follow_up == _FollowUps.SIGNAL_COMMENT: try: - comment += "\n" + \ - l.decode(dbcCommentEncoding).replace('\\"', '"') + comment += "\n" + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) if l.endswith(b'";'): - followUp = FollowUps.nothing + follow_up = _FollowUps.NOTHING if signal is not None: signal.add_comment(comment[0:-2]) continue - elif followUp == FollowUps.frameComment: + elif follow_up == _FollowUps.FRAME_COMMENT: try: - comment += "\n" + \ - l.decode(dbcCommentEncoding).replace('\\"', '"') + comment += "\n" + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) if l.endswith(b'";'): - followUp = FollowUps.nothing + follow_up = _FollowUps.NOTHING if frame is not None: frame.add_comment(comment[0:-2]) continue - elif followUp == FollowUps.boardUnitComment: + elif follow_up == _FollowUps.BOARD_UNIT_COMMENT: try: comment += "\n" + \ - l.decode(dbcCommentEncoding).replace('\\"', '"') + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) if l.endswith(b'";'): - followUp = FollowUps.nothing - if boardUnit is not None: - boardUnit.add_comment(comment[0:-2]) + follow_up = _FollowUps.NOTHING + if board_unit is not None: + board_unit.add_comment(comment[0:-2]) continue - decoded = l.decode(dbcImportEncoding).strip() + decoded = l.decode(dbc_import_encoding).strip() if decoded.startswith("BO_ "): regexp = re.compile(r"^BO_ ([^\ ]+) ([^\ ]+) *: ([^\ ]+) ([^\ ]+)") temp = regexp.match(decoded) # db.frames.addFrame(Frame(temp.group(1), temp.group(2), temp.group(3), temp.group(4))) - frame = canmatrix.Frame(temp.group(2),arbitration_id = int(temp.group(1)), + frame = canmatrix.Frame(temp.group(2), arbitration_id=int(temp.group(1)), size=int(temp.group(3)), transmitters=temp.group(4).split()) db.frames.append(frame) add_frame_by_id(frame) @@ -523,16 +517,16 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None pattern = r"^SG_ +(\w+) *: *(\d+)\|(\d+)@(\d+)([\+|\-]) +\(([0-9.+\-eE]+), *([0-9.+\-eE]+)\) +\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] +\"(.*)\" +(.*)" regexp = re.compile(pattern) temp = regexp.match(decoded) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp_raw = regexp_raw.match(l) if temp: receiver = [b.strip() for b in temp.group(11).split(',')] - extras = {} + extras = {} # type: typing.Dict[typing.Any, typing.Any] # if float_factory is not None: # extras['float_factory'] = float_factory - tempSig = canmatrix.Signal( + temp_signal = canmatrix.Signal( temp.group(1), start_bit=int(temp.group(2)), size=int(temp.group(3)), @@ -542,23 +536,23 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None offset=temp.group(7), min=temp.group(8), max=temp.group(9), - unit=temp_raw.group(10).decode(dbcImportEncoding), + unit=temp_raw.group(10).decode(dbc_import_encoding), receivers=receiver, **extras ) - if not tempSig.is_little_endian: + if not temp_signal.is_little_endian: # startbit of motorola coded signals are MSB in dbc - tempSig.set_startbit(int(temp.group(2)), bitNumbering=1) - frame.add_signal(tempSig) + temp_signal.set_startbit(int(temp.group(2)), bitNumbering=1) + frame.add_signal(temp_signal) # db.frames.addSignalToLastFrame(tempSig) else: pattern = r"^SG_ +(.+?) +(.+?) *: *(\d+)\|(\d+)@(\d+)([\+|\-]) +\(([0-9.+\-eE]+),([0-9.+\-eE]+)\) +\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] +\"(.*)\" +(.*)" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) receiver = [b.strip() for b in temp.group(12).split(',')] - multiplex = temp.group(2) # type: typing.Union[str, int] + multiplex = temp.group(2) # type: str is_complex_multiplexed = False @@ -572,13 +566,13 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None try: multiplex = int(multiplex[1:]) except: - raise Exception('error decoding line',line) + raise Exception('error decoding line', line) extras = {} # if float_factory is not None: # extras['float_factory'] = float_factory - tempSig = canmatrix.Signal( + temp_signal = canmatrix.Signal( temp.group(1), start_bit=int(temp.group(3)), size=int(temp.group(4)), @@ -588,25 +582,24 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None offset=temp.group(8), min=temp.group(9), max=temp.group(10), - unit=temp_raw.group(11).decode(dbcImportEncoding), + unit=temp_raw.group(11).decode(dbc_import_encoding), receivers=receiver, multiplex=multiplex, **extras ) if is_complex_multiplexed: - tempSig.is_multiplexer = True - tempSig.multiplex = 'Multiplexor' + temp_signal.is_multiplexer = True + temp_signal.multiplex = 'Multiplexor' - if not tempSig.is_little_endian: + if not temp_signal.is_little_endian: # startbit of motorola coded signals are MSB in dbc - tempSig.set_startbit(int(temp.group(3)), bitNumbering=1) - frame.add_signal(tempSig) + temp_signal.set_startbit(int(temp.group(3)), bitNumbering=1) + frame.add_signal(temp_signal) if is_complex_multiplexed: frame.is_complex_multiplexed = True - elif decoded.startswith("BO_TX_BU_ "): regexp = re.compile(r"^BO_TX_BU_ ([0-9]+) *: *(.+);") temp = regexp.match(decoded) @@ -616,7 +609,7 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None elif decoded.startswith("CM_ SG_ "): pattern = r"^CM_ +SG_ +(\w+) +(\w+) +\"(.*)\";" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: @@ -625,7 +618,7 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None if signal: try: signal.add_comment(temp_raw.group(3).decode( - dbcCommentEncoding).replace('\\"', '"')) + dbc_comment_encoding).replace('\\"', '"')) except: logger.error( "Error decoding line: %d (%s)" % @@ -633,7 +626,7 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None else: pattern = r"^CM_ +SG_ +(\w+) +(\w+) +\"(.*)" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: @@ -641,17 +634,17 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None signal = frame.signal_by_name(temp.group(2)) try: comment = temp_raw.group(3).decode( - dbcCommentEncoding).replace('\\"', '"') + dbc_comment_encoding).replace('\\"', '"') except: logger.error( "Error decoding line: %d (%s)" % (i, line)) - followUp = FollowUps.signalComment + follow_up = _FollowUps.SIGNAL_COMMENT elif decoded.startswith("CM_ BO_ "): pattern = r"^CM_ +BO_ +(\w+) +\"(.*)\";" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: @@ -659,7 +652,7 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None if frame: try: frame.add_comment(temp_raw.group(2).decode( - dbcCommentEncoding).replace('\\"', '"')) + dbc_comment_encoding).replace('\\"', '"')) except: logger.error( "Error decoding line: %d (%s)" % @@ -667,60 +660,58 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None else: pattern = r"^CM_ +BO_ +(\w+) +\"(.*)" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) try: comment = temp_raw.group(2).decode( - dbcCommentEncoding).replace('\\"', '"') + dbc_comment_encoding).replace('\\"', '"') except: logger.error( "Error decoding line: %d (%s)" % (i, line)) - followUp = FollowUps.frameComment + follow_up = _FollowUps.FRAME_COMMENT elif decoded.startswith("CM_ BU_ "): pattern = r"^CM_ +BU_ +(\w+) +\"(.*)\";" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: - boardUnit = db.ecu_by_name(temp.group(1)) - if boardUnit: + board_unit = db.ecu_by_name(temp.group(1)) + if board_unit: try: - boardUnit.add_comment(temp_raw.group(2).decode( - dbcCommentEncoding).replace('\\"', '"')) + board_unit.add_comment(temp_raw.group(2).decode( + dbc_comment_encoding).replace('\\"', '"')) except: - logger.error( - "Error decoding line: %d (%s)" % - (i, line)) + logger.error("Error decoding line: %d (%s)" % (i, line)) else: pattern = r"^CM_ +BU_ +(\w+) +\"(.*)" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: - boardUnit = db.ecu_by_name(temp.group(1)) - if boardUnit: + board_unit = db.ecu_by_name(temp.group(1)) + if board_unit: try: comment = temp_raw.group(2).decode( - dbcCommentEncoding).replace('\\"', '"') + dbc_comment_encoding).replace('\\"', '"') except: logger.error( "Error decoding line: %d (%s)" % (i, line)) - followUp = FollowUps.boardUnitComment + follow_up = _FollowUps.BOARD_UNIT_COMMENT elif decoded.startswith("BU_:"): pattern = r"^BU_\:(.*)" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) if temp: - myTempListe = temp.group(1).split(' ') - for ele in myTempListe: + my_temp_list = temp.group(1).split(' ') + for ele in my_temp_list: if len(ele.strip()) > 1: db.ecus.append(canmatrix.Ecu(ele)) @@ -730,34 +721,34 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None if temp: frame_id = temp.group(1) signal_name = temp.group(2) - tempList = temp.group(3).split('"') - if frame_id.isnumeric(): # value for Frame + temp_list = temp.group(3).split('"') + if frame_id.isnumeric(): # value for Frame try: frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(frame_id))) sg = frame.signal_by_name(signal_name) - for i in range(math.floor(len(tempList) / 2)): - val = tempList[i * 2 + 1] + for i in range(math.floor(len(temp_list) / 2)): + val = temp_list[i * 2 + 1] if sg: - sg.add_values(tempList[i * 2], val) + sg.add_values(temp_list[i * 2], val) except: - logger.error("Error with Line: " + str(tempList)) + logger.error("Error with Line: " + str(temp_list)) else: - logger.info("Warning: enviroment variables currently not supported") + logger.info("Warning: environment variables currently not supported") elif decoded.startswith("VAL_TABLE_ "): regexp = re.compile(r"^VAL_TABLE_ +(\w+) +(.*);") temp = regexp.match(decoded) if temp: - tableName = temp.group(1) - tempList = temp.group(2).split('"') + table_name = temp.group(1) + temp_list = temp.group(2).split('"') + value_hash = {} try: - valHash = {} - for i in range(math.floor(len(tempList) / 2)): - val = tempList[i * 2 + 1] - valHash[tempList[i * 2].strip()] = val.strip() + for i in range(math.floor(len(temp_list) / 2)): + val = temp_list[i * 2 + 1] + value_hash[temp_list[i * 2].strip()] = val.strip() except: - logger.error("Error with Line: " + str(tempList)) - db.add_value_table(tableName, valHash) + logger.error("Error with Line: " + str(temp_list)) + db.add_value_table(table_name, value_hash) else: logger.debug(l) @@ -767,29 +758,29 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None substring = substring[3:].strip() pattern = r"^\"(.+?)\" +(.+);" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(substring) substring_line = l[7:].strip()[3:].strip() temp_raw = regexp_raw.match(substring_line) if temp: if define_type == "SG_": - db.add_signal_defines(temp.group(1), temp_raw.group(2).decode(dbcImportEncoding)) + db.add_signal_defines(temp.group(1), temp_raw.group(2).decode(dbc_import_encoding)) elif define_type == "BO_": - db.add_frame_defines(temp.group(1), temp_raw.group(2).decode(dbcImportEncoding)) + db.add_frame_defines(temp.group(1), temp_raw.group(2).decode(dbc_import_encoding)) elif define_type == "BU_": - db.add_ecu_defines(temp.group(1), temp_raw.group(2).decode(dbcImportEncoding)) + db.add_ecu_defines(temp.group(1), temp_raw.group(2).decode(dbc_import_encoding)) elif define_type == "EV_": - db.add_env_defines(temp.group(1), temp_raw.group(2).decode(dbcImportEncoding)) + db.add_env_defines(temp.group(1), temp_raw.group(2).decode(dbc_import_encoding)) elif decoded.startswith("BA_DEF_ "): pattern = r"^BA_DEF_ +\"(.+?)\" +(.+);" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: db.add_global_defines(temp.group(1), - temp_raw.group(2).decode(dbcImportEncoding)) + temp_raw.group(2).decode(dbc_import_encoding)) elif decoded.startswith("BA_ "): regexp = re.compile(r"^BA_ +\".+?\" +(.+)") @@ -803,14 +794,14 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None elif tempba.group(1).strip().startswith("SG_ "): regexp = re.compile(r"^BA_ +\"(.+?)\" +SG_ +(\d+) +(\w+) +(.+);") temp = regexp.match(decoded) - if temp != None: + if temp is not None: get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(2)))).signal_by_name( temp.group(3)).add_attribute(temp.group(1), temp.group(4)) elif tempba.group(1).strip().startswith("EV_ "): regexp = re.compile(r"^BA_ +\"(.+?)\" +EV_ +(\w+) +(.*);") temp = regexp.match(decoded) - if temp != None: - db.add_env_attribute(temp.group(2),temp.group(1),temp.group(3)) + if temp is not None: + db.add_env_attribute(temp.group(2), temp.group(1), temp.group(3)) elif tempba.group(1).strip().startswith("BU_ "): regexp = re.compile(r"^BA_ +\"(.*?)\" +BU_ +(\w+) +(.+);") temp = regexp.match(decoded) @@ -830,8 +821,8 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None temp = regexp.match(decoded) frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) if frame is not None: - signalArray = temp.group(4).split(' ') - frame.add_signal_group(temp.group(2), temp.group(3), signalArray) # todo wrong annotation in canmatrix? Id is a string? + signal_array = temp.group(4).split(' ') + frame.add_signal_group(temp.group(2), temp.group(3), signal_array) # todo wrong annotation in canmatrix? Id is a string? elif decoded.startswith("SIG_VALTYPE_ "): regexp = re.compile(r"^SIG_VALTYPE_ +(\w+) +(\w+)\s*\:(.*);") @@ -845,54 +836,53 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None elif decoded.startswith("BA_DEF_DEF_ "): pattern = r"^BA_DEF_DEF_ +\"(.+?)\" +(.+?)\;" regexp = re.compile(pattern) - regexp_raw = re.compile(pattern.encode(dbcImportEncoding)) + regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) temp_raw = regexp_raw.match(l) if temp: db.add_define_default(temp.group(1), - temp_raw.group(2).decode(dbcImportEncoding)) + temp_raw.group(2).decode(dbc_import_encoding)) elif decoded.startswith("SG_MUL_VAL_ "): pattern = r"^SG_MUL_VAL_ +([0-9]+) +([\w\-]+) +([\w\-]+) +(.*) *;" regexp = re.compile(pattern) temp = regexp.match(decoded) if temp: - frameId = temp.group(1) - signalName = temp.group(2) - muxerForSignal = temp.group(3) - muxValGroups = temp.group(4).split(',') - frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(frameId))) + frame_id = temp.group(1) + signal_name = temp.group(2) + muxer_for_signal = temp.group(3) + mux_val_groups = temp.group(4).split(',') + frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(frame_id))) if frame is not None: - signal = frame.signal_by_name(signalName) + signal = frame.signal_by_name(signal_name) frame.is_complex_multiplexed = True - signal.muxer_for_signal = muxerForSignal - for muxVal in muxValGroups: - muxValMin, muxValMax = muxVal.split("-") - muxValMin = int(muxValMin) - muxValMax = int(muxValMax) - signal.mux_val_grp.append([muxValMin, muxValMax]) + signal.muxer_for_signal = muxer_for_signal + for muxVal in mux_val_groups: + mux_val_min, mux_val_max = muxVal.split("-") + mux_val_min_number = int(mux_val_min) + mux_val_max_number = int(mux_val_max) + signal.mux_val_grp.append([mux_val_min_number, mux_val_max_number]) elif decoded.startswith("EV_ "): pattern = r"^EV_ +([\w\-\_]+?) *\: +([0-9]+) +\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] +\"(.*?)\" +([0-9.+\-eE]+) +([0-9.+\-eE]+) +([\w\-]+?) +(.*);" regexp = re.compile(pattern) temp = regexp.match(decoded) - varName = temp.group(1) - varType = temp.group(2) - min = temp.group(3) - max = temp.group(4) + var_name = temp.group(1) + var_type = temp.group(2) + min_value = temp.group(3) + max_value = temp.group(4) unit = temp.group(5) - initialValue = temp.group(6) - evId = temp.group(7) - accessType = temp.group(8) - accessNodes = temp.group(9).split(",") - db.add_env_var(varName, {"varType": varType, "min" : min, "max" : max, - "unit" : unit, "initialValue" : initialValue, "evId" : evId, - "accessType" : accessType, "accessNodes" : accessNodes}) - - -# else: + initial_value = temp.group(6) + ev_id = temp.group(7) + access_type = temp.group(8) + access_nodes = temp.group(9).split(",") + db.add_env_var(var_name, {"varType": var_type, "min": min_value, "max": max_value, "unit": unit, + "initialValue": initial_value, "evId": ev_id, "accessType": access_type, + "accessNodes": access_nodes}) + + # else: except: - print ("error with line no: %d" % i) - print (line) + print("error with line no: %d" % i) + print(line) # Backtracking for env_var_name, env_var in db.env_vars.items(): @@ -911,10 +901,10 @@ def add_frame_by_id(frame): # type: (canmatrix.Frame) -> None # receiver is only given in the signals, so do propagate the receiver # to the frame: frame.update_receiver() - # extended-flag is implicite in canid, thus repair this: - #if frame.id > 0x80000000: - # frame.id -= 0x80000000 - # frame.extended = 1 + # extended-flag is implicit in can id, thus repair this: + # if frame.id > 0x80000000: + # frame.id -= 0x80000000 + # frame.extended = 1 for signal in frame.signals: if signal.attribute("SystemSignalLongSymbol") is not None: From 72472da1e6e33dd56c411e88f0c7f255281617ac Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Tue, 11 Jun 2019 21:47:21 +0200 Subject: [PATCH 04/39] Always use Signal.is_little_endian as bool #326 (#371) --- src/canmatrix/formats/arxml.py | 2 +- src/canmatrix/formats/cmjson.py | 4 ++-- src/canmatrix/formats/sym.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index dbeed2da..0242bba2 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -1144,7 +1144,7 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact if signal_max is not None: new_signal.max = signal_max - if new_signal.is_little_endian == 0: + if not new_signal.is_little_endian: # startbit of motorola coded signals are MSB in arxml new_signal.set_startbit(int(start_bit.text), bitNumbering=1) diff --git a/src/canmatrix/formats/cmjson.py b/src/canmatrix/formats/cmjson.py index 7f3dff6a..c3c087fc 100644 --- a/src/canmatrix/formats/cmjson.py +++ b/src/canmatrix/formats/cmjson.py @@ -83,7 +83,7 @@ def dump(db, f, **options): "bit_length": signal.size, "factor": str(signal.factor), "offset": str(signal.offset), - "is_big_endian": signal.is_little_endian == 0, + "is_big_endian": signal.is_little_endian is False, "is_signed": signal.is_signed, "is_float": signal.is_float }) @@ -124,7 +124,7 @@ def dump(db, f, **options): "offset": str(signal.offset), "min": str(signal.min), "max": str(signal.max), - "is_big_endian": signal.is_little_endian == 0, + "is_big_endian": signal.is_little_endian is False, "is_signed": signal.is_signed, "is_float": signal.is_float, "comment": signal.comment, diff --git a/src/canmatrix/formats/sym.py b/src/canmatrix/formats/sym.py index a02291ab..13ac594d 100644 --- a/src/canmatrix/formats/sym.py +++ b/src/canmatrix/formats/sym.py @@ -111,7 +111,7 @@ def create_signal(db, signal): # type: (canmatrix.CanMatrix, canmatrix.Signal) else: output += "signed " start_bit = signal.get_startbit() - if signal.is_little_endian == 0: + if not signal.is_little_endian: # Motorola output += "%d,%d -m " % (start_bit, signal.size) else: From 5fac2572efb4f1b42068050bb2dd335c7106e395 Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Tue, 11 Jun 2019 21:48:16 +0200 Subject: [PATCH 05/39] Add coding, remove #!python where inappropriate (#370) --- src/canmatrix/__init__.py | 3 +-- src/canmatrix/_version.py | 2 +- src/canmatrix/canmatrix.py | 2 -- src/canmatrix/compare.py | 2 -- src/canmatrix/convert.py | 2 -- src/canmatrix/copy.py | 3 +-- src/canmatrix/formats/__init__.py | 2 +- src/canmatrix/formats/arxml.py | 3 +-- src/canmatrix/formats/cmcsv.py | 2 +- src/canmatrix/formats/cmjson.py | 2 +- src/canmatrix/formats/dbc.py | 2 +- src/canmatrix/formats/dbf.py | 3 +-- src/canmatrix/formats/fibex.py | 4 +--- src/canmatrix/formats/kcd.py | 4 +--- src/canmatrix/formats/sym.py | 2 +- src/canmatrix/formats/xls.py | 2 +- src/canmatrix/formats/xls_common.py | 2 +- src/canmatrix/formats/xlsx.py | 2 +- src/canmatrix/formats/yaml.py | 2 +- src/canmatrix/join.py | 1 - src/canmatrix/log.py | 1 - src/canmatrix/tests/test_canmatrix.py | 1 + src/canmatrix/tests/test_copy.py | 1 + src/canmatrix/tests/test_formats.py | 1 + src/canmatrix/tests/test_frame_decoding.py | 1 + src/canmatrix/tests/test_frame_encoding.py | 1 + src/canmatrix/tests/test_j1939_decoder.py | 1 + src/canmatrix/tests/test_sym.py | 1 + src/canmatrix/tests/test_utils.py | 1 + src/canmatrix/tests/test_xls.py | 2 ++ src/canmatrix/utils.py | 1 - 31 files changed, 26 insertions(+), 33 deletions(-) diff --git a/src/canmatrix/__init__.py b/src/canmatrix/__init__.py index 2e74986e..f8ddc5c8 100644 --- a/src/canmatrix/__init__.py +++ b/src/canmatrix/__init__.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +# -*- coding: utf-8 -*- from __future__ import absolute_import import logging diff --git a/src/canmatrix/_version.py b/src/canmatrix/_version.py index a343d2cc..8d25f8c7 100644 --- a/src/canmatrix/_version.py +++ b/src/canmatrix/_version.py @@ -1,4 +1,4 @@ - +# -*- coding: utf-8 -*- # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 3131a324..28c50564 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -1,6 +1,4 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- - # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/compare.py b/src/canmatrix/compare.py index 1d0413fe..d8a0d667 100644 --- a/src/canmatrix/compare.py +++ b/src/canmatrix/compare.py @@ -1,6 +1,4 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- - # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/convert.py b/src/canmatrix/convert.py index 67b011a8..11629a24 100644 --- a/src/canmatrix/convert.py +++ b/src/canmatrix/convert.py @@ -1,6 +1,4 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- - # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/copy.py b/src/canmatrix/copy.py index 5f5c210d..6998c228 100644 --- a/src/canmatrix/copy.py +++ b/src/canmatrix/copy.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/__init__.py b/src/canmatrix/formats/__init__.py index e2ddb1e6..61f319d3 100644 --- a/src/canmatrix/formats/__init__.py +++ b/src/canmatrix/formats/__init__.py @@ -1,4 +1,4 @@ -#!env python +# -*- coding: utf-8 -*- from importlib import import_module import sys import logging diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 0242bba2..61cb15f7 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/cmcsv.py b/src/canmatrix/formats/cmcsv.py index e3a72d10..fcca2960 100644 --- a/src/canmatrix/formats/cmcsv.py +++ b/src/canmatrix/formats/cmcsv.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/cmjson.py b/src/canmatrix/formats/cmjson.py index c3c087fc..8bf323a9 100644 --- a/src/canmatrix/formats/cmjson.py +++ b/src/canmatrix/formats/cmjson.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index d500a403..846d0b9b 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/dbf.py b/src/canmatrix/formats/dbf.py index b2c234f3..e389752d 100644 --- a/src/canmatrix/formats/dbf.py +++ b/src/canmatrix/formats/dbf.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/fibex.py b/src/canmatrix/formats/fibex.py index d2a65058..727ba4f6 100644 --- a/src/canmatrix/formats/fibex.py +++ b/src/canmatrix/formats/fibex.py @@ -1,6 +1,4 @@ -#!/usr/bin/env python - - +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/kcd.py b/src/canmatrix/formats/kcd.py index fe8230fc..3f3a9803 100644 --- a/src/canmatrix/formats/kcd.py +++ b/src/canmatrix/formats/kcd.py @@ -1,6 +1,4 @@ -#!/usr/bin/env python - - +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/sym.py b/src/canmatrix/formats/sym.py index 13ac594d..d309ce2c 100644 --- a/src/canmatrix/formats/sym.py +++ b/src/canmatrix/formats/sym.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index 1800ed64..e7b8f4d5 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/xls_common.py b/src/canmatrix/formats/xls_common.py index c19db1d9..1430151a 100644 --- a/src/canmatrix/formats/xls_common.py +++ b/src/canmatrix/formats/xls_common.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/xlsx.py b/src/canmatrix/formats/xlsx.py index 17fdfbca..27d7b38d 100644 --- a/src/canmatrix/formats/xlsx.py +++ b/src/canmatrix/formats/xlsx.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/formats/yaml.py b/src/canmatrix/formats/yaml.py index afa4f6be..e2c46ef9 100644 --- a/src/canmatrix/formats/yaml.py +++ b/src/canmatrix/formats/yaml.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/join.py b/src/canmatrix/join.py index 3ad96290..dfc49379 100644 --- a/src/canmatrix/join.py +++ b/src/canmatrix/join.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - import typing import canmatrix diff --git a/src/canmatrix/log.py b/src/canmatrix/log.py index a3d0160e..5378fdaf 100644 --- a/src/canmatrix/log.py +++ b/src/canmatrix/log.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # Copyright (c) 2013, Eduard Broecker # All rights reserved. # diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index 5d839b7d..fcc363ee 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import pytest import decimal diff --git a/src/canmatrix/tests/test_copy.py b/src/canmatrix/tests/test_copy.py index 7646cac0..a7a94f29 100644 --- a/src/canmatrix/tests/test_copy.py +++ b/src/canmatrix/tests/test_copy.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import canmatrix.canmatrix import canmatrix.copy diff --git a/src/canmatrix/tests/test_formats.py b/src/canmatrix/tests/test_formats.py index fb7be5b4..6c6e87d1 100644 --- a/src/canmatrix/tests/test_formats.py +++ b/src/canmatrix/tests/test_formats.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import io import textwrap diff --git a/src/canmatrix/tests/test_frame_decoding.py b/src/canmatrix/tests/test_frame_decoding.py index 70b6ed8b..3cc6655f 100644 --- a/src/canmatrix/tests/test_frame_decoding.py +++ b/src/canmatrix/tests/test_frame_decoding.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import pytest import canmatrix.formats import os.path diff --git a/src/canmatrix/tests/test_frame_encoding.py b/src/canmatrix/tests/test_frame_encoding.py index a2d577b5..c091018f 100644 --- a/src/canmatrix/tests/test_frame_encoding.py +++ b/src/canmatrix/tests/test_frame_encoding.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import io import os.path import textwrap diff --git a/src/canmatrix/tests/test_j1939_decoder.py b/src/canmatrix/tests/test_j1939_decoder.py index 716ae7c9..d318060a 100644 --- a/src/canmatrix/tests/test_j1939_decoder.py +++ b/src/canmatrix/tests/test_j1939_decoder.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import io import canmatrix.j1939_decoder import textwrap diff --git a/src/canmatrix/tests/test_sym.py b/src/canmatrix/tests/test_sym.py index 5531d9a3..38438aa6 100644 --- a/src/canmatrix/tests/test_sym.py +++ b/src/canmatrix/tests/test_sym.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import io import textwrap diff --git a/src/canmatrix/tests/test_utils.py b/src/canmatrix/tests/test_utils.py index 6cc8dbba..afaa669a 100644 --- a/src/canmatrix/tests/test_utils.py +++ b/src/canmatrix/tests/test_utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import canmatrix.utils diff --git a/src/canmatrix/tests/test_xls.py b/src/canmatrix/tests/test_xls.py index 65dc75bb..4e0323a3 100644 --- a/src/canmatrix/tests/test_xls.py +++ b/src/canmatrix/tests/test_xls.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import canmatrix.formats.xls import decimal diff --git a/src/canmatrix/utils.py b/src/canmatrix/utils.py index 2d8f67a0..13f699e9 100644 --- a/src/canmatrix/utils.py +++ b/src/canmatrix/utils.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - import csv import shlex import sys From 64b0814efde440c6849e65c7ff7ed48b42bb1e31 Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Fri, 21 Jun 2019 23:07:03 +0200 Subject: [PATCH 06/39] annotation cleanup ticket #323 (#372) --- src/canmatrix/join.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/canmatrix/join.py b/src/canmatrix/join.py index dfc49379..138bb0f8 100644 --- a/src/canmatrix/join.py +++ b/src/canmatrix/join.py @@ -28,12 +28,12 @@ def ids_sharing_same_pgn(id_x, pgn_x, id_y, pgn_y): def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmatrix.CanMatrix - target_db = next(iter(canmatrix.formats.loadp(files.pop(0)).values())) # type: canmatrix.CanMatrix + target_db = next(iter(canmatrix.formats.loadp(files.pop(0)).values())) pgn_x, id_x = list_pgn(db=target_db) for f in files: - source_db = next(iter(canmatrix.formats.loadp(f).values())) # type: canmatrix.CanMatrix + source_db = next(iter(canmatrix.formats.loadp(f).values())) pgn_y, id_y = list_pgn(db=source_db) same_pgn = ids_sharing_same_pgn(id_x, pgn_x, id_y, pgn_y) @@ -43,7 +43,7 @@ def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmat target_fr = target_db.frame_by_id(id_a) source_fr = source_db.frame_by_id(id_b) - signal_to_add = [] # type: typing.List[canmatrix.Signal] + signal_to_add = [] for sig_t in target_fr.signals: for sig_s in source_fr.signals: # print(sig.name) @@ -57,7 +57,7 @@ def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmat def rename_frame_with_id(source_db): # type: (canmatrix.CanMatrix) -> None for frameSc in source_db.frames: - _, pgn, sa = frameSc.arbitration_id.j1939_tuple() + _, pgn, sa = frameSc.arbitration_id.j1939_tuple extension = "__{pgn:#04X}_{sa:#02X}_{sa:03d}d".format(pgn=pgn, sa=sa) new_name = frameSc.name + extension @@ -94,7 +94,7 @@ def join_frame_for_manufacturer(db, files): # type: (canmatrix.CanMatrix, typin target_fr = db.frame_by_id(idx) source_fr = source_db.frame_by_id(idy) - _, pgn, sa = target_fr.arbitration_id.j1939_tuple() + _, pgn, sa = target_fr.arbitration_id.j1939_tuple if sa < 128: print('less', target_fr.name) to_add = [] From 6f76a6fd5f1f2caac4b9274d7f3836842debd381 Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Fri, 21 Jun 2019 23:07:34 +0200 Subject: [PATCH 07/39] Update cli doc (inspired by #361) (#373) --- docs/cli.rst | 77 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index 58b4e5b3..99241559 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -5,6 +5,7 @@ Command Line Interface 1. **canconvert**: converts CAN database formats between all supported formats. + Example: "*canconvert* someArSystemdescription.arxml file.dbc" 2. **cancompare**: @@ -17,29 +18,39 @@ Command Line Interface General _______ +If you properly install canmatrix using *pip,* the setuptools create +two ecxcutables for you: `canconvert` and `cancompare`. You can find these executables +near to your `python(.exe)` + +If you aren't able to find the scripts, you can still run it as + :: - $ canconvert.py -h - $ canconvert.py --help +$ python -m canmatrix.cli.compare [args] +$ python -m canmatrix.cli.convert [args] -show help message/usage and exits +To show help message/usage call :: -:: + $ canconvert -h + $ canconvert --help + + +Another arguments are :: - $ canconvert.py -v + $ canconvert -v Output verbosity :: - $ canconvert.py -s + $ canconvert -s don't print status messages to stdout. (only errors) :: - $ canconvert.py -f FORCE_OUTPUT + $ canconvert -f FORCE_OUTPUT enforce output format, ignoring output file extension (e.g., -f csv) @@ -51,19 +62,19 @@ __________________________ :: - $ canconvert.py source.dbc target.xlsx + $ canconvert source.dbc target.xlsx **convert dbc file to dbf:** :: - $ canconvert.py source.dbc target.dbf + $ canconvert source.dbc target.dbf **convert arxml file to dbc:** :: - $ canconvert.py source.arxml target.dbc + $ canconvert source.arxml target.dbc Note: in case of ``.arxml`` there can be multiple can databases in. Thus the target ``target.dbc`` may in this case be called ``BUS-NAME-IN-ARXML_target.dbc``. @@ -75,7 +86,7 @@ You can even convert to the same format: :: - $ canconvert.py source.dbc target.dbc + $ canconvert source.dbc target.dbc Multiple charset support: @@ -83,7 +94,7 @@ Multiple charset support: :: - $ canconvert.py --dbcImportEncoding=iso-8859-1 --dbcImportCommentEncoding=cp-1252 --dbcExportEncoding=utf-8 --dbcExportCommentEncoding=utf-8 source.dbc target.dbc + $ canconvert --dbcImportEncoding=iso-8859-1 --dbcImportCommentEncoding=cp-1252 --dbcExportEncoding=utf-8 --dbcExportCommentEncoding=utf-8 source.dbc target.dbc This converts ``source.dbc`` where units are coded in ``iso-8859-1`` and comments are coded in ``cp-1252`` in a ``target.dbc`` where everything is coded in ``utf-8``. Similar charset conversions are possible or even mandatory for following formats: dbc, dbf and sym. @@ -96,7 +107,7 @@ _______________________ :: - $ canconvert.py --deleteZeroSignals source.dbc target.dbc + $ canconvert --deleteZeroSignals source.dbc target.dbc will delete signals with 0 bit length from matrix @@ -104,7 +115,7 @@ will delete signals with 0 bit length from matrix :: - $ convert.py --deleteSignalAttributes GenMsgCycleTime,MyAttrib source.dbc target.dbc + $ canconvert --deleteSignalAttributes GenMsgCycleTime,MyAttrib source.dbc target.dbc will delete the attributes ``GenMsgCycleTime`` and ``MyAttrib`` from all signals in ``source.dbc`` and save the result in ``target.dbc`` @@ -112,7 +123,7 @@ will delete the attributes ``GenMsgCycleTime`` and ``MyAttrib`` from all signals :: - $ convert.py --deleteFrameAttributes GenMsgCycleTime,MyAttrib source.dbc target.dbc + $ canconvert --deleteFrameAttributes GenMsgCycleTime,MyAttrib source.dbc target.dbc will delete the attributes ``GenMsgCycleTime`` and ``MyAttrib`` from all frames in ``source.dbc`` and save the result in ``target.dbc`` @@ -120,7 +131,7 @@ will delete the attributes ``GenMsgCycleTime`` and ``MyAttrib`` from all frames :: - $ canconvert.py --recalcDLC=max source.dbc target.dbc + $ canconvert --recalcDLC=max source.dbc target.dbc this will recalculate DLC for each frame in ``source.dbc``. In ``target.dlc`` the same DLC like in ``source.dbc`` will be stored, except the calculated DLC is bigger. @@ -130,7 +141,7 @@ Than the calculated DLC will be stored. :: - $ canconvert.py --recalcDLC=force source.dbc target.dbc + $ canconvert --recalcDLC=force source.dbc target.dbc this will recalculate DLC for each frame in ``source.dbc``. In ``target.dlc`` the calculated DLC will be stored independently from ``source.dbc``. @@ -139,7 +150,7 @@ In ``target.dlc`` the calculated DLC will be stored independently from ``source. :: - $ canconvert.py --deleteObsoleteDefines source.dbc target.dbc + $ canconvert --deleteObsoleteDefines source.dbc target.dbc this will remove all defines which no attribute exist for in ``source.dbc`` and store the result in ``target.dlc``. @@ -147,7 +158,7 @@ this will remove all defines which no attribute exist for in ``source.dbc`` and :: - $ canconvert.py --deleteECU=myEcu,myEcu2 source.dbc target.dbc + $ canconvert --deleteECU=myEcu,myEcu2 source.dbc target.dbc this will remove ECUs ``myEcu`` and ``myEcu2`` in ``source.dbc`` and store the result in ``target.dlc``. @@ -155,7 +166,7 @@ this will remove ECUs ``myEcu`` and ``myEcu2`` in ``source.dbc`` and store the r :: - $ canconvert.py --renameECU=myEcu:myNewEcu,myEcu2:myNewEcu2 source.dbc target.dbc + $ canconvert --renameECU=myEcu:myNewEcu,myEcu2:myNewEcu2 source.dbc target.dbc this will load ``source.dbc`` and rename ECU ``myEcu`` in ``myNewEcu`` and ``myEcu2`` in ``myNewEcu2``. The result is stored in ``target.dlc``. @@ -164,7 +175,7 @@ The result is stored in ``target.dlc``. :: - $ canconvert.py --deleteFrame=myFrame,myFrame2 source.dbc target.dbc + $ canconvert --deleteFrame=myFrame,myFrame2 source.dbc target.dbc this will remove frames ``myFrame`` and ``myFrame2`` in ``source.dbc`` and store the result in ``target.dlc``. @@ -172,7 +183,7 @@ this will remove frames ``myFrame`` and ``myFrame2`` in ``source.dbc`` and store :: - $ canconvert.py --renameFrame=myFrame:myNewFrame,myFrame2:myNewFrame2 source.dbc target.dbc + $ canconvert --renameFrame=myFrame:myNewFrame,myFrame2:myNewFrame2 source.dbc target.dbc this will load ``source.dbc`` and rename frames ``myFrame`` in ``myNewFrame`` and ``myFrame2`` in ``myNewFrame2``. The result is stored in ``target.dlc``. @@ -182,7 +193,7 @@ The result is stored in ``target.dlc``. :: - $ canconvert.py --deleteSignal=mySignal,mySignal2 source.dbc target.dbc + $ canconvert --deleteSignal=mySignal,mySignal2 source.dbc target.dbc this will remove signales ``mySignal`` and ``mySignal2`` in ``source.dbc`` and store the result in ``target.dlc``. @@ -190,7 +201,7 @@ this will remove signales ``mySignal`` and ``mySignal2`` in ``source.dbc`` and s :: - $ canconvert.py --renameSignal=mySignal:myNewSignal,mySignal2:myNewSignal2 source.dbc target.dbc + $ canconvert --renameSignal=mySignal:myNewSignal,mySignal2:myNewSignal2 source.dbc target.dbc this will load ``source.dbc`` and rename signals ``mySignal`` in ``myNewSignal`` and ``mySignal2`` in ``myNewSignal2``. The result is stored in ``target.dlc``. @@ -199,14 +210,14 @@ The result is stored in ``target.dlc``. :: - $ canconvert.py --setFrameFd=myFrame,myFrame2 source.dbc target.dbc + $ canconvert --setFrameFd=myFrame,myFrame2 source.dbc target.dbc this will set frame-type of ``myFrame`` and ``myFrame2`` in ``source.dbc`` to CANFD and store the result in ``target.dlc`` list) Syntax: --setFrameFd=myFrame1,mySecondFrame :: - $ canconvert.py --unsetFrameFd=myFrame,myFrame2 source.dbc target.dbc + $ canconvert --unsetFrameFd=myFrame,myFrame2 source.dbc target.dbc this will set frame-type of ``myFrame`` and ``myFrame2`` in ``source.dbc`` to normal (not FD) and store the result in ``target.dlc`` list) Syntax: --unsetFrameFd=myFrame1,mySecondFrame @@ -219,7 +230,7 @@ __________________ :: - $ canconvert.py --ecus=REAR_ECU source.dbc target.dbc + $ canconvert --ecus=REAR_ECU source.dbc target.dbc This generates a ``target.dbc`` with all Informations out of ``source.dbc`` which are needed for ``REAR_ECU``. All frames which are received or sent by ``REAR_ECU`` are extracted. Also all attributes of the frames and the ECU. @@ -229,13 +240,13 @@ This is some *lite* ECU-Extract. :: - $ canconvert.py --ecus=FRONT_ECU,REAR_ECU source.dbc target.dbc + $ canconvert --ecus=FRONT_ECU,REAR_ECU source.dbc target.dbc **extract frame[s] out of matrix:** :: - $ canconvert.py --frames=REAR_FRAME,FRONT_FRAME source.dbc target.dbc + $ canconvert --frames=REAR_FRAME,FRONT_FRAME source.dbc target.dbc Extracts the frames ``REAR_FRAME`` and ``FRONT_FRAME`` with the needed ECUs and attributes. @@ -243,7 +254,7 @@ Extracts the frames ``REAR_FRAME`` and ``FRONT_FRAME`` with the needed ECUs and :: - $ canconvert.py --merge=second.dbc source.dbc target.dbc + $ canconvert --merge=second.dbc source.dbc target.dbc Merges ``source.dbc`` and ``second.dbc`` in ``target.dbc``. @@ -251,7 +262,7 @@ Merges ``source.dbc`` and ``second.dbc`` in ``target.dbc``. :: - $ canconvert.py --merge=second.dbc:ecu=REAR_ECU source.dbc target.dbc + $ canconvert --merge=second.dbc:ecu=REAR_ECU source.dbc target.dbc Merges REAR_ECU out of ``second.dbc`` with ``source.dbc`` and store result in ``target.dbc``. @@ -259,7 +270,7 @@ Merges REAR_ECU out of ``second.dbc`` with ``source.dbc`` and store result in `` :: - $ canconvert.py --merge=second.dbc:frame=REAR_FRAME source.dbc target.dbc + $ canconvert --merge=second.dbc:frame=REAR_FRAME source.dbc target.dbc Merges REAR_FRAME out of ``second.dbc`` with ``source.dbc`` and store result in ``target.dbc``. @@ -267,7 +278,7 @@ Merges REAR_FRAME out of ``second.dbc`` with ``source.dbc`` and store result in :: - $ canconvert.py --merge=second.dbc:ecu=REAR_ECU:ecu=FRONT_ECU:frame=FRAME1:FRAME=FRAME2 source.dbc target.dbc + $ canconvert --merge=second.dbc:ecu=REAR_ECU:ecu=FRONT_ECU:frame=FRAME1:FRAME=FRAME2 source.dbc target.dbc Merges REAR_ECU and FRONT_ECU and FRAME1 and FRAME2 out of ``second.dbc`` with ``source.dbc`` and store result in ``target.dbc``. From 1ccdb5d39b175ea869c43d780a1cf01cbe8569f9 Mon Sep 17 00:00:00 2001 From: Thomas Fritzsche Date: Sat, 13 Jul 2019 22:03:49 +0200 Subject: [PATCH 08/39] fix: xls is using the wrong number for arbitration id (#377) --- src/canmatrix/formats/xls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index e7b8f4d5..05aba8ff 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -421,7 +421,7 @@ def load(file, **options): if frame_id.endswith("xh"): new_frame.arbitration_id = canmatrix.ArbitrationId(int(frame_id[:-2], 16), extended=True) else: - new_frame.arbitration_id = canmatrix.ArbitrationId(int(frame_id[:-2], 16), extended=False) + new_frame.arbitration_id = canmatrix.ArbitrationId(int(frame_id[:-1], 16), extended=False) db.add_frame(new_frame) # eval launch_type From b2515cba4581d8008267f895b0efbec909f99534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 23 Jul 2019 07:24:03 +0200 Subject: [PATCH 09/39] add outputformat for Scapy (#378) * add output format for scapy * fix special char handling in scapy exporter * add unit test simplify get_fmt --- src/canmatrix/formats/__init__.py | 2 +- src/canmatrix/formats/scapy.py | 84 +++++++++++++++++++++++++++++++ src/canmatrix/tests/test_scapy.py | 37 ++++++++++++++ 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 src/canmatrix/formats/scapy.py create mode 100644 src/canmatrix/tests/test_scapy.py diff --git a/src/canmatrix/formats/__init__.py b/src/canmatrix/formats/__init__.py index 61f319d3..b56b6835 100644 --- a/src/canmatrix/formats/__init__.py +++ b/src/canmatrix/formats/__init__.py @@ -14,7 +14,7 @@ logger = logging.getLogger(__name__) moduleList = ["arxml", "cmcsv", "dbc", "dbf", "cmjson", - "kcd", "fibex", "sym", "xls", "xlsx", "yaml"] + "kcd", "fibex", "sym", "xls", "xlsx", "yaml", "scapy"] loadedFormats = [] supportedFormats = {} # type: typing.MutableMapping[str, typing.MutableSequence[str]] extensionMapping = {} diff --git a/src/canmatrix/formats/scapy.py b/src/canmatrix/formats/scapy.py new file mode 100644 index 00000000..ae02ac9b --- /dev/null +++ b/src/canmatrix/formats/scapy.py @@ -0,0 +1,84 @@ +# Copyright (c) 2019, Eduard Broecker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that +# the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this list of conditions and the +# following disclaimer. +# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. + +# +# this script exports scapy python files +# https://scapy.readthedocs.io/en/latest/advanced_usage.html#automotive-usage + +extension = "py" +import textwrap + + + +def get_fmt(signal): + + if signal.is_little_endian: + fmt = "<" + else: + fmt = ">" + + if signal.is_float: + fmt += "f" + elif signal.is_signed: + fmt += "b" + else: + fmt += "B" + return fmt + + + +def dump(db, f, **options): + scapy_decoder = textwrap.dedent(""" #!/usr/bin/env python + # -*- coding: utf-8 -*- + from scapy.packet import Packet + from scapy.packet import bind_layers + from scapy.fields import * + from scapy.layers.can import * + class DBC(CAN): + name = 'DBC' + fields_desc = [ + FlagsField('flags', 0, 3, ['error', + 'remote_transmission_request', + 'extended']), + XBitField('arbitration_id', 0, 29), + ByteField('length', None), + ThreeBytesField('reserved', 0), + ] + """) + + for frame in db.frames: + scapy_decoder += "class " + frame.name + "(Packet):\n" + scapy_decoder += " fields_desc = [ \n" + + for signal in frame.signals: + scapy_decoder += u' SignalField("{}", default=0, start={}, size={}, scaling={}, offset={}, unit="{}", fmt="{}"),\n'.format( + signal.name, signal.get_startbit(bit_numbering=1), signal.size, signal.factor, signal.offset, + signal.unit, get_fmt(signal)) + scapy_decoder += " ]\n\n" + + for frame in db.frames: + if frame.arbitration_id.extended: + scapy_decoder += "bind_layers(DBC, " + frame.name + ", arbitration_id = " + hex( + frame.arbitration_id.id) + ", flags = extended)\n" + else: + scapy_decoder += "bind_layers(DBC, " + frame.name + ", arbitration_id = " + hex( + frame.arbitration_id.id) + ")\n" + + f.write(scapy_decoder.encode("utf8")) diff --git a/src/canmatrix/tests/test_scapy.py b/src/canmatrix/tests/test_scapy.py new file mode 100644 index 00000000..bf793436 --- /dev/null +++ b/src/canmatrix/tests/test_scapy.py @@ -0,0 +1,37 @@ +import canmatrix.formats.scapy +import io + + +def test_scapy_frame_exists(): + db = canmatrix.CanMatrix() + db.add_frame(canmatrix.Frame("some_frame")) + outscapy = io.BytesIO() + canmatrix.formats.dump(db, outscapy, "scapy") + + assert "class some_frame(Packet):" in outscapy.getvalue().decode("utf8") + assert "class DBC(CAN)" in outscapy.getvalue().decode("utf8") + +def test_scapy_signal_exists(): + db = canmatrix.CanMatrix() + + db.add_frame(canmatrix.Frame("some_frame")) + db.frame_by_name("some_frame").add_signal(canmatrix.Signal("some_signal", start_bit=3, size=11, factor=1.5, offset=42, unit="cm" )) + + outscapy = io.BytesIO() + canmatrix.formats.dump(db, outscapy, "scapy") + assert 'SignalField("some_signal", default=0, start=3, size=11, scaling=1.5, offset=42, unit="cm", fmt=" Date: Mon, 12 Aug 2019 13:41:06 +0200 Subject: [PATCH 10/39] Dump factor, offset, min, max as float. Load as numeric (#380) * Dump factor, offset, min, max as float. Load as numeric * fixed tests * fixed tests * added --jsonNativeTypes as cli option * review remarks --- src/canmatrix/cli/convert.py | 3 ++ src/canmatrix/formats/cmjson.py | 14 ++++--- src/canmatrix/tests/test_cmjson.py | 65 ++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 6 deletions(-) diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index 3ec9fab6..7392925d 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -152,6 +152,9 @@ def main(): # type: () -> int parser.add_option("", "--jsonMotorolaBitFormat", dest="jsonMotorolaBitFormat", default="lsb", help="Json format: startbit of motorola signals\nValid values: msb, lsb, msbreverse\n default lsb") + parser.add_option("", "--jsonNativeTypes", + dest="jsonNativeTypes", action="store_true", default=False, + help="Uses native json representation for decimals instead of string.") parser.add_option("", "--additionalFrameAttributes", dest="additionalFrameAttributes", default="", diff --git a/src/canmatrix/formats/cmjson.py b/src/canmatrix/formats/cmjson.py index 8bf323a9..8e522ad9 100644 --- a/src/canmatrix/formats/cmjson.py +++ b/src/canmatrix/formats/cmjson.py @@ -42,6 +42,8 @@ def dump(db, f, **options): export_canard = options.get('jsonCanard', False) motorola_bit_format = options.get('jsonMotorolaBitFormat', "lsb") export_all = options.get('jsonAll', False) + native_types = options.get('jsonNativeTypes', False) + number_converter = float if native_types else str additional_frame_columns = [x for x in options.get("additionalFrameAttributes", "").split(",") if x] @@ -81,8 +83,8 @@ def dump(db, f, **options): "name": signal.name, "start_bit": start_bit, "bit_length": signal.size, - "factor": str(signal.factor), - "offset": str(signal.offset), + "factor": number_converter(signal.factor), + "offset": number_converter(signal.offset), "is_big_endian": signal.is_little_endian is False, "is_signed": signal.is_signed, "is_float": signal.is_float @@ -120,10 +122,10 @@ def dump(db, f, **options): "name": signal.name, "start_bit": start_bit, "bit_length": signal.size, - "factor": str(signal.factor), - "offset": str(signal.offset), - "min": str(signal.min), - "max": str(signal.max), + "factor": number_converter(signal.factor), + "offset": number_converter(signal.offset), + "min": number_converter(signal.min), + "max": number_converter(signal.max), "is_big_endian": signal.is_little_endian is False, "is_signed": signal.is_signed, "is_float": signal.is_float, diff --git a/src/canmatrix/tests/test_cmjson.py b/src/canmatrix/tests/test_cmjson.py index 60197188..061734bd 100644 --- a/src/canmatrix/tests/test_cmjson.py +++ b/src/canmatrix/tests/test_cmjson.py @@ -109,3 +109,68 @@ def test_import_min_max(): matrix = canmatrix.formats.loads_flat(json_input, "cmjson", jsonAll=True) assert matrix.frames[0].signals[0].min == -5 assert matrix.frames[0].signals[0].max == 42 + +def test_import_native(): + json_input = """{ + "messages": [ + { + "attributes": {}, + "comment": "", + "id": 10, + "is_extended_frame": false, + "length": 6, + "name": "test_frame", + "signals": [ + { + "attributes": {}, + "bit_length": 40, + "comment": null, + "factor": 0.123, + "is_big_endian": false, + "is_float": false, + "is_signed": true, + "max": 42, + "min": -4.2, + "name": "someSigName", + "offset": 1, + "start_bit": 0, + "values": {} + } + ] + } + ] + }""" + matrix = canmatrix.formats.loads_flat(json_input, "cmjson", jsonAll=True) + assert matrix.frames[0].signals[0].min == -4.2 + assert matrix.frames[0].signals[0].max == 42 + assert matrix.frames[0].signals[0].factor == 0.123 + assert matrix.frames[0].signals[0].offset == 1 + +def test_export_native(): + matrix = canmatrix.canmatrix.CanMatrix() + frame = canmatrix.canmatrix.Frame(name="test_frame", size=6, arbitration_id=10) + signal = canmatrix.Signal(name="test_sig", size=40, is_float=True, min="-4.2", max=42, factor="0.123", offset=1) + frame.add_signal(signal) + matrix.add_frame(frame) + out_file = io.BytesIO() + canmatrix.formats.dump(matrix, out_file, "cmjson", jsonNativeTypes=True) + data = json.loads(out_file.getvalue().decode("utf-8")) + assert (data['messages'][0]['signals'][0]['factor'] == 0.123) + assert (data['messages'][0]['signals'][0]['offset'] == 1) + +def test_export_all_native(): + matrix = canmatrix.canmatrix.CanMatrix() + frame = canmatrix.canmatrix.Frame(name="test_frame", size=6, arbitration_id=10) + signal = canmatrix.Signal(name="test_sig", size=40, is_float=True, min="-4.2", max=42, factor="0.123", offset=1) + frame.add_signal(signal) + matrix.add_frame(frame) + out_file = io.BytesIO() + canmatrix.formats.dump(matrix, out_file, "cmjson", jsonAll=True, jsonNativeTypes=True) + data = json.loads(out_file.getvalue().decode("utf-8")) + assert (data['messages'][0]['signals'][0]['min'] == -4.2) + assert (data['messages'][0]['signals'][0]['max'] == 42) + assert (data['messages'][0]['signals'][0]['factor'] == 0.123) + assert (data['messages'][0]['signals'][0]['offset'] == 1) + + + From 24cf501c2426e58ed4f0de585bb1ccbb94b1e625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 13 Aug 2019 08:53:00 +0200 Subject: [PATCH 11/39] ARXML: merge container PDU and Secured PDU support (#384) * #381 support for containers * #381 create signalgroups for containers * #382 support secured pdus) (#383) * add unittests for #363 and #382 --- src/canmatrix/formats/arxml.py | 74 +- src/canmatrix/tests/ARXMLContainerTest.arxml | 13699 ++++++++++++++++ src/canmatrix/tests/ARXMLSecuredPDUTest.arxml | 362 + src/canmatrix/tests/test_arxml.py | 16 +- 4 files changed, 14122 insertions(+), 29 deletions(-) create mode 100644 src/canmatrix/tests/ARXMLContainerTest.arxml create mode 100644 src/canmatrix/tests/ARXMLSecuredPDUTest.arxml diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 61cb15f7..f396c0b1 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -1191,7 +1191,9 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ pdu = get_child(pdu_mapping, "PDU", root_or_cache, ns) # SIGNAL-I-PDU if pdu is not None and 'SECURED-I-PDU' in pdu.tag: - logger.info("found secured pdu - no signal extraction possible: %s", get_element_name(pdu, ns)) + payload = get_child(pdu, "PAYLOAD", root_or_cache, ns) + pdu = get_child(payload, "I-PDU", root_or_cache, ns) + # logger.info("found secured pdu - no signal extraction possible: %s", get_element_name(pdu, ns)) pdu_frame_mapping[pdu] = get_element_name(frame_elem, ns) @@ -1315,33 +1317,49 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ new_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) -# pdu_sig_mappings = get_child(pdu, "SIGNAL-TO-PDU-MAPPINGS", arDict, ns) -# if not pdu_sig_mappings: -# logger.debug("Frame %s no SIGNAL-TO-PDU-MAPPINGS found", new_frame.name) - pdu_sig_mapping = get_children(pdu, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) - if pdu_sig_mapping: - get_signals(pdu_sig_mapping, new_frame, root_or_cache, ns, None, float_factory) - - # Seen some pdu_sig_mapping being [] and not None with some arxml 4.2 - else: # AR 4.2 - pdu_trigs = get_children(frame_triggering, "PDU-TRIGGERINGS", root_or_cache, ns) - if pdu_trigs is not None: - for pdu_trig in pdu_trigs: - trig_ref_cond = get_child(pdu_trig, "PDU-TRIGGERING-REF-CONDITIONAL", root_or_cache, ns) - trigs = get_child(trig_ref_cond, "PDU-TRIGGERING", root_or_cache, ns) - ipdus = get_child(trigs, "I-PDU", root_or_cache, ns) - - signal_to_pdu_maps = get_child(ipdus, "I-SIGNAL-TO-PDU-MAPPINGS", root_or_cache, ns) - if signal_to_pdu_maps is None: - signal_to_pdu_maps = get_child(ipdus, "I-SIGNAL-TO-I-PDU-MAPPINGS", root_or_cache, ns) - - if signal_to_pdu_maps is None: - logger.debug("AR4.x PDU %s no SIGNAL-TO-PDU-MAPPINGS found - no signal extraction!", - get_element_name(ipdus, ns)) - # signal_to_pdu_map = get_children(signal_to_pdu_maps, "I-SIGNAL-TO-I-PDU-MAPPING", arDict, ns) - get_signals(signal_to_pdu_maps, new_frame, root_or_cache, ns, None, float_factory) # todo BUG expects list, not item - else: - logger.debug("Frame %s (assuming AR4.2) no PDU-TRIGGERINGS found", new_frame.name) + if pdu.tag == ns + "CONTAINER-I-PDU": + pdus = get_children(pdu, "CONTAINED-PDU-TRIGGERING", root_or_cache, ns) + signal_group_id = 1 + singnals_grouped = [] + for pdu in pdus: + ipdu = get_child(pdu, "I-PDU", root_or_cache, ns) + # pdu_sig_mapping = get_children(ipdu, "I-SIGNAL-IN-I-PDU", root_or_cache, ns) + pdu_sig_mapping = get_children(ipdu, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) + # TODO + if pdu_sig_mapping: + get_signals(pdu_sig_mapping, new_frame, root_or_cache, ns, None, float_factory) + new_signals = [] + for signal in new_frame: + if signal.name not in singnals_grouped: + new_signals.append(signal.name) + new_frame.add_signal_group(get_element_name(pdu, ns), signal_group_id, new_signals) + singnals_grouped += new_signals + signal_group_id += 1 + + else: + pdu_sig_mapping = get_children(pdu, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) + if pdu_sig_mapping: + get_signals(pdu_sig_mapping, new_frame, root_or_cache, ns, None, float_factory) + # Seen some pdu_sig_mapping being [] and not None with some arxml 4.2 + else: # AR 4.2 + pdu_trigs = get_children(frame_triggering, "PDU-TRIGGERINGS", root_or_cache, ns) + if pdu_trigs is not None: + for pdu_trig in pdu_trigs: + trig_ref_cond = get_child(pdu_trig, "PDU-TRIGGERING-REF-CONDITIONAL", root_or_cache, ns) + trigs = get_child(trig_ref_cond, "PDU-TRIGGERING", root_or_cache, ns) + ipdus = get_child(trigs, "I-PDU", root_or_cache, ns) + + signal_to_pdu_maps = get_child(ipdus, "I-SIGNAL-TO-PDU-MAPPINGS", root_or_cache, ns) + if signal_to_pdu_maps is None: + signal_to_pdu_maps = get_child(ipdus, "I-SIGNAL-TO-I-PDU-MAPPINGS", root_or_cache, ns) + + if signal_to_pdu_maps is None: + logger.debug("AR4.x PDU %s no SIGNAL-TO-PDU-MAPPINGS found - no signal extraction!", + get_element_name(ipdus, ns)) + # signal_to_pdu_map = get_children(signal_to_pdu_maps, "I-SIGNAL-TO-I-PDU-MAPPING", arDict, ns) + get_signals(signal_to_pdu_maps, new_frame, root_or_cache, ns, None, float_factory) # todo BUG expects list, not item + else: + logger.debug("Frame %s (assuming AR4.2) no PDU-TRIGGERINGS found", new_frame.name) return new_frame diff --git a/src/canmatrix/tests/ARXMLContainerTest.arxml b/src/canmatrix/tests/ARXMLContainerTest.arxml new file mode 100644 index 00000000..35e2e7f3 --- /dev/null +++ b/src/canmatrix/tests/ARXMLContainerTest.arxml @@ -0,0 +1,13699 @@ + + + + + + VectorAutosarExplorerGeneratedObjects + + + SYSTEM + + + System + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU_Contained_1 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/Contained_PDU_2 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/Container + + + /VectorAutosarExplorerGeneratedObjects/FRAME/PDU_Frame + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/Sender + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/FRAME/TestFrame + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsPDU + + + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsContainer + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsPDUIntel + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU3 + + + /VectorAutosarExplorerGeneratedObjects/FRAME/Trame4PDUS + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU1 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU2 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU_3 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU4 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDUCont + + + /VectorAutosarExplorerGeneratedObjects/FRAME/Trame2PDUs + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU5 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU6 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/Cont2PDUs + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsContainer_NewPDU + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + + + + + New_CanCluster + + + New_CanCluster + + + 250000 + + + CANChannel + + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/Sender/Connector_Sender_2954a2d1271579a3 + + + + + NewFrameTriggering_b2f22d434ee2fb66 + /VectorAutosarExplorerGeneratedObjects/FRAME/Frame_With_Container + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_b1c33886f0a2c89c + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_3abaa70732f5cbe4 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_f2dab933de20f6a8 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_f4a99caecaba894a + + + STANDARD + CAN-FD + 100 + + + NewFrameTriggering_d861343caaa35ec3 + /VectorAutosarExplorerGeneratedObjects/FRAME/PDU_Frame + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_86fa10c27580fc3c + + + STANDARD + CAN-FD + 101 + + + NewFrameTriggering_cb5cc732fa461c3c + /VectorAutosarExplorerGeneratedObjects/FRAME/TestFrame + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_f57cf9d48832bf7e + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_514c9b5e125373e1 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_a7a2097b9c192eb4 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_b23e0a4157bbef45 + + + STANDARD + CAN-FD + 99 + + + NewFrameTriggering_ac29b3e7fd91f00c + /VectorAutosarExplorerGeneratedObjects/FRAME/Trame4PDUS + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_4b6207d896bee4b7 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_a2ecb69513c338ba + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_0c851bec2e8a62d7 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_301feee6efa3b0a4 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_6681ec041c9ee394 + + + STANDARD + CAN-FD + 1 + + + NewFrameTriggering_6cdec4ce4cc48e52 + /VectorAutosarExplorerGeneratedObjects/FRAME/Trame2PDUs + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_71f505b37e0d51ee + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_794da5837c30c057 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_e9b41d43efa157b3 + + + STANDARD + CAN-FD + 2 + + + + + NewSignalTriggering_4a24057ee178183a + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + + + NewSignalTriggering_201b6b1dd6f9bdac + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + + + NewSignalTriggering_bcfc0043e652bff6 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + + + NewSignalTriggering_64a180782984ac31 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + + + NewSignalTriggering_1f99a0d574696445 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + + + NewSignalTriggering_9efb08a1a1cfd7e7 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + + + NewSignalTriggering_bceed15026ba8c3a + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + + + NewSignalTriggering_9d1106e9f6f49900 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + + + NewSignalTriggering_e8a247f22e2cc227 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + + + NewSignalTriggering_c356537a6471b5d4 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + + + NewSignalTriggering_2477beebacfbe3d3 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + + + NewSignalTriggering_fba033d4ddea917c + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + + + NewSignalTriggering_8fb9af80f0619dc6 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + + + NewSignalTriggering_98b08604595a2c9f + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + + + NewSignalTriggering_c97f6434e2a52758 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + + + NewSignalTriggering_f8e2e02f17ae5d57 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + + + NewSignalTriggering_99d5fd3e082d738d + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + + + NewSignalTriggering_d9a3ea3d1a2e76da + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + + + NewSignalTriggering_099561399410dec5 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + + + NewSignalTriggering_874820411d87a3c6 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + + + NewSignalTriggering_e1b101095a6469a4 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + + + NewSignalTriggering_2d222329d9baea8e + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + + + NewSignalTriggering_546ac28f990c6d15 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + + + NewSignalTriggering_c414cc55486780d4 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + + + + + NewPduTriggering_b1c33886f0a2c89c + /VectorAutosarExplorerGeneratedObjects/PDUS/Container + + + NewPduTriggering_86fa10c27580fc3c + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_4a24057ee178183a + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_201b6b1dd6f9bdac + + + + + NewPduTriggering_3abaa70732f5cbe4 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU_Contained_1 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_bcfc0043e652bff6 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_64a180782984ac31 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_1f99a0d574696445 + + + + + NewPduTriggering_f2dab933de20f6a8 + /VectorAutosarExplorerGeneratedObjects/PDUS/Contained_PDU_2 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_9efb08a1a1cfd7e7 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_bceed15026ba8c3a + + + + + NewPduTriggering_f57cf9d48832bf7e + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsContainer + + + NewPduTriggering_514c9b5e125373e1 + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsPDU + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_9d1106e9f6f49900 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_e8a247f22e2cc227 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_c356537a6471b5d4 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_2477beebacfbe3d3 + + + + + NewPduTriggering_a7a2097b9c192eb4 + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsPDUIntel + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_fba033d4ddea917c + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_8fb9af80f0619dc6 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_98b08604595a2c9f + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_c97f6434e2a52758 + + + + + NewPduTriggering_f4a99caecaba894a + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU3 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_f8e2e02f17ae5d57 + + + + + NewPduTriggering_4b6207d896bee4b7 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDUCont + + + NewPduTriggering_a2ecb69513c338ba + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU1 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_99d5fd3e082d738d + + + + + NewPduTriggering_0c851bec2e8a62d7 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU2 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_d9a3ea3d1a2e76da + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_099561399410dec5 + + + + + NewPduTriggering_301feee6efa3b0a4 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU_3 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_874820411d87a3c6 + + + + + NewPduTriggering_6681ec041c9ee394 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU4 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_e1b101095a6469a4 + + + + + NewPduTriggering_71f505b37e0d51ee + /VectorAutosarExplorerGeneratedObjects/PDUS/Cont2PDUs + + + NewPduTriggering_794da5837c30c057 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU5 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_2d222329d9baea8e + + + + + NewPduTriggering_e9b41d43efa157b3 + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU6 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_546ac28f990c6d15 + + + + + NewPduTriggering_b23e0a4157bbef45 + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsContainer_NewPDU + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_c414cc55486780d4 + + + + + + + CAN + 250000 + + + + + + + FRAME + + + Frame_With_Container + 16 + + + PduToFrameMapping_24dffdbcf72978fd + MOST-SIGNIFICANT-BYTE-FIRST + /VectorAutosarExplorerGeneratedObjects/PDUS/Container + 0 + + + + + PDU_Frame + 2 + + + PduToFrameMapping_0293daafb40a43a8 + MOST-SIGNIFICANT-BYTE-LAST + /VectorAutosarExplorerGeneratedObjects/PDUS/PDU + 0 + + + + + TestFrame + 15 + + + PduToFrameMapping_629236531d6fef13 + MOST-SIGNIFICANT-BYTE-LAST + /VectorAutosarExplorerGeneratedObjects/PDUS/SmallSignalsContainer + 0 + + + + + Trame4PDUS + 30 + + + PduToFrameMapping_ff56809f343f59e9 + MOST-SIGNIFICANT-BYTE-FIRST + /VectorAutosarExplorerGeneratedObjects/PDUS/PDUCont + 0 + + + + + Trame2PDUs + 32 + + + PduToFrameMapping_0bda22472a7ba1c7 + MOST-SIGNIFICANT-BYTE-FIRST + /VectorAutosarExplorerGeneratedObjects/PDUS/Cont2PDUs + 0 + + + + + + + PDUS + + + PDU_Contained_1 + 4 + + LAST-IS-BEST + 15 + ALWAYS + + + + SignalPduMapping_1755f1d619384170 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal1 + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + SignalPduMapping_c09819220e7c8917 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal2 + MOST-SIGNIFICANT-BYTE-FIRST + 15 + + + SignalPduMapping_43433a3b5f9b9840 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_Contained_1_Signal3 + MOST-SIGNIFICANT-BYTE-FIRST + 31 + + + + + Contained_PDU_2 + 4 + + LAST-IS-BEST + 16 + ALWAYS + + + + SignalPduMapping_1200e85081511526 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + SignalPduMapping_e57cf88d34bc3cec + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/Contained_PDU_2_NewSignal_1 + MOST-SIGNIFICANT-BYTE-FIRST + 23 + + + + + Container + 16 + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_3abaa70732f5cbe4 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_f2dab933de20f6a8 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_f4a99caecaba894a + + 0 + DEFAULT-TRIGGER + SHORT-HEADER + ACCEPT-CONFIGURED + 0 + + + PDU + 2 + + + SignalPduMapping_d92d80e42844d706 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal + MOST-SIGNIFICANT-BYTE-LAST + 0 + + + SignalPduMapping_99b57847caf951e6 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU_NewSignal_1 + MOST-SIGNIFICANT-BYTE-LAST + 8 + + + + + SmallSignalsPDU + 6 + + 5 + ALWAYS + + + + SignalPduMapping_b15f236d6144cf6a + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/1bit + MOST-SIGNIFICANT-BYTE-FIRST + 0 + + + SignalPduMapping_5da951091ba27343 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits + MOST-SIGNIFICANT-BYTE-FIRST + 2 + + + SignalPduMapping_ec931bcac1e60bf9 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/3bits + MOST-SIGNIFICANT-BYTE-FIRST + 5 + + + SignalPduMapping_db356a17ac0d0409 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/2bits2 + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + SmallSignalsContainer + 15 + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_514c9b5e125373e1 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_a7a2097b9c192eb4 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_b23e0a4157bbef45 + + 0 + DEFAULT-TRIGGER + SHORT-HEADER + ACCEPT-CONFIGURED + 8 + + + SmallSignalsPDUIntel + 1 + + 6 + NEVER + + + + SignalPduMapping_0cb5c71ff3dde2e1 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal1 + MOST-SIGNIFICANT-BYTE-LAST + 0 + + + SignalPduMapping_f9d554e021efc20f + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2 + MOST-SIGNIFICANT-BYTE-LAST + 1 + + + SignalPduMapping_97841779d3b3479c + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal3 + MOST-SIGNIFICANT-BYTE-LAST + 3 + + + SignalPduMapping_c4befd31b22f649e + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2 + MOST-SIGNIFICANT-BYTE-LAST + 6 + + + + + PDU3 + 1 + + LAST-IS-BEST + 17 + ALWAYS + + + + SignalPduMapping_cf67a462a521103e + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU3_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + PDU1 + 1 + + LAST-IS-BEST + 10 + ALWAYS + + + + SignalPduMapping_4e75c8c3326679a6 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU1_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + PDU2 + 2 + + LAST-IS-BEST + 11 + ALWAYS + + + + SignalPduMapping_4efe69f9e66e9e71 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + SignalPduMapping_df53a603b7f3959d + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU2_NewSignal_1 + MOST-SIGNIFICANT-BYTE-FIRST + 15 + + + + + PDU_3 + 1 + + LAST-IS-BEST + 12 + NEVER + + + + SignalPduMapping_3c1ae8f71a7ab0c7 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PD_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + PDU4 + 1 + + LAST-IS-BEST + 20 + ALWAYS + + + + SignalPduMapping_2bc6c45daf1cff81 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU4_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + PDUCont + 30 + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_a2ecb69513c338ba + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_0c851bec2e8a62d7 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_301feee6efa3b0a4 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_6681ec041c9ee394 + + 0 + DEFAULT-TRIGGER + SHORT-HEADER + ACCEPT-CONFIGURED + 0 + + + PDU5 + 1 + + LAST-IS-BEST + 50 + NEVER + + + + SignalPduMapping_b1bfa3015911e920 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU5_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + PDU6 + 1 + + LAST-IS-BEST + 60 + ALWAYS + + + + SignalPduMapping_436476762c80d9f2 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/PDU6_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 7 + + + + + Cont2PDUs + 30 + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_794da5837c30c057 + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_e9b41d43efa157b3 + + 1 + DEFAULT-TRIGGER + SHORT-HEADER + ACCEPT-CONFIGURED + 0 + + + SmallSignalsContainer_NewPDU + 1 + + + SignalPduMapping_3b3d8f80b807631c + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal + MOST-SIGNIFICANT-BYTE-LAST + 0 + + + + + + + I_SIGNALS + + + PDU_Contained_1_Signal1 + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU_Contained_1_Signal1_905db81da40081cb + + + PDU_Contained_1_Signal2 + OVERRIDE + 16 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU_Contained_1_Signal2_560dca45b917ac81 + + + PDU_Contained_1_Signal3 + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU_Contained_1_Signal3_c2518f7b986c2257 + + + Contained_PDU_2_NewSignal + OVERRIDE + 16 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/Contained_PDU_2_NewSignal_4521aa60e6ed341c + + + Contained_PDU_2_NewSignal_1 + OVERRIDE + 16 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/Contained_PDU_2_NewSignal_1_7013bc93a91870d1 + + + PDU_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU_NewSignal_adf0210fbe6c5cec + + + PDU_NewSignal_1 + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU_NewSignal_1_a340d33220b108d5 + + + 1bit + OVERRIDE + 1 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/1bit_6e81c7874a94126b + + + 2bits + OVERRIDE + 2 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/2bits_648803615523b604 + + + 3bits + OVERRIDE + 3 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/3bits_9c83fdb894ed05bf + + + 2bits2 + OVERRIDE + 2 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/2bits2_0ed8412ba478bbdc + + + SmallSignalsPDUIntel_NewSignal1 + OVERRIDE + 1 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/SmallSignalsPDUIntel_NewSignal1_7ca0913a74a189fa + + + SmallSignalsPDUIntel_NewSignal2 + OVERRIDE + 2 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/SmallSignalsPDUIntel_NewSignal2_efd2350a025ed292 + + + SmallSignalsPDUIntel_NewSignal3 + OVERRIDE + 3 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/SmallSignalsPDUIntel_NewSignal3_3864388f1c22f038 + + + SmallSignalsPDUIntel_NewSignal2_2 + OVERRIDE + 2 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/SmallSignalsPDUIntel_NewSignal2_2_7976cc7aa716cfde + + + PDU3_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU3_NewSignal_663edd1f1125ded2 + + + PDU1_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU1_NewSignal_a4ef752e6cbdffff + + + PDU2_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU2_NewSignal_b45992d48685ea1e + + + PDU2_NewSignal_1 + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU2_NewSignal_1_da3a4ef278f76687 + + + PD_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PD_NewSignal_925527ee06ca0d25 + + + PDU4_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU4_NewSignal_74daf6dbae331632 + + + PDU5_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU5_NewSignal_6a23afcdd65a64d4 + + + PDU6_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/PDU6_NewSignal_525b3b193f364475 + + + SmallSignalsContainer_NewPDU_NewSignal + OVERRIDE + 8 + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/SmallSignalsContainer_NewPDU_NewSignal_3f03f2fd574a4fce + + + + + BASE_TYPES + + + New_BaseType + 16 + NONE + + + + + SYSTEM_SIGNALS + + + PDU_Contained_1_Signal1_5fac22b55f933050 + + + + + + + + PDU_Contained_1_Signal2_e0a31c3b54fa942e + + + + + + + + PDU_Contained_1_Signal3_b9ac4fd0a37af254 + + + + + + + + Contained_PDU_2_NewSignal_d502d9e45ab03d3c + + + + + + + + Contained_PDU_2_NewSignal_1_609fae7d6d082c3a + + + + + + + + PDU_Contained_1_Signal1_e793d75f4a99a0d0 + + + + + + + + PDU_Contained_1_Signal2_8ffde51bd5846f35 + + + + + + + + PDU_Contained_1_Signal3_a7b88fe76dcaa2bd + + + + + + + + Contained_PDU_2_NewSignal_8f42ebb60baa0c24 + + + + + + + + Contained_PDU_2_NewSignal_1_04bec30ade99575b + + + + + + + + PDU_NewSignal_cceb166f2cdcd51c + + + + + + + + PDU_NewSignal_1_f077d111aa10e478 + + + + + + + + PDU_Contained_1_Signal1_b82e9320f64b1cd8 + + + + + + + + PDU_Contained_1_Signal2_8a8692bea6469b12 + + + + + + + + PDU_Contained_1_Signal3_7c962ba1a08e13b8 + + + + + + + + Contained_PDU_2_NewSignal_803085c02e4d4195 + + + + + + + + Contained_PDU_2_NewSignal_1_d35e066ab94c2e32 + + + + + + + + PDU_NewSignal_25e287d5acfbbf69 + + + + + + + + PDU_NewSignal_1_26029de203282f02 + + + + + + + + PDU_Contained_1_Signal1_7f3f90db1e4a6057 + + + + + + + + PDU_Contained_1_Signal2_082a52ca47ad89dc + + + + + + + + PDU_Contained_1_Signal3_a0ffab2a85af6f16 + + + + + + + + Contained_PDU_2_NewSignal_ae40496482a9ae63 + + + + + + + + Contained_PDU_2_NewSignal_1_7e2258055ea71795 + + + + + + + + PDU_NewSignal_974208459a6c7ad4 + + + + + + + + PDU_NewSignal_1_4038e30a2c567593 + + + + + + + + PDU_Contained_1_Signal1_0240ea8da7d7ad2c + + + + + + + + PDU_Contained_1_Signal2_65acb4934b18e0f1 + + + + + + + + PDU_Contained_1_Signal3_17652a7d4afca5c5 + + + + + + + + Contained_PDU_2_NewSignal_fd6b0a5495d68286 + + + + + + + + Contained_PDU_2_NewSignal_1_a976a209f233ad9e + + + + + + + + PDU_NewSignal_5327a153e22983a6 + + + + + + + + PDU_NewSignal_1_027c3a3514d8c91c + + + + + + + + PDU_Contained_1_Signal1_8cfa3ec27646be70 + + + + + + + + PDU_Contained_1_Signal2_45ad7c4c0e7c6408 + + + + + + + + PDU_Contained_1_Signal3_5fe16039c330879d + + + + + + + + Contained_PDU_2_NewSignal_0319faf2f5e1f93b + + + + + + + + Contained_PDU_2_NewSignal_1_ce6c1f8d704558ac + + + + + + + + PDU_NewSignal_13d7898a3886a1f8 + + + + + + + + PDU_NewSignal_1_1f93761cb75c7a8a + + + + + + + + PDU_Contained_1_Signal1_df420c54ead9c557 + + + + + + + + PDU_Contained_1_Signal2_1ebd6b6d2b1b9c25 + + + + + + + + PDU_Contained_1_Signal3_d7b07758fb333db0 + + + + + + + + Contained_PDU_2_NewSignal_a577267b152f7f39 + + + + + + + + Contained_PDU_2_NewSignal_1_2ecc0429a1292f1d + + + + + + + + PDU_NewSignal_b08f7bb9b215fcf6 + + + + + + + + PDU_NewSignal_1_3d3a1c094c3fdb75 + + + + + + + + PDU_Contained_1_Signal1_55691232985dd0f2 + + + + + + + + PDU_Contained_1_Signal2_fc9f804129e7ebd8 + + + + + + + + PDU_Contained_1_Signal3_3ac57f1899f3dda8 + + + + + + + + Contained_PDU_2_NewSignal_0a120875eb300060 + + + + + + + + Contained_PDU_2_NewSignal_1_c9b3fe0589b7ae74 + + + + + + + + PDU_NewSignal_13c4bbd81e5b9b9c + + + + + + + + PDU_NewSignal_1_dd60503916857e6e + + + + + + + + PDU_Contained_1_Signal1_930d6c482bf3cbc3 + + + + + + + + PDU_Contained_1_Signal2_448f0fcbec59cff5 + + + + + + + + PDU_Contained_1_Signal3_79738849b74700ca + + + + + + + + Contained_PDU_2_NewSignal_5ea48d9d87b1c2a3 + + + + + + + + Contained_PDU_2_NewSignal_1_b73e430dfcac916a + + + + + + + + PDU_NewSignal_b139fbccd90e94d7 + + + + + + + + PDU_NewSignal_1_b6ba96adfd0373c6 + + + + + + + + PDU_Contained_1_Signal1_b78e2d86262fe947 + + + + + + + + PDU_Contained_1_Signal2_c753277f79eb089e + + + + + + + + PDU_Contained_1_Signal3_767b683a9354bb22 + + + + + + + + Contained_PDU_2_NewSignal_0b6ccc7387d708dc + + + + + + + + Contained_PDU_2_NewSignal_1_29c208d6dd68face + + + + + + + + PDU_NewSignal_f8dcec4ea4517688 + + + + + + + + PDU_NewSignal_1_b4bca9ba646fdad7 + + + + + + + + PDU_Contained_1_Signal1_46aedd73582912ee + + + + + + + + PDU_Contained_1_Signal2_4f81802b9258d9cc + + + + + + + + PDU_Contained_1_Signal3_f4aa41a9f70682e7 + + + + + + + + Contained_PDU_2_NewSignal_cc16deee7b08a32f + + + + + + + + Contained_PDU_2_NewSignal_1_9878d8b5849685c7 + + + + + + + + PDU_NewSignal_54136ad84f3fdfd4 + + + + + + + + PDU_NewSignal_1_f75f36f86ee2e368 + + + + + + + + PDU_Contained_1_Signal1_e5c11e7ad3de7c98 + + + + + + + + PDU_Contained_1_Signal2_104677f7de427d3e + + + + + + + + PDU_Contained_1_Signal3_3e653b13f5775d03 + + + + + + + + Contained_PDU_2_NewSignal_dc77e2fb8f14805a + + + + + + + + Contained_PDU_2_NewSignal_1_3a67cc69c2695c4b + + + + + + + + PDU_NewSignal_2c71a5dadfd014bb + + + + + + + + PDU_NewSignal_1_fea157dabd0c09d1 + + + + + + + + PDU_Contained_1_Signal1_4642ac7b49c3446d + + + + + + + + PDU_Contained_1_Signal2_10d7d7b26380d01c + + + + + + + + PDU_Contained_1_Signal3_ff203327425f8cba + + + + + + + + Contained_PDU_2_NewSignal_be3e1a39c1558f82 + + + + + + + + Contained_PDU_2_NewSignal_1_f88f3bb0be3a0f09 + + + + + + + + PDU_NewSignal_ff17f39fc63086f6 + + + + + + + + PDU_NewSignal_1_88abfc2398333889 + + + + + + + + PDU_Contained_1_Signal1_7cbdf1905d547055 + + + + + + + + PDU_Contained_1_Signal2_6211644bd28f5f34 + + + + + + + + PDU_Contained_1_Signal3_826308a69c46bc6e + + + + + + + + Contained_PDU_2_NewSignal_1978ac02026045ed + + + + + + + + Contained_PDU_2_NewSignal_1_0e2671fd6b9411df + + + + + + + + PDU_NewSignal_f194969d2fdb4aa9 + + + + + + + + PDU_NewSignal_1_df9e71a20c87b07f + + + + + + + + PDU_Contained_1_Signal1_424f75be607a6318 + + + + + + + + PDU_Contained_1_Signal2_8459c0bbfed8ada1 + + + + + + + + PDU_Contained_1_Signal3_4ce8591537a4d7a6 + + + + + + + + Contained_PDU_2_NewSignal_2469a8e9fd881f4f + + + + + + + + Contained_PDU_2_NewSignal_1_268bc63d2eefb0a6 + + + + + + + + PDU_NewSignal_8cb3463e5f24207a + + + + + + + + PDU_NewSignal_1_88c8eea292315bc4 + + + + + + + + PDU_Contained_1_Signal1_37d7890cccd99dff + + + + + + + + PDU_Contained_1_Signal2_952bc11e55ca8711 + + + + + + + + PDU_Contained_1_Signal3_7b3a4c03d67b2dc6 + + + + + + + + Contained_PDU_2_NewSignal_88736ff23d386c67 + + + + + + + + Contained_PDU_2_NewSignal_1_391f3b31f24b030b + + + + + + + + PDU_NewSignal_3397bf9faee6940b + + + + + + + + PDU_NewSignal_1_fb0972fa0f5921fc + + + + + + + + PDU_Contained_1_Signal1_50dcada09cfe4d9a + + + + + + + + PDU_Contained_1_Signal2_04a8f78d8194a85c + + + + + + + + PDU_Contained_1_Signal3_c832c450a2e18cbb + + + + + + + + Contained_PDU_2_NewSignal_6513002602a88943 + + + + + + + + Contained_PDU_2_NewSignal_1_05d2c5d5a7ee68ab + + + + + + + + PDU_NewSignal_b9d6f3b745848516 + + + + + + + + PDU_NewSignal_1_52d3ce53428f269f + + + + + + + + 1bit_a0f62f347a006507 + + + + + + + + 2bits_2a8e028cdcd6f832 + + + + + + + + 3bits_5470f50a881cf53b + + + + + + + + 2bits2_1a5b394698196c0b + + + + + + + + PDU_Contained_1_Signal1_a2dc5de94ff08933 + + + + + + + + PDU_Contained_1_Signal2_9ccb951ec75b1da4 + + + + + + + + PDU_Contained_1_Signal3_9be6d4f4511bfce1 + + + + + + + + Contained_PDU_2_NewSignal_f1a9a6705f184eed + + + + + + + + Contained_PDU_2_NewSignal_1_a92ad7b8abfd5516 + + + + + + + + PDU_NewSignal_594e81282a39e528 + + + + + + + + PDU_NewSignal_1_1312f940225a4bd4 + + + + + + + + 1bit_32506f4721d6181f + + + + + + + + 2bits_19a84c869112982e + + + + + + + + 3bits_ee6a91e7fdd7d251 + + + + + + + + 2bits2_4e9b3adc133731c7 + + + + + + + + PDU_Contained_1_Signal1_a0c05528d62e556a + + + + + + + + PDU_Contained_1_Signal2_93437f2b1c979b1b + + + + + + + + PDU_Contained_1_Signal3_075c5743bd832b45 + + + + + + + + Contained_PDU_2_NewSignal_b62427bf9b338111 + + + + + + + + Contained_PDU_2_NewSignal_1_4dc2d435f1b2c2cd + + + + + + + + PDU_NewSignal_9475b63576ece39e + + + + + + + + PDU_NewSignal_1_47ea336dbd1904f7 + + + + + + + + 1bit_c40f1b9776d381f9 + + + + + + + + 2bits_2610640b3a2b4b99 + + + + + + + + 3bits_4c52b54f5b671100 + + + + + + + + 2bits2_cc7b04e2d1693fba + + + + + + + + PDU_Contained_1_Signal1_71823c9fee504208 + + + + + + + + PDU_Contained_1_Signal2_7d0a8a56a8a5b8df + + + + + + + + PDU_Contained_1_Signal3_257c06635a10d72b + + + + + + + + Contained_PDU_2_NewSignal_0e453f84d89976e0 + + + + + + + + Contained_PDU_2_NewSignal_1_cfe45b602d49c99a + + + + + + + + PDU_NewSignal_aaf8ff07ec53d024 + + + + + + + + PDU_NewSignal_1_e72f6f445e3d8dae + + + + + + + + 1bit_a82e632fd5eb0ff0 + + + + + + + + 2bits_77b02a50366a93c6 + + + + + + + + 3bits_cff7f4b8594d57db + + + + + + + + 2bits2_d9ae63251b95573d + + + + + + + + SmallSignalsPDUIntel_NewSignal1_1e1b46d1c8327c51 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_84d88acf459319b0 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_9b458b360d82d872 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_9e8a7a2c394322e5 + + + + + + + + PDU_Contained_1_Signal1_7799f4d7b040febd + + + + + + + + PDU_Contained_1_Signal2_ac4ac2034e142b95 + + + + + + + + PDU_Contained_1_Signal3_7d374272fe849234 + + + + + + + + Contained_PDU_2_NewSignal_9409ea28cb80feb8 + + + + + + + + Contained_PDU_2_NewSignal_1_c568fb215261e244 + + + + + + + + PDU_NewSignal_03028c33b5260487 + + + + + + + + PDU_NewSignal_1_5da6b305f5c0af0e + + + + + + + + 1bit_67fa9035dcff80a3 + + + + + + + + 2bits_cd9aacd75b90a277 + + + + + + + + 3bits_b17e778e5d5e0289 + + + + + + + + 2bits2_fddce4de75a33c4a + + + + + + + + SmallSignalsPDUIntel_NewSignal1_6bf3b5a1f3b63e73 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_52113ed3b95b6bf4 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_a29c6b111d1f9e12 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_41e613b6235be70d + + + + + + + + PDU_Contained_1_Signal1_f2b384fd3538d78f + + + + + + + + PDU_Contained_1_Signal2_5b7890fce07aea78 + + + + + + + + PDU_Contained_1_Signal3_5db53b4a7a8b67ec + + + + + + + + Contained_PDU_2_NewSignal_62a6255bd598e927 + + + + + + + + Contained_PDU_2_NewSignal_1_170c44817b165f8b + + + + + + + + PDU_NewSignal_ed1ebd9f3346854e + + + + + + + + PDU_NewSignal_1_6fcd1940aaee91f0 + + + + + + + + 1bit_72300cdda3d5cad9 + + + + + + + + 2bits_383569d0f4831c30 + + + + + + + + 3bits_f46542e47c078b73 + + + + + + + + 2bits2_d0eee79a7048ae5e + + + + + + + + SmallSignalsPDUIntel_NewSignal1_a3c11c5b8ec2a8a8 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_79cb2d4cc541d6f2 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_599c21a6da9a9747 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_5c198aa3430690b6 + + + + + + + + PDU_Contained_1_Signal1_5c741a871cc5ef9d + + + + + + + + PDU_Contained_1_Signal2_08abfe1fccc2ec2e + + + + + + + + PDU_Contained_1_Signal3_bad659d726987987 + + + + + + + + Contained_PDU_2_NewSignal_02e7e27c1f74d655 + + + + + + + + Contained_PDU_2_NewSignal_1_d99d8e033e77fa86 + + + + + + + + PDU_NewSignal_c95f1bc7b8a03325 + + + + + + + + PDU_NewSignal_1_f97519753d8c1fca + + + + + + + + 1bit_8a2b84b9ac86f392 + + + + + + + + 2bits_30b2d5b10a67b7cc + + + + + + + + 3bits_fdf201dbcc6b2f2b + + + + + + + + 2bits2_616f5f3c753769f8 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_952772804f203f78 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_05ee8d1ca382ae86 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_33bd6ebf0a5a5008 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_d1655d6000ddb905 + + + + + + + + PDU_Contained_1_Signal1_27a64c9abaa0af2f + + + + + + + + PDU_Contained_1_Signal2_9023ff6298704b14 + + + + + + + + PDU_Contained_1_Signal3_f5ff8d6c6abcd74a + + + + + + + + Contained_PDU_2_NewSignal_dc21cda9d6c6001a + + + + + + + + Contained_PDU_2_NewSignal_1_fd8fbb94e170502d + + + + + + + + PDU_NewSignal_960608e42ecd8cba + + + + + + + + PDU_NewSignal_1_ff0814ae5a1dd4a2 + + + + + + + + 1bit_b0a7e93ca5c3fc17 + + + + + + + + 2bits_6f3a627ec06f33f7 + + + + + + + + 3bits_ace73c0cf6f45dff + + + + + + + + 2bits2_f087901faedaed33 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_a2b08f00801adba7 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_12571d564ea7dce2 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_5104aad74ca1a6fa + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_cf80a218b574ea67 + + + + + + + + PDU_Contained_1_Signal1_8f7d79aa143c819d + + + + + + + + PDU_Contained_1_Signal2_f3fc49849c0f0f92 + + + + + + + + PDU_Contained_1_Signal3_141ef8f7f291224e + + + + + + + + Contained_PDU_2_NewSignal_6abc3feb9df80b40 + + + + + + + + Contained_PDU_2_NewSignal_1_04f57e5a40fc9ca3 + + + + + + + + PDU_NewSignal_73131d42c96acdef + + + + + + + + PDU_NewSignal_1_dd2e9568e3e7a2fd + + + + + + + + 1bit_f52677243ac9bb0e + + + + + + + + 2bits_5c380f0ab683e179 + + + + + + + + 3bits_24b37b8a1bb7a848 + + + + + + + + 2bits2_510b6ee5129caa98 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_cacec3a6a2223d59 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_0dd0855370f38eb7 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_5ef905ca2178334a + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_e48e2298f6e456eb + + + + + + + + PDU_Contained_1_Signal1_080a7eec8d2acfac + + + + + + + + PDU_Contained_1_Signal2_d62a9d17d31142d1 + + + + + + + + PDU_Contained_1_Signal3_ff93e682c201a5c0 + + + + + + + + Contained_PDU_2_NewSignal_2a5f1810c3d8d3c8 + + + + + + + + Contained_PDU_2_NewSignal_1_64482afb03f806cc + + + + + + + + PDU_NewSignal_a9f85b983f039412 + + + + + + + + PDU_NewSignal_1_006617c820014b01 + + + + + + + + 1bit_8fa3a5afde9fc61e + + + + + + + + 2bits_aae627657f199ff4 + + + + + + + + 3bits_71ef3a7a0f87b674 + + + + + + + + 2bits2_82940b693ca341c3 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_28704dfe61a2e491 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_af331c6d98897387 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_7fd62ee30cfd63f0 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_a611ad6e09dbfa36 + + + + + + + + PDU_Contained_1_Signal1_b128449853bc5968 + + + + + + + + PDU_Contained_1_Signal2_295f5b61e813e2e8 + + + + + + + + PDU_Contained_1_Signal3_0a035f3432153795 + + + + + + + + Contained_PDU_2_NewSignal_310c5f21aa4158ec + + + + + + + + Contained_PDU_2_NewSignal_1_11e113d2c00ffa7e + + + + + + + + PDU_NewSignal_48b5f52112feab63 + + + + + + + + PDU_NewSignal_1_62b1651f0d70be05 + + + + + + + + 1bit_3a0203c9e0f6dcc2 + + + + + + + + 2bits_b534ed6814184469 + + + + + + + + 3bits_8351e5e7c226c027 + + + + + + + + 2bits2_954d20e908dc4e9d + + + + + + + + SmallSignalsPDUIntel_NewSignal1_8a72ebdeefad71b5 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_87cb0d568b2e3806 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_fa4df69fc0fdd7bb + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_07a490a419db772a + + + + + + + + PDU_Contained_1_Signal1_e52ee22fc23773dd + + + + + + + + PDU_Contained_1_Signal2_855e95915b04e168 + + + + + + + + PDU_Contained_1_Signal3_db4d5c5d20f64e52 + + + + + + + + Contained_PDU_2_NewSignal_c7d9b9b2a1ff24b7 + + + + + + + + Contained_PDU_2_NewSignal_1_6999022358fa9513 + + + + + + + + PDU_NewSignal_d8f951e9fc287a62 + + + + + + + + PDU_NewSignal_1_5bc0d73909bcdc4a + + + + + + + + 1bit_6e47982a379b2c05 + + + + + + + + 2bits_f4694dccefa8c19a + + + + + + + + 3bits_a0f4bd77fddf0678 + + + + + + + + 2bits2_ffe1bc817a5df73a + + + + + + + + SmallSignalsPDUIntel_NewSignal1_b0bcc1cc6dd3d789 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_90b09a96f62b1887 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_91179c85123bc2b1 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_c45962d6331848dd + + + + + + + + PDU_Contained_1_Signal1_279d72383a36c528 + + + + + + + + PDU_Contained_1_Signal2_9a2a14c2064b727c + + + + + + + + PDU_Contained_1_Signal3_85963823669a0e11 + + + + + + + + Contained_PDU_2_NewSignal_7ea1342af5bf50c1 + + + + + + + + Contained_PDU_2_NewSignal_1_b3f22020380daf74 + + + + + + + + PDU_NewSignal_d73ac03113b04d70 + + + + + + + + PDU_NewSignal_1_0b9410821a58d015 + + + + + + + + 1bit_5305f20c2f9f150d + + + + + + + + 2bits_74d46dd43458f606 + + + + + + + + 3bits_4acf224dd78bc95a + + + + + + + + 2bits2_586697c78757ce8a + + + + + + + + SmallSignalsPDUIntel_NewSignal1_70479147715192ee + + + + + + + + SmallSignalsPDUIntel_NewSignal2_91756d69fcafac0e + + + + + + + + SmallSignalsPDUIntel_NewSignal3_f9b31537167a5d32 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_4652d05db5d0ff56 + + + + + + + + PDU_Contained_1_Signal1_b300f2b6ffaab14c + + + + + + + + PDU_Contained_1_Signal2_edcc03a60bdce425 + + + + + + + + PDU_Contained_1_Signal3_4c2f8ba410eff68d + + + + + + + + Contained_PDU_2_NewSignal_8da48459b85cf385 + + + + + + + + Contained_PDU_2_NewSignal_1_7522216184fe770f + + + + + + + + PDU_NewSignal_884dfe667c9fbfc5 + + + + + + + + PDU_NewSignal_1_196e077044502cef + + + + + + + + 1bit_61117d4ba6e794c0 + + + + + + + + 2bits_456581e9c746d4a4 + + + + + + + + 3bits_181e8842b61781a7 + + + + + + + + 2bits2_87e7c73226afa8bb + + + + + + + + SmallSignalsPDUIntel_NewSignal1_b07c10ed7b287a7d + + + + + + + + SmallSignalsPDUIntel_NewSignal2_9b35a8e2afc14fcf + + + + + + + + SmallSignalsPDUIntel_NewSignal3_584b8b073aae606b + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_83d09e2697e21d0c + + + + + + + + PDU_Contained_1_Signal1_1df733db592438c9 + + + + + + + + PDU_Contained_1_Signal2_aa15f3c70844da19 + + + + + + + + PDU_Contained_1_Signal3_c1b10f9107cd3fe5 + + + + + + + + Contained_PDU_2_NewSignal_5d1ebcfb944f4817 + + + + + + + + Contained_PDU_2_NewSignal_1_0be80e80eeae19e5 + + + + + + + + PDU_NewSignal_f08e8405bf8bef12 + + + + + + + + PDU_NewSignal_1_f13f45d183fe0e7e + + + + + + + + 1bit_947107da56c63201 + + + + + + + + 2bits_8e723eb38a6d1d28 + + + + + + + + 3bits_3b2f964cda5601bc + + + + + + + + 2bits2_336486a96679f8f8 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_6be6ded62823bc7f + + + + + + + + SmallSignalsPDUIntel_NewSignal2_07950e5745b2fe62 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_63d51d3ce4d8ae64 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_69f426ac7765a74c + + + + + + + + PDU_Contained_1_Signal1_a1a59dd914ca8868 + + + + + + + + PDU_Contained_1_Signal2_715267f876c696b1 + + + + + + + + PDU_Contained_1_Signal3_83b88fc03ad3cfd3 + + + + + + + + Contained_PDU_2_NewSignal_b8a2d98ee4441e16 + + + + + + + + Contained_PDU_2_NewSignal_1_45cab4d24c79e2eb + + + + + + + + PDU_NewSignal_fc771fe2fcb4d98c + + + + + + + + PDU_NewSignal_1_8e99186d86263a8b + + + + + + + + 1bit_3bb2d9bb1b3332b2 + + + + + + + + 2bits_259e767de4b88fa1 + + + + + + + + 3bits_cce541012a5441e0 + + + + + + + + 2bits2_5cfb916eac663f60 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_7f858036a1b81353 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_25edfb46f6873950 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_9c7dab3e6a302c75 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_e47e582cff8955a7 + + + + + + + + PDU_Contained_1_Signal1_2f2e6c1e5b4413cb + + + + + + + + PDU_Contained_1_Signal2_a027ae3d4ef00344 + + + + + + + + PDU_Contained_1_Signal3_9ea1c5d1834c25cf + + + + + + + + Contained_PDU_2_NewSignal_132f7d69a6aa4423 + + + + + + + + Contained_PDU_2_NewSignal_1_c0fd5fc8e4871d63 + + + + + + + + PDU_NewSignal_d6d28096c909eabc + + + + + + + + PDU_NewSignal_1_27d0549c1d107c91 + + + + + + + + 1bit_49a9c1c5a218b009 + + + + + + + + 2bits_fe14c50419b4416d + + + + + + + + 3bits_99f388b90f413a7c + + + + + + + + 2bits2_99e27f56b8d7ba93 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_84a25458f0983169 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2883fa9e5d15af27 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_82453cee1b3a5041 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_2c3ad9b2bdcb0fd8 + + + + + + + + PDU_Contained_1_Signal1_ef8d682a6c0f3fc1 + + + + + + + + PDU_Contained_1_Signal2_1e1c721a1d550bf9 + + + + + + + + PDU_Contained_1_Signal3_3424c229e3f5e31a + + + + + + + + Contained_PDU_2_NewSignal_1bd0ead9147e97b7 + + + + + + + + Contained_PDU_2_NewSignal_1_3ba38a31d5081d7e + + + + + + + + PDU_NewSignal_9ea89d1a87c622bd + + + + + + + + PDU_NewSignal_1_4b83b4cd35d2a052 + + + + + + + + 1bit_8c4b2f1dbf332ffe + + + + + + + + 2bits_f35794b313f476fc + + + + + + + + 3bits_2971152e5297d7a6 + + + + + + + + 2bits2_d886c2fe08980429 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_07ebb88f7abade83 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_359fc7c27f07f48c + + + + + + + + SmallSignalsPDUIntel_NewSignal3_b2a03e0f36f5c351 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_3547c57e3f576ef7 + + + + + + + + PDU_Contained_1_Signal1_b2cc349df8755d33 + + + + + + + + PDU_Contained_1_Signal2_1c6d880ab53f85fa + + + + + + + + PDU_Contained_1_Signal3_06848a7b45c14632 + + + + + + + + Contained_PDU_2_NewSignal_b77692eb43196e2b + + + + + + + + Contained_PDU_2_NewSignal_1_5025804bf4d122a4 + + + + + + + + PDU_NewSignal_d18aaf5f17549fa2 + + + + + + + + PDU_NewSignal_1_e94d29878d81b199 + + + + + + + + 1bit_1c7f3bba45c2bb0f + + + + + + + + 2bits_670b34cad40c7add + + + + + + + + 3bits_09fed70235b1cb73 + + + + + + + + 2bits2_71c496a8a2123aa0 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_1d14254af88e02af + + + + + + + + SmallSignalsPDUIntel_NewSignal2_768da3e758c335ee + + + + + + + + SmallSignalsPDUIntel_NewSignal3_4c261ae8224464c3 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_ea3a82c0e5212288 + + + + + + + + PDU_Contained_1_Signal1_56e694090f46295a + + + + + + + + PDU_Contained_1_Signal2_d5076ab34f1636c7 + + + + + + + + PDU_Contained_1_Signal3_e0f5f418cee3e200 + + + + + + + + Contained_PDU_2_NewSignal_fe8e54964d00d509 + + + + + + + + Contained_PDU_2_NewSignal_1_c6f384f8f66c474b + + + + + + + + PDU_NewSignal_d691d4c4e410622c + + + + + + + + PDU_NewSignal_1_d2b76d65f17cdb5c + + + + + + + + 1bit_aa132fe5a6a6516b + + + + + + + + 2bits_bcd531cbf0c0ff97 + + + + + + + + 3bits_daf7c20faca121ac + + + + + + + + 2bits2_77bb11dd5421f4a4 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_533e5de6d1aefe7a + + + + + + + + SmallSignalsPDUIntel_NewSignal2_8a84e32fea2cac22 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_7079a4bbb624592f + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_d7c07e4b6bf7f51b + + + + + + + + PDU_Contained_1_Signal1_4f81dee44c576d79 + + + + + + + + PDU_Contained_1_Signal2_8aab1722c5db7f26 + + + + + + + + PDU_Contained_1_Signal3_8cfd4c704217af4b + + + + + + + + Contained_PDU_2_NewSignal_037050b9b4f433f9 + + + + + + + + Contained_PDU_2_NewSignal_1_a58218589cfc7b06 + + + + + + + + PDU_NewSignal_af670991872d31db + + + + + + + + PDU_NewSignal_1_5fc73eca7843f2d3 + + + + + + + + 1bit_efcb7b9017e0c2fc + + + + + + + + 2bits_6e6de38b392506b2 + + + + + + + + 3bits_a268a161213be915 + + + + + + + + 2bits2_e60e25d82045629e + + + + + + + + SmallSignalsPDUIntel_NewSignal1_736d63f279b70567 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_1c6183f8af8149f2 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_4f17cd4fb42ba05a + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_b277acdeda58540d + + + + + + + + PDU3_NewSignal_bff3fde4abf05e51 + + + + + + + + PDU_Contained_1_Signal1_34fb2ba2b5c9418d + + + + + + + + PDU_Contained_1_Signal2_a1de2d7c381351ab + + + + + + + + PDU_Contained_1_Signal3_ece7ac8be81cdb96 + + + + + + + + Contained_PDU_2_NewSignal_092b3431eab50801 + + + + + + + + Contained_PDU_2_NewSignal_1_e99098f0f4fe89ae + + + + + + + + PDU_NewSignal_6f6dece212cb1071 + + + + + + + + PDU_NewSignal_1_ef60d37f71c7afbf + + + + + + + + 1bit_759ed4d0235d68fc + + + + + + + + 2bits_96a796547caea51b + + + + + + + + 3bits_d4c868077dd79296 + + + + + + + + 2bits2_99bbb7b2b55b5948 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_977a8b30938a2895 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_44ec46fceb3a6102 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_925dd422c69730f9 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_6300be962cf75aeb + + + + + + + + PDU3_NewSignal_ea81a0cee7bc2e33 + + + + + + + + PDU1_NewSignal_fd934d0328605c0b + + + + + + + + PDU2_NewSignal_f0d0ccdb0e99ebed + + + + + + + + PDU2_NewSignal_1_f41b717a3fc5d1f6 + + + + + + + + PD_NewSignal_1d009f4280261d67 + + + + + + + + PDU4_NewSignal_05d8f2ce8ac85429 + + + + + + + + PDU_Contained_1_Signal1_e0eded11e16e95c1 + + + + + + + + PDU_Contained_1_Signal2_1dac80ad80cbd2ce + + + + + + + + PDU_Contained_1_Signal3_4b67e9c20c29ed4e + + + + + + + + Contained_PDU_2_NewSignal_a94ee55b1e4630c5 + + + + + + + + Contained_PDU_2_NewSignal_1_15c88c678c166a75 + + + + + + + + PDU_NewSignal_939a84ccbd92e94f + + + + + + + + PDU_NewSignal_1_41b4dd2eeac4ebc4 + + + + + + + + 1bit_dc0d967e8f127436 + + + + + + + + 2bits_48e0880919b227c9 + + + + + + + + 3bits_4c034d1c3c25b872 + + + + + + + + 2bits2_a595880636bd55cc + + + + + + + + SmallSignalsPDUIntel_NewSignal1_97e2675421e428d9 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_20afb7a59fef7930 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_6fa43c685bf22edb + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_277e892943e1229e + + + + + + + + PDU3_NewSignal_832d7a0386e87d1b + + + + + + + + PDU1_NewSignal_93484ee42325e5d1 + + + + + + + + PDU2_NewSignal_00b5530a53bbb64d + + + + + + + + PDU2_NewSignal_1_9358cd31259908df + + + + + + + + PD_NewSignal_e1021a46509382e8 + + + + + + + + PDU4_NewSignal_2f636caa6e2cc651 + + + + + + + + PDU5_NewSignal_718129d9e80dafd3 + + + + + + + + PDU6_NewSignal_900b4ca490f5be9e + + + + + + + + PDU_Contained_1_Signal1_0436b939ba92b9e9 + + + + + + + + PDU_Contained_1_Signal2_cf6ab6821a2292f2 + + + + + + + + PDU_Contained_1_Signal3_536ff5696db2e052 + + + + + + + + Contained_PDU_2_NewSignal_9ca62b461303e38f + + + + + + + + Contained_PDU_2_NewSignal_1_046a259d0f1f4d9a + + + + + + + + PDU_NewSignal_cd852579f75c1063 + + + + + + + + PDU_NewSignal_1_72ca447d0aecb4f5 + + + + + + + + 1bit_1e1b4f826a7c47fb + + + + + + + + 2bits_185acfe53f42a840 + + + + + + + + 3bits_ce5dd47cf5b560e0 + + + + + + + + 2bits2_d85407a26596a9e1 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_f80de3af13f82f88 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_3c1b6f0222f0cd37 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_d4e3c504e39a23e7 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_db8af0f1817ce885 + + + + + + + + PDU3_NewSignal_c9e369e3162c8430 + + + + + + + + PDU1_NewSignal_2863e740585a98c8 + + + + + + + + PDU2_NewSignal_fe313a00b6b44759 + + + + + + + + PDU2_NewSignal_1_ee9f66a7b853a3b8 + + + + + + + + PD_NewSignal_87e724bdf047d546 + + + + + + + + PDU4_NewSignal_7ce655e0ba93284f + + + + + + + + PDU5_NewSignal_9e0b7427397e4337 + + + + + + + + PDU6_NewSignal_b0015114903e8f06 + + + + + + + + PDU_Contained_1_Signal1_41a581a3eacf04ca + + + + + + + + PDU_Contained_1_Signal2_d9bcabe0672d9097 + + + + + + + + PDU_Contained_1_Signal3_83064d23ae8bc122 + + + + + + + + Contained_PDU_2_NewSignal_08020420c297ad57 + + + + + + + + Contained_PDU_2_NewSignal_1_93154d9072c3617d + + + + + + + + PDU_NewSignal_a00f87c3409e9719 + + + + + + + + PDU_NewSignal_1_134aa6f3baba9640 + + + + + + + + 1bit_9b02fc79768d621b + + + + + + + + 2bits_a9dab422b343fc82 + + + + + + + + 3bits_da87219e132ad7eb + + + + + + + + 2bits2_7e0cb91cea8f9ba4 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_1f42ac60d6b17db7 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_075781747eccc8e9 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_8b8a7e633c2b47c1 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_ece80d3b5ff7d2ab + + + + + + + + PDU3_NewSignal_e9214647d5be10b9 + + + + + + + + PDU1_NewSignal_3c0d941fb1c1d44c + + + + + + + + PDU2_NewSignal_803afce6f943cd7e + + + + + + + + PDU2_NewSignal_1_d6bd5c77601411ca + + + + + + + + PD_NewSignal_2ef095599d2f163f + + + + + + + + PDU4_NewSignal_b95cb5a2622307fb + + + + + + + + PDU5_NewSignal_555fe7109ba0ceba + + + + + + + + PDU6_NewSignal_55333fe018d26051 + + + + + + + + PDU_Contained_1_Signal1_7dcb9904daf0e9ac + + + + + + + + PDU_Contained_1_Signal2_8ec9352cee5c4e91 + + + + + + + + PDU_Contained_1_Signal3_5fa210a6b1f5e844 + + + + + + + + Contained_PDU_2_NewSignal_20697eda339d5172 + + + + + + + + Contained_PDU_2_NewSignal_1_f01b38609b89bfd1 + + + + + + + + PDU_NewSignal_919d1d323b8d3e66 + + + + + + + + PDU_NewSignal_1_e27e9644f6929a94 + + + + + + + + 1bit_8e69838eb790ecba + + + + + + + + 2bits_53beac7e22c903e9 + + + + + + + + 3bits_7b7de342bb527d28 + + + + + + + + 2bits2_93b0e56696d50c83 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_ecda364fd486bdae + + + + + + + + SmallSignalsPDUIntel_NewSignal2_faa10c53b929b2d1 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_d98e9fa045cc3300 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_6d9ac3fddce3b391 + + + + + + + + PDU3_NewSignal_67f0539eb88e28e5 + + + + + + + + PDU1_NewSignal_261116abf27383f7 + + + + + + + + PDU2_NewSignal_e26377805822df3e + + + + + + + + PDU2_NewSignal_1_3156a8cc0ee5857c + + + + + + + + PD_NewSignal_7a59e29cadeb1175 + + + + + + + + PDU4_NewSignal_06cfcc0f5d232a54 + + + + + + + + PDU5_NewSignal_b3053ecbdcea867e + + + + + + + + PDU6_NewSignal_daa668cd41aba9d6 + + + + + + + + PDU_Contained_1_Signal1_36c7294dd8da991c + + + + + + + + PDU_Contained_1_Signal2_b29993312dc3cb08 + + + + + + + + PDU_Contained_1_Signal3_6733a61ae3c203d1 + + + + + + + + Contained_PDU_2_NewSignal_617a7cf9c112ce2c + + + + + + + + Contained_PDU_2_NewSignal_1_c56526c20fc2932a + + + + + + + + PDU_NewSignal_100aa989e29ddab6 + + + + + + + + PDU_NewSignal_1_979b20c147338f42 + + + + + + + + 1bit_7b2d6e398b026bc3 + + + + + + + + 2bits_e519442d19bbf87f + + + + + + + + 3bits_00c4bdac38d37447 + + + + + + + + 2bits2_459c17b3544578e5 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_bd00204e983bd27b + + + + + + + + SmallSignalsPDUIntel_NewSignal2_a5a31e0e3b9a9889 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_5c6373fe56ef45e2 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_571b7c42014c4790 + + + + + + + + PDU3_NewSignal_b568caccf3ffd17f + + + + + + + + PDU1_NewSignal_ceb3e0afee9f4e5f + + + + + + + + PDU2_NewSignal_4d18b15595ed520c + + + + + + + + PDU2_NewSignal_1_ae9cc7d0b556f537 + + + + + + + + PD_NewSignal_5227334928051798 + + + + + + + + PDU4_NewSignal_344d6177af4d0d77 + + + + + + + + PDU5_NewSignal_bc4dca2eaeb60c33 + + + + + + + + PDU6_NewSignal_8cc8fb270e140443 + + + + + + + + PDU_Contained_1_Signal1_d2d139f23970fec2 + + + + + + + + PDU_Contained_1_Signal2_fe3cfd97f14981f0 + + + + + + + + PDU_Contained_1_Signal3_755633aeb865ca0a + + + + + + + + Contained_PDU_2_NewSignal_0aa64168266d0aaf + + + + + + + + Contained_PDU_2_NewSignal_1_b27061ca2845ac46 + + + + + + + + PDU_NewSignal_e79134b2911b4b6b + + + + + + + + PDU_NewSignal_1_38b54ed53693055d + + + + + + + + 1bit_0fbb1041bf223b96 + + + + + + + + 2bits_472562e57ce11788 + + + + + + + + 3bits_9ad2d7c336fa75f7 + + + + + + + + 2bits2_64c2fa37fe492f48 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_58687282e80f8464 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_e15eb235fcf126c2 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_18091a62ccee6205 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_fb92242337aef3fa + + + + + + + + PDU3_NewSignal_6adc7015248794b2 + + + + + + + + PDU1_NewSignal_43b4015a69b8db7d + + + + + + + + PDU2_NewSignal_9c5aa399bd755edc + + + + + + + + PDU2_NewSignal_1_142dfd20a74ec6a3 + + + + + + + + PD_NewSignal_b996ad3958a2b665 + + + + + + + + PDU4_NewSignal_fc317393a3de58e2 + + + + + + + + PDU5_NewSignal_df143e1d1dc3b50a + + + + + + + + PDU6_NewSignal_b5802980a41fdc21 + + + + + + + + PDU_Contained_1_Signal1_c54586349338b4dd + + + + + + + + PDU_Contained_1_Signal2_9cb2cc925d911422 + + + + + + + + PDU_Contained_1_Signal3_532acdd78749bf80 + + + + + + + + Contained_PDU_2_NewSignal_53da7229e95328f4 + + + + + + + + Contained_PDU_2_NewSignal_1_83fd0bf10e69390f + + + + + + + + PDU_NewSignal_b4582f32fe77605f + + + + + + + + PDU_NewSignal_1_5dd076efd82e1668 + + + + + + + + 1bit_49cecb71b09c85b1 + + + + + + + + 2bits_3a9060cf78976128 + + + + + + + + 3bits_bc1d0b655e31ac73 + + + + + + + + 2bits2_04d3ee944c36d813 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_649295ad9ed51857 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_454a1eea61128581 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_65d4a888a6eb763c + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_28b09f0713f623da + + + + + + + + PDU3_NewSignal_6d2f820e9c08a4c7 + + + + + + + + PDU1_NewSignal_4fc6f0bf16326bad + + + + + + + + PDU2_NewSignal_a11a63e6fc83e9bd + + + + + + + + PDU2_NewSignal_1_01235f15e6f60909 + + + + + + + + PD_NewSignal_91c02aa07f647ead + + + + + + + + PDU4_NewSignal_2657f29990376a4e + + + + + + + + PDU5_NewSignal_aff001f80f98c5d8 + + + + + + + + PDU6_NewSignal_693cc9acda485f44 + + + + + + + + PDU_Contained_1_Signal1_62e6d1706c34d5f1 + + + + + + + + PDU_Contained_1_Signal2_49885bf49c43fd8b + + + + + + + + PDU_Contained_1_Signal3_fa895ca4510ec5a4 + + + + + + + + Contained_PDU_2_NewSignal_b03e19bf2672f2da + + + + + + + + Contained_PDU_2_NewSignal_1_a9cd5d44ccda1a14 + + + + + + + + PDU_NewSignal_2f2de581c02eba91 + + + + + + + + PDU_NewSignal_1_cd914a9110e5a778 + + + + + + + + 1bit_f441f085750bf263 + + + + + + + + 2bits_858942c7a0dcb349 + + + + + + + + 3bits_ad98cf3022413400 + + + + + + + + 2bits2_5eed5241afec6ff8 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_a5bd94713d4ac1f1 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_0815c37c6452f447 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_c5989dd9642dc74b + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_c87383c3a06bdfa5 + + + + + + + + PDU3_NewSignal_fb28d477ddfecd50 + + + + + + + + PDU1_NewSignal_ad2ad3d4c5ee7448 + + + + + + + + PDU2_NewSignal_489f5302ed95e82f + + + + + + + + PDU2_NewSignal_1_a71d87f35d41e75c + + + + + + + + PD_NewSignal_abd97840bd41023d + + + + + + + + PDU4_NewSignal_e024b7cf5e351c4b + + + + + + + + PDU5_NewSignal_74371d55895093e8 + + + + + + + + PDU6_NewSignal_84be80bd90a2eea8 + + + + + + + + PDU_Contained_1_Signal1_a53aede7b63a247e + + + + + + + + PDU_Contained_1_Signal2_507e5bf80d867eb8 + + + + + + + + PDU_Contained_1_Signal3_427162af02ccf69a + + + + + + + + Contained_PDU_2_NewSignal_5bdaeb28c7ec8155 + + + + + + + + Contained_PDU_2_NewSignal_1_5a898a6f538e6f6b + + + + + + + + PDU_NewSignal_3d7f2945e6647bc0 + + + + + + + + PDU_NewSignal_1_6c3a6d1aa4da152b + + + + + + + + 1bit_fa8112d4f81b8583 + + + + + + + + 2bits_70545ced246f0eb9 + + + + + + + + 3bits_ebb3b913be8f995a + + + + + + + + 2bits2_4c4983e4eee73e2b + + + + + + + + SmallSignalsPDUIntel_NewSignal1_ed3bbc8a79488bc8 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_a02642c58b3a4a77 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_e2009c5dc769e48d + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_276bdb2e8a8c9e2d + + + + + + + + PDU3_NewSignal_9b22fe4c0c8e31f2 + + + + + + + + PDU1_NewSignal_80a517b632676f3c + + + + + + + + PDU2_NewSignal_c010bd0f149ab1a9 + + + + + + + + PDU2_NewSignal_1_1c9b404fe4c47ca4 + + + + + + + + PD_NewSignal_86479b408b42ddea + + + + + + + + PDU4_NewSignal_190d4b2f87d9098f + + + + + + + + PDU5_NewSignal_1aa738fe77b4ae9d + + + + + + + + PDU6_NewSignal_f07b068fef21236d + + + + + + + + PDU_Contained_1_Signal1_70897e6c8653d132 + + + + + + + + PDU_Contained_1_Signal2_2a496b9d6d8189b5 + + + + + + + + PDU_Contained_1_Signal3_2183519386270458 + + + + + + + + Contained_PDU_2_NewSignal_570b6cb1cb4f9d1c + + + + + + + + Contained_PDU_2_NewSignal_1_8a3d0f5bb8e92133 + + + + + + + + PDU_NewSignal_ff5df50f86ae3917 + + + + + + + + PDU_NewSignal_1_014cbe38867906e8 + + + + + + + + 1bit_82ec8ad986f661d5 + + + + + + + + 2bits_3c7bbe0925f3a7ad + + + + + + + + 3bits_ff14d2cfb3462e12 + + + + + + + + 2bits2_106656ee9b456e29 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_d8e24fc5cfaa43e9 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_b6673c7271f3c87e + + + + + + + + SmallSignalsPDUIntel_NewSignal3_fe7095c789e4fc03 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_0788939294cd1509 + + + + + + + + PDU3_NewSignal_3e9d793bbe468e9a + + + + + + + + PDU1_NewSignal_e0064e5d0812d398 + + + + + + + + PDU2_NewSignal_cf2f65e23ab7a225 + + + + + + + + PDU2_NewSignal_1_92a233e181645e77 + + + + + + + + PD_NewSignal_a5ac2fe6fba384b9 + + + + + + + + PDU4_NewSignal_8c7f5e1d4789b71b + + + + + + + + PDU5_NewSignal_74bf5b72d740be81 + + + + + + + + PDU6_NewSignal_799190292c2721c2 + + + + + + + + PDU_Contained_1_Signal1_e8d55364cb41004a + + + + + + + + PDU_Contained_1_Signal2_bb34f418b6fe6ee7 + + + + + + + + PDU_Contained_1_Signal3_63e0f90d8822bad5 + + + + + + + + Contained_PDU_2_NewSignal_33428b07e6e60471 + + + + + + + + Contained_PDU_2_NewSignal_1_ead3bdc66177c966 + + + + + + + + PDU_NewSignal_415ed4cbb0fa8cd4 + + + + + + + + PDU_NewSignal_1_6e5595d007555be2 + + + + + + + + 1bit_34f50b049ac6b001 + + + + + + + + 2bits_d4af203d29c9a276 + + + + + + + + 3bits_def09d2afdefeecc + + + + + + + + 2bits2_f4c1e0dc03d6f555 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_a2698368c06d675e + + + + + + + + SmallSignalsPDUIntel_NewSignal2_fbb8100e8fd6219b + + + + + + + + SmallSignalsPDUIntel_NewSignal3_c17fd07602d7ccc2 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_62a4269d1935893d + + + + + + + + PDU3_NewSignal_89a0db0e73301ee8 + + + + + + + + PDU1_NewSignal_2282589ced91e84d + + + + + + + + PDU2_NewSignal_4821e5cb3486d2d7 + + + + + + + + PDU2_NewSignal_1_2a9bd94fa971ada3 + + + + + + + + PD_NewSignal_e67f8fd540567844 + + + + + + + + PDU4_NewSignal_b56416d9ec08bcad + + + + + + + + PDU5_NewSignal_0d8b834b9f404dc7 + + + + + + + + PDU6_NewSignal_9304ede4fa1b65f8 + + + + + + + + PDU_Contained_1_Signal1_fb279558247e5aa7 + + + + + + + + PDU_Contained_1_Signal2_89d2b07eed0c03aa + + + + + + + + PDU_Contained_1_Signal3_f5674e7fe32548e2 + + + + + + + + Contained_PDU_2_NewSignal_b20bf5780b432722 + + + + + + + + Contained_PDU_2_NewSignal_1_48cc0c78c76e05fa + + + + + + + + PDU_NewSignal_c26d3d6f8e54b4f6 + + + + + + + + PDU_NewSignal_1_78f9a2f08bcd246d + + + + + + + + 1bit_53e2ac1ee5a84ca1 + + + + + + + + 2bits_6499a83b21894f65 + + + + + + + + 3bits_11ca0c1edc4837c3 + + + + + + + + 2bits2_48ea3dcf2cf40d1d + + + + + + + + SmallSignalsPDUIntel_NewSignal1_596d792dff48d963 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_61dd673ac90be77b + + + + + + + + SmallSignalsPDUIntel_NewSignal3_feccb5c332a50360 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_2739d01644171d50 + + + + + + + + PDU3_NewSignal_5653860c158b6727 + + + + + + + + PDU1_NewSignal_bacb44ccdc25545b + + + + + + + + PDU2_NewSignal_8067c71adc3ddd35 + + + + + + + + PDU2_NewSignal_1_87d1777d1d24fce5 + + + + + + + + PD_NewSignal_f895a073b891bd12 + + + + + + + + PDU4_NewSignal_e2e7a9245aabd9e3 + + + + + + + + PDU5_NewSignal_5be35f83adca3091 + + + + + + + + PDU6_NewSignal_6e4b3fb7a47b0bd9 + + + + + + + + PDU_Contained_1_Signal1_75687e40a421e596 + + + + + + + + PDU_Contained_1_Signal2_6e57cd47a98ec6cc + + + + + + + + PDU_Contained_1_Signal3_a13cedacf801d6a3 + + + + + + + + Contained_PDU_2_NewSignal_07db7e101459293d + + + + + + + + Contained_PDU_2_NewSignal_1_080cb5dc1b8d10ff + + + + + + + + PDU_NewSignal_0c6c0f2093d3772f + + + + + + + + PDU_NewSignal_1_a3bf4a527b909df9 + + + + + + + + 1bit_5c6b34bdd5c9c579 + + + + + + + + 2bits_ad181588ff5f922e + + + + + + + + 3bits_e84dff2149582138 + + + + + + + + 2bits2_c1cf3a50e955e4f5 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_2497145c67b5a18c + + + + + + + + SmallSignalsPDUIntel_NewSignal2_aa365662662a869d + + + + + + + + SmallSignalsPDUIntel_NewSignal3_3735c780fcbebeec + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_77c259463fbabe8f + + + + + + + + PDU3_NewSignal_cf4f70b7be98da42 + + + + + + + + PDU1_NewSignal_1778f99504b07b08 + + + + + + + + PDU2_NewSignal_2a47242dcf62871e + + + + + + + + PDU2_NewSignal_1_b540fb10d06f33af + + + + + + + + PD_NewSignal_7dca7b1d09d36c12 + + + + + + + + PDU4_NewSignal_dde6411cb37560ce + + + + + + + + PDU5_NewSignal_8efed9540d1a8f53 + + + + + + + + PDU6_NewSignal_c87d891bab3846e0 + + + + + + + + PDU_Contained_1_Signal1_c8f7ab4fbc810f20 + + + + + + + + PDU_Contained_1_Signal2_adae3ff0f73aabee + + + + + + + + PDU_Contained_1_Signal3_6707ebd44bdb36f3 + + + + + + + + Contained_PDU_2_NewSignal_1ad982a90066015d + + + + + + + + Contained_PDU_2_NewSignal_1_dd0c6c9368b36a08 + + + + + + + + PDU_NewSignal_ba851618687eb034 + + + + + + + + PDU_NewSignal_1_4ffc1af93e2978c1 + + + + + + + + 1bit_e4aa868d84847fed + + + + + + + + 2bits_0fa8d48ea56bb34b + + + + + + + + 3bits_d861940fb5ce0228 + + + + + + + + 2bits2_4834279c04dd0386 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_ef44f311d6b056b8 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_fc28c5fb98b4e6c9 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_1110848c4c2046b7 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_7a00b75ed2d0253a + + + + + + + + PDU3_NewSignal_db8d41b515db0319 + + + + + + + + PDU1_NewSignal_1acf15763b0bdc41 + + + + + + + + PDU2_NewSignal_c00840a151476c29 + + + + + + + + PDU2_NewSignal_1_432e230e92cf55d7 + + + + + + + + PD_NewSignal_f581cfe0fc4e7114 + + + + + + + + PDU4_NewSignal_609bdb772ef98557 + + + + + + + + PDU5_NewSignal_413e7f66864f5a12 + + + + + + + + PDU6_NewSignal_d1b0a3eb5bc18ea9 + + + + + + + + PDU_Contained_1_Signal1_6b31dab88911f066 + + + + + + + + PDU_Contained_1_Signal2_64f60bbd26471e4c + + + + + + + + PDU_Contained_1_Signal3_ecf41c4aa8c40f95 + + + + + + + + Contained_PDU_2_NewSignal_772a2ab6ba25499f + + + + + + + + Contained_PDU_2_NewSignal_1_66eda78c4a168e7b + + + + + + + + PDU_NewSignal_5d88e757fdfb5efe + + + + + + + + PDU_NewSignal_1_d80c5b0472ec50c0 + + + + + + + + 1bit_5bce133299515ff0 + + + + + + + + 2bits_28797904b7ee713d + + + + + + + + 3bits_55329e8485dd45aa + + + + + + + + 2bits2_8a4f9a207015b04c + + + + + + + + SmallSignalsPDUIntel_NewSignal1_724411ecac4284f3 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_eb76548324280ff1 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_78abff9de5d8bc8f + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_c47635f5cac90c30 + + + + + + + + PDU3_NewSignal_b4b102299289c580 + + + + + + + + PDU1_NewSignal_cf4af7441177c1a7 + + + + + + + + PDU2_NewSignal_4a848b4ec7b579cd + + + + + + + + PDU2_NewSignal_1_4d1bcc0e47a7a196 + + + + + + + + PD_NewSignal_aafc46a389c02eba + + + + + + + + PDU4_NewSignal_e073f786c933908f + + + + + + + + PDU5_NewSignal_cfd7f05e1d2e35eb + + + + + + + + PDU6_NewSignal_6307da95c10fa418 + + + + + + + + PDU_Contained_1_Signal1_635304fd2add886b + + + + + + + + PDU_Contained_1_Signal2_2c81655f9acd2359 + + + + + + + + PDU_Contained_1_Signal3_606f0946ea9d3bfb + + + + + + + + Contained_PDU_2_NewSignal_68c391115fbc64fa + + + + + + + + Contained_PDU_2_NewSignal_1_419dc1dd05f1cd0a + + + + + + + + PDU_NewSignal_a61016b06945dcb6 + + + + + + + + PDU_NewSignal_1_b35d706fba58eb6a + + + + + + + + 1bit_0086075acca97d2c + + + + + + + + 2bits_e95251e685a89538 + + + + + + + + 3bits_21a93161dd9a2413 + + + + + + + + 2bits2_5be62607e564c035 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_708ad5aba23ae77d + + + + + + + + SmallSignalsPDUIntel_NewSignal2_c8b8f5edcaee4852 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_eb27c2b666a3846f + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_60835745e825e13a + + + + + + + + PDU3_NewSignal_6a6b24f4fbcd4d3b + + + + + + + + PDU1_NewSignal_57f5675cfba9a6cb + + + + + + + + PDU2_NewSignal_0e152fcc509e66a7 + + + + + + + + PDU2_NewSignal_1_9e0a7de8b0861781 + + + + + + + + PD_NewSignal_03bab04af6cb1696 + + + + + + + + PDU4_NewSignal_d298107a12a448f0 + + + + + + + + PDU5_NewSignal_4463f1befba797c6 + + + + + + + + PDU6_NewSignal_6e882693b4c2cd2c + + + + + + + + PDU_Contained_1_Signal1_267f74f65d507a36 + + + + + + + + PDU_Contained_1_Signal2_877906f0949880d5 + + + + + + + + PDU_Contained_1_Signal3_6b6afd3538716a4b + + + + + + + + Contained_PDU_2_NewSignal_bba49c8fad8b1938 + + + + + + + + Contained_PDU_2_NewSignal_1_f068e39b0fa28ce6 + + + + + + + + PDU_NewSignal_280af7317a081f27 + + + + + + + + PDU_NewSignal_1_5986d5a411cebac3 + + + + + + + + 1bit_c35f502627df5b27 + + + + + + + + 2bits_33a436ad1798475d + + + + + + + + 3bits_77fd131f0c4d0954 + + + + + + + + 2bits2_a18f32e3cd5d3ebb + + + + + + + + SmallSignalsPDUIntel_NewSignal1_79765e786aa1f15b + + + + + + + + SmallSignalsPDUIntel_NewSignal2_c78d9dc6ca03d224 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_7390d5252f30ee89 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_0695c678f93c01e0 + + + + + + + + PDU3_NewSignal_af9d5590f6d31e9b + + + + + + + + PDU1_NewSignal_91d34272eebc44ed + + + + + + + + PDU2_NewSignal_0d8092de66f63488 + + + + + + + + PDU2_NewSignal_1_fced249da38a1faa + + + + + + + + PD_NewSignal_42a5df88dbce5b4e + + + + + + + + PDU4_NewSignal_897fccc48e8ed633 + + + + + + + + PDU5_NewSignal_6e51ac6bb3aa5a37 + + + + + + + + PDU6_NewSignal_44b5105a8d551903 + + + + + + + + PDU_Contained_1_Signal1_98a53cf825cce349 + + + + + + + + PDU_Contained_1_Signal2_aee07074700711f5 + + + + + + + + PDU_Contained_1_Signal3_2d6d3cbabaa403c2 + + + + + + + + Contained_PDU_2_NewSignal_103cba3fcd650212 + + + + + + + + Contained_PDU_2_NewSignal_1_7e16241bc2e82631 + + + + + + + + PDU_NewSignal_d344308a89c5329c + + + + + + + + PDU_NewSignal_1_65cd5a43ad3617db + + + + + + + + 1bit_dc2f234919ebf6ec + + + + + + + + 2bits_24197f2495610ee1 + + + + + + + + 3bits_8fbf5c3f480423b4 + + + + + + + + 2bits2_f41937a96b261b2b + + + + + + + + SmallSignalsPDUIntel_NewSignal1_02725c13d80c41e9 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_206dbb3c0afc3121 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_392e7dead296b46c + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_f3a515c17313b82e + + + + + + + + PDU3_NewSignal_27166d579b4efcd8 + + + + + + + + PDU1_NewSignal_6db82d14ea22c3a1 + + + + + + + + PDU2_NewSignal_8d8cafa86bd68743 + + + + + + + + PDU2_NewSignal_1_7f38bd21ff9acfb5 + + + + + + + + PD_NewSignal_c54b4e53016a3f3d + + + + + + + + PDU4_NewSignal_ca648aaf6e131bad + + + + + + + + PDU5_NewSignal_2fe06662b3c99bab + + + + + + + + PDU6_NewSignal_e00fd3b2cf2f8011 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_0952869bdcd9ca37 + + + + + + + + PDU_Contained_1_Signal1_c1094bb879bec42a + + + + + + + + PDU_Contained_1_Signal2_896c8fd2aba19adf + + + + + + + + PDU_Contained_1_Signal3_de3d4c662dfe5cca + + + + + + + + Contained_PDU_2_NewSignal_0e52529ad15cdb6a + + + + + + + + Contained_PDU_2_NewSignal_1_edc09960d8aaf6aa + + + + + + + + PDU_NewSignal_06553781c254a68c + + + + + + + + PDU_NewSignal_1_c9867ceca7aa8dec + + + + + + + + 1bit_b41801f011ae3e30 + + + + + + + + 2bits_d46066a828c54a7c + + + + + + + + 3bits_aa8691c2a1edd3d9 + + + + + + + + 2bits2_e2855bcdfc3c84f4 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_fd7799f744217db8 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_00e57b518fc1c4e0 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_91db882315c31004 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_16aaaa31c5dea9fd + + + + + + + + PDU3_NewSignal_cce4a88bb19076e7 + + + + + + + + PDU1_NewSignal_e97ef9348b1001f8 + + + + + + + + PDU2_NewSignal_9164e005e5ee9ad5 + + + + + + + + PDU2_NewSignal_1_c1dc6a04dd1d7a8c + + + + + + + + PD_NewSignal_338f59002ee5cd0f + + + + + + + + PDU4_NewSignal_9b7e55f6ccfaa7a1 + + + + + + + + PDU5_NewSignal_a54941ca3491500b + + + + + + + + PDU6_NewSignal_d4018615272101e0 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_f7517a84f6c511a6 + + + + + + + + PDU_Contained_1_Signal1_acbff4deae2d01be + + + + + + + + PDU_Contained_1_Signal2_5b7a322f351c2b1e + + + + + + + + PDU_Contained_1_Signal3_a77b44dfa2107713 + + + + + + + + Contained_PDU_2_NewSignal_fb44653a20f554da + + + + + + + + Contained_PDU_2_NewSignal_1_7c62caa0f35318dc + + + + + + + + PDU_NewSignal_bfee1abfbd9a6105 + + + + + + + + PDU_NewSignal_1_73485eec37f5fadc + + + + + + + + 1bit_51e4e1219eecec42 + + + + + + + + 2bits_c1b3231808df1f41 + + + + + + + + 3bits_8cb84d9e01833f8c + + + + + + + + 2bits2_534b770d76031728 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_a544f75e8478b03d + + + + + + + + SmallSignalsPDUIntel_NewSignal2_ff90314631bf5c56 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_9be304f732ee4d51 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_2a3dee3ed19b212a + + + + + + + + PDU3_NewSignal_19222e35c3ab5602 + + + + + + + + PDU1_NewSignal_7d7efee1597c1c52 + + + + + + + + PDU2_NewSignal_df41afbebe086dfb + + + + + + + + PDU2_NewSignal_1_7b17bcc0b28538fc + + + + + + + + PD_NewSignal_f23209ff228983f0 + + + + + + + + PDU4_NewSignal_3e17cd5f139ec85c + + + + + + + + PDU5_NewSignal_b372b99766cc1a56 + + + + + + + + PDU6_NewSignal_e9ab5c0afd978b19 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_fcd583a758543f70 + + + + + + + + PDU_Contained_1_Signal1_017471846d38c03a + + + + + + + + PDU_Contained_1_Signal2_7be6968bbb62c0d4 + + + + + + + + PDU_Contained_1_Signal3_d7435ad49071c553 + + + + + + + + Contained_PDU_2_NewSignal_f6084f38c50de47e + + + + + + + + Contained_PDU_2_NewSignal_1_60b3ff4280b25948 + + + + + + + + PDU_NewSignal_3b0575e50b89bbfb + + + + + + + + PDU_NewSignal_1_947aca428cf89b88 + + + + + + + + 1bit_4c67698e66f04545 + + + + + + + + 2bits_7a69d1ad2c03278c + + + + + + + + 3bits_77b5044612ac22c1 + + + + + + + + 2bits2_bff2ae9cde80d21e + + + + + + + + SmallSignalsPDUIntel_NewSignal1_b73093ee263fb65a + + + + + + + + SmallSignalsPDUIntel_NewSignal2_73a78afb5e0ccb36 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_82f30afad3430f1d + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_b0b57d39401ef1a5 + + + + + + + + PDU3_NewSignal_af2da4b89b4b0921 + + + + + + + + PDU1_NewSignal_36f9b7b852926f60 + + + + + + + + PDU2_NewSignal_4a9a5487b53dc5b8 + + + + + + + + PDU2_NewSignal_1_b99a0cae0270e43e + + + + + + + + PD_NewSignal_821c9e76483563f0 + + + + + + + + PDU4_NewSignal_7bc6ce78967a9bfc + + + + + + + + PDU5_NewSignal_9626a006af67a04b + + + + + + + + PDU6_NewSignal_0ab4be14b81f4d3b + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_4cd061e3413bacae + + + + + + + + PDU_Contained_1_Signal1_b504a0d188c6606d + + + + + + + + PDU_Contained_1_Signal2_6352b21e9c8012ff + + + + + + + + PDU_Contained_1_Signal3_a4fb574b74f62b4f + + + + + + + + Contained_PDU_2_NewSignal_67df08dd1f2ccff1 + + + + + + + + Contained_PDU_2_NewSignal_1_00104c9e24385470 + + + + + + + + PDU_NewSignal_b6f132d06cbd3078 + + + + + + + + PDU_NewSignal_1_108f589a0b584e73 + + + + + + + + 1bit_48d9cfbb739d5ce9 + + + + + + + + 2bits_77c3e5fbbc8789bb + + + + + + + + 3bits_6303ba315c4a14f1 + + + + + + + + 2bits2_42cd8ffba3b36153 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_9d4379d45276fdf4 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_a3cb4350e1023b9e + + + + + + + + SmallSignalsPDUIntel_NewSignal3_b5fcf59525494d38 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_0fe6cb8093f5d898 + + + + + + + + PDU3_NewSignal_f71f7aa93610ff68 + + + + + + + + PDU1_NewSignal_777fce8bb37d3744 + + + + + + + + PDU2_NewSignal_cf9c2c86aaf85f26 + + + + + + + + PDU2_NewSignal_1_0c5d7a02e8922f52 + + + + + + + + PD_NewSignal_7f30153143e42d87 + + + + + + + + PDU4_NewSignal_49a3975370611d00 + + + + + + + + PDU5_NewSignal_9c6361858de9fc6c + + + + + + + + PDU6_NewSignal_c1d8655d108dd401 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_b305430dac022dec + + + + + + + + PDU_Contained_1_Signal1_cf5e442c3ee16db7 + + + + + + + + PDU_Contained_1_Signal2_7bc0b00e9800e0a9 + + + + + + + + PDU_Contained_1_Signal3_7f691443abf5c1d5 + + + + + + + + Contained_PDU_2_NewSignal_8479e47f67570808 + + + + + + + + Contained_PDU_2_NewSignal_1_9171c11def3fdbff + + + + + + + + PDU_NewSignal_150aac2139034fac + + + + + + + + PDU_NewSignal_1_df935bda526bf64c + + + + + + + + 1bit_18e785c94ee1efe3 + + + + + + + + 2bits_3bda9b4e51ace677 + + + + + + + + 3bits_e71eae60d296b539 + + + + + + + + 2bits2_990a02a732e4ed6a + + + + + + + + SmallSignalsPDUIntel_NewSignal1_6c36db68e0a7f835 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_223b35d8d47cbb96 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_cd438ae5aff528a9 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_7112e29d98bf148d + + + + + + + + PDU3_NewSignal_66c626af0cb4a7f4 + + + + + + + + PDU1_NewSignal_5a5dba63196c517f + + + + + + + + PDU2_NewSignal_38be3a2a97ea1159 + + + + + + + + PDU2_NewSignal_1_912912a25b62a0bf + + + + + + + + PD_NewSignal_5b000ebfcb222501 + + + + + + + + PDU4_NewSignal_673a317de6c2f8aa + + + + + + + + PDU5_NewSignal_55cb0bbf214037b3 + + + + + + + + PDU6_NewSignal_dd10d0d5b9cf5598 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_896f84cbc066b1e6 + + + + + + + + PDU_Contained_1_Signal1_f06866add9d0a749 + + + + + + + + PDU_Contained_1_Signal2_d1ee124464d6b4cb + + + + + + + + PDU_Contained_1_Signal3_c8ba0dbc07015a53 + + + + + + + + Contained_PDU_2_NewSignal_7a4ff4eec4db761a + + + + + + + + Contained_PDU_2_NewSignal_1_aa83b5b47e033457 + + + + + + + + PDU_NewSignal_010c6b5aeebe126f + + + + + + + + PDU_NewSignal_1_da97ff381cddc681 + + + + + + + + 1bit_95e52ffe1e99092d + + + + + + + + 2bits_22963ba2f88f18bb + + + + + + + + 3bits_f6ebad567e8027a3 + + + + + + + + 2bits2_ed0d28a809e4eeba + + + + + + + + SmallSignalsPDUIntel_NewSignal1_a3443fbc8c44d930 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_1f6dcaf7c9196865 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_3e16f9ba25e948e8 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_1c97538dc490b2a1 + + + + + + + + PDU3_NewSignal_5a2d42f5a4f9f2f5 + + + + + + + + PDU1_NewSignal_8e29158c82f2740c + + + + + + + + PDU2_NewSignal_4ab7a523acefef2f + + + + + + + + PDU2_NewSignal_1_8f51f1d0b7e68ef9 + + + + + + + + PD_NewSignal_d895471656676ebb + + + + + + + + PDU4_NewSignal_f753f0f8914b70f0 + + + + + + + + PDU5_NewSignal_5bcfcb6571c8b5d2 + + + + + + + + PDU6_NewSignal_754830e9d4544d03 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_4716ae88fca3eac2 + + + + + + + + PDU_Contained_1_Signal1_7453395c0e088f1b + + + + + + + + PDU_Contained_1_Signal2_691023848081a9ef + + + + + + + + PDU_Contained_1_Signal3_1a56512b17bad263 + + + + + + + + Contained_PDU_2_NewSignal_2177231add9e02f8 + + + + + + + + Contained_PDU_2_NewSignal_1_a59b6823116b8902 + + + + + + + + PDU_NewSignal_e6c9bc566ff330ca + + + + + + + + PDU_NewSignal_1_8de6dc0e695583ca + + + + + + + + 1bit_53af30ad13f15fdb + + + + + + + + 2bits_99b4259b97118b6d + + + + + + + + 3bits_866c61a97b4bcdba + + + + + + + + 2bits2_98efbb522c7f3580 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_b47648ed48d89499 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_e3223b28625625a2 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_c510a6a7a6c400f3 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_1ff1e3ffff18103e + + + + + + + + PDU3_NewSignal_42522d14398d023c + + + + + + + + PDU1_NewSignal_a1c47ab658fd283b + + + + + + + + PDU2_NewSignal_f60ea8941a5da02d + + + + + + + + PDU2_NewSignal_1_8d8566a0a895c3ed + + + + + + + + PD_NewSignal_3fa03f0f942deb39 + + + + + + + + PDU4_NewSignal_c17266d461de265f + + + + + + + + PDU5_NewSignal_cbe46e1f9effb6b2 + + + + + + + + PDU6_NewSignal_7b81ccc3d7c1511d + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_a500b1246bea0876 + + + + + + + + PDU_Contained_1_Signal1_111b99c0ac1cff7a + + + + + + + + PDU_Contained_1_Signal2_bf9bd1716a4a1639 + + + + + + + + PDU_Contained_1_Signal3_4594ce29e6e148a8 + + + + + + + + Contained_PDU_2_NewSignal_00a9a5dd5d152976 + + + + + + + + Contained_PDU_2_NewSignal_1_7aa1ac9729a14d46 + + + + + + + + PDU_NewSignal_0c1d5ea820de66cb + + + + + + + + PDU_NewSignal_1_fb4209c597cd8aa0 + + + + + + + + 1bit_f466e19eb1de0648 + + + + + + + + 2bits_6c9b683c1c1a37b4 + + + + + + + + 3bits_cf9655c40c96657a + + + + + + + + 2bits2_19752e7dfa28e7f3 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_803b2f713cf1efa7 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_9cea8032e065a1d0 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_7c27b528473e33ed + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_5195175eec94c686 + + + + + + + + PDU3_NewSignal_4316eeb2271ecdd2 + + + + + + + + PDU1_NewSignal_53f4fb1e072fe0a4 + + + + + + + + PDU2_NewSignal_54deba0a44f9c3c1 + + + + + + + + PDU2_NewSignal_1_641b9b208c5e7caa + + + + + + + + PD_NewSignal_677570877e354f8a + + + + + + + + PDU4_NewSignal_e1232d5ab699545a + + + + + + + + PDU5_NewSignal_9a380380b07386a3 + + + + + + + + PDU6_NewSignal_414239b83f4903a3 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_5ea61637efb587ff + + + + + + + + PDU_Contained_1_Signal1_25121d247773d09b + + + + + + + + PDU_Contained_1_Signal2_24e6da4b34a597fe + + + + + + + + PDU_Contained_1_Signal3_6cd19cf61483be42 + + + + + + + + Contained_PDU_2_NewSignal_14390215f4654c25 + + + + + + + + Contained_PDU_2_NewSignal_1_b4668b9a7410d643 + + + + + + + + PDU_NewSignal_898e52ae244864c1 + + + + + + + + PDU_NewSignal_1_2c25f9e5b2f73f4b + + + + + + + + 1bit_9ba90e9cfee10749 + + + + + + + + 2bits_b9278e38fecc716d + + + + + + + + 3bits_9d5343732d692f47 + + + + + + + + 2bits2_ff699bd5a253fc00 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_257c1fb94ef99b5b + + + + + + + + SmallSignalsPDUIntel_NewSignal2_21e8305b5cc887b1 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_ef3c253ca651a5c0 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_913ad7a5560389c9 + + + + + + + + PDU3_NewSignal_9957ee9f1b3735e6 + + + + + + + + PDU1_NewSignal_c0beebf0ab78b5b7 + + + + + + + + PDU2_NewSignal_59fac2352a3f4f9b + + + + + + + + PDU2_NewSignal_1_29e8e2bcc812e0a3 + + + + + + + + PD_NewSignal_ded23f9d538cdb92 + + + + + + + + PDU4_NewSignal_0f055c25b6f01b14 + + + + + + + + PDU5_NewSignal_6614e83ce430c610 + + + + + + + + PDU6_NewSignal_2ad9344530cf8d59 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_e20c23b7791091a5 + + + + + + + + PDU_Contained_1_Signal1_c0fbe7e68939de02 + + + + + + + + PDU_Contained_1_Signal2_59298d8e9cd72956 + + + + + + + + PDU_Contained_1_Signal3_fd142dfb5b90f193 + + + + + + + + Contained_PDU_2_NewSignal_f5cae94f03b5967d + + + + + + + + Contained_PDU_2_NewSignal_1_e261507906a7a2c9 + + + + + + + + PDU_NewSignal_f57dda012e192e6b + + + + + + + + PDU_NewSignal_1_e1e54fe3fb08afc8 + + + + + + + + 1bit_ef9bd7f0354a5fb7 + + + + + + + + 2bits_4350993d15543425 + + + + + + + + 3bits_3d36d908398a3271 + + + + + + + + 2bits2_2bdefa864e4335f5 + + + + + + + + SmallSignalsPDUIntel_NewSignal1_1965430b54445e80 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_f2f194bd454f056b + + + + + + + + SmallSignalsPDUIntel_NewSignal3_e448857099961307 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_1400f2b6d41e9a04 + + + + + + + + PDU3_NewSignal_77e4b96fd9994926 + + + + + + + + PDU1_NewSignal_142fc7df52c800b5 + + + + + + + + PDU2_NewSignal_28ac356adf5f7270 + + + + + + + + PDU2_NewSignal_1_77f1c46bba92bf0f + + + + + + + + PD_NewSignal_c82901ded6104a53 + + + + + + + + PDU4_NewSignal_882143fd1a13f5ac + + + + + + + + PDU5_NewSignal_a602b73fc1350fec + + + + + + + + PDU6_NewSignal_732e6c0194fd1ca2 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_08a512781c519d0e + + + + + + + + PDU_Contained_1_Signal1_a2b512826d63d9fa + + + + + + + + PDU_Contained_1_Signal2_e54d9ad78eeb344c + + + + + + + + PDU_Contained_1_Signal3_7ae7ad453da21232 + + + + + + + + Contained_PDU_2_NewSignal_6949b8831f167350 + + + + + + + + Contained_PDU_2_NewSignal_1_246c8addf2e9da20 + + + + + + + + PDU_NewSignal_ebca4ee61af5a96f + + + + + + + + PDU_NewSignal_1_e38ac411427587e5 + + + + + + + + 1bit_810d12a32f9ac4e9 + + + + + + + + 2bits_a366e45cd4cf5c27 + + + + + + + + 3bits_5877c320d06e2171 + + + + + + + + 2bits2_8ac66ec76c02048d + + + + + + + + SmallSignalsPDUIntel_NewSignal1_2a3bbfe7ce7d162a + + + + + + + + SmallSignalsPDUIntel_NewSignal2_0239bdba32e4f848 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_3bffb11cc7ba1a75 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_10c7774dc8ba1504 + + + + + + + + PDU3_NewSignal_6d3d05d7162d435c + + + + + + + + PDU1_NewSignal_784e8897ba46dacb + + + + + + + + PDU2_NewSignal_b4b573f890ab2a39 + + + + + + + + PDU2_NewSignal_1_6129a4895fa0207a + + + + + + + + PD_NewSignal_3eaed1302ded94df + + + + + + + + PDU4_NewSignal_e81a5492a65fd3b2 + + + + + + + + PDU5_NewSignal_e48dca134bc2a6ef + + + + + + + + PDU6_NewSignal_be03f78f75752384 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_ba500dd6bc35e5e2 + + + + + + + + PDU_Contained_1_Signal1_905db81da40081cb + + + + + + + + PDU_Contained_1_Signal2_560dca45b917ac81 + + + + + + + + PDU_Contained_1_Signal3_c2518f7b986c2257 + + + + + + + + Contained_PDU_2_NewSignal_4521aa60e6ed341c + + + + + + + + Contained_PDU_2_NewSignal_1_7013bc93a91870d1 + + + + + + + + PDU_NewSignal_adf0210fbe6c5cec + + + + + + + + PDU_NewSignal_1_a340d33220b108d5 + + + + + + + + 1bit_6e81c7874a94126b + + + + + + + + 2bits_648803615523b604 + + + + + + + + 3bits_9c83fdb894ed05bf + + + + + + + + 2bits2_0ed8412ba478bbdc + + + + + + + + SmallSignalsPDUIntel_NewSignal1_7ca0913a74a189fa + + + + + + + + SmallSignalsPDUIntel_NewSignal2_efd2350a025ed292 + + + + + + + + SmallSignalsPDUIntel_NewSignal3_3864388f1c22f038 + + + + + + + + SmallSignalsPDUIntel_NewSignal2_2_7976cc7aa716cfde + + + + + + + + PDU3_NewSignal_663edd1f1125ded2 + + + + + + + + PDU1_NewSignal_a4ef752e6cbdffff + + + + + + + + PDU2_NewSignal_b45992d48685ea1e + + + + + + + + PDU2_NewSignal_1_da3a4ef278f76687 + + + + + + + + PD_NewSignal_925527ee06ca0d25 + + + + + + + + PDU4_NewSignal_74daf6dbae331632 + + + + + + + + PDU5_NewSignal_6a23afcdd65a64d4 + + + + + + + + PDU6_NewSignal_525b3b193f364475 + + + + + + + + SmallSignalsContainer_NewPDU_NewSignal_3f03f2fd574a4fce + + + + + + + + + + PDU_GROUP + + + PduGroup_042e32d1ba96422cac04f714a225afa0_Rx + IN + + + PduGroup_4f54045b527c4277ba0338f739b9e734_Rx + IN + + + PduGroup_af6bae122781459fb0c1ca5e3415c717_Tx + OUT + + + PduGroup_3895d9be6f3c4329b8557b370c2f3fe5_Rx + IN + + + PduGroup_b357a8c9d9ac4e3290f3729d6b073edf_Tx + OUT + + + PduGroup_0b47d3658d2b468abfa9b314d83eb7d5_Rx + IN + + + PduGroup_2f70bf870a05458f8c661f841601475c_Tx + OUT + + + PduGroup_3bf76826a25947baa9035020462995ab_Rx + IN + + + PduGroup_96b93623d04d432691eb5168eba07ecc_Tx + OUT + + + PduGroup_20500f7ee12f4a26ab5d751c9d8f3c69_Tx + OUT + + + PduGroup_80f3d23d6e0346b4966a9559789a57a5_Rx + IN + + + PduGroup_ff48df5186db45b8aa93ff9ca4c69c07_Tx + OUT + + + PduGroup_5ea18f33ff444996983705192dd2276b_Rx + IN + + + PduGroup_1510f271a4334efe9712980772168867_Tx + OUT + + + PduGroup_f98de66e327946dea5c899a735b6c35b_Rx + IN + + + + + COMPUMETHODS + + + Computation_Method_Test + TEXTTABLE + + + + Label_for_first_value + 0 + 0 + + First Value + + + + Label_for_second_value + 1 + 1 + + Second Value + + + + 0 + 0 + + + 0 + 1 + + + 1 + + + + + + + + + + ECU_INSTANCES + + + Sender + + + Controller_Sender_5d41ed80d754df4a + + + + + + + + + + + + Connector_Sender_2954a2d1271579a3 + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/Sender/Controller_Sender_5d41ed80d754df4a + + + 0 + + + + + I_SIGNAL_GROUPS + + + + + \ No newline at end of file diff --git a/src/canmatrix/tests/ARXMLSecuredPDUTest.arxml b/src/canmatrix/tests/ARXMLSecuredPDUTest.arxml new file mode 100644 index 00000000..8a00ed91 --- /dev/null +++ b/src/canmatrix/tests/ARXMLSecuredPDUTest.arxml @@ -0,0 +1,362 @@ + + + + + Cluster + + + CAN + + + CAN + + + testFrame1 + + /ECU/testBU/CN_testBU/testFrame1 + /ECU/recBU/CN_recBU/testFrame1 + + /Frame/FRAME_testFrame1_SEC + + /Cluster/CAN/IPDUTRIGG_testFrame1 + + STANDARD + 291 + + + extendedFrame + + /ECU/testBU/CN_testBU/extendedFrame + + /Frame/FRAME_extendedFrame + + /Cluster/CAN/IPDUTRIGG_extendedFrame + + EXTENDED + 18 + + + + + IPDUTRIGG_testFrame1 + /PDU/PDU_testFrame1 + + + IPDUTRIGG_extendedFrame + /PDU/PDU_extendedFrame + + + + + someTestSignal + + /ECU/recBU/CN_recBU/someTestSignal + + /ISignal/someTestSignal + + + Signal + + /ECU/recBU/CN_recBU/Signal + + /ISignal/Signal + + + + + + + + + Frame + + + FRAME_testFrame1_SEC + + Multi +Line +Frame comment + + 8 + + + securedTestFrame + MOST-SIGNIFICANT-BYTE-LAST + /PDU/secPdu + 0 + + + + + FRAME_extendedFrame + 8 + + + extendedFrame + MOST-SIGNIFICANT-BYTE-LAST + /PDU/PDU_extendedFrame + 0 + + + + + + + PDU + + + secPdu + /PDU/myPayLoad + + + myPayLoad + /PDU/PDU_testFrame1 + + + PDU_testFrame1 + 64 + + + someTestSignal + MOST-SIGNIFICANT-BYTE-FIRST + /ISignal/someTestSignal + 3 + + + Signal + MOST-SIGNIFICANT-BYTE-LAST + /ISignal/Signal + 20 + + + + + PDU_extendedFrame + 64 + + + + + + ISignal + + + someTestSignal + /Signal/someTestSignal + + + Signal + /Signal/Signal + + + + + Signal + + + someTestSignal + + Multi +Line +Signal comment with a-umlaut: ä + + /DataType/someTestSignal + 11 + + + Signal + /DataType/Signal + 3 + + + + + DataType + + + someTestSignal + + /DataType/Semantics/someTestSignal + + + + Signal + + /DataType/Semantics/Signal + + + + + + Semantics + + + someTestSignal + + + + + + 1 + 5 + + + 1 + + + + + + + + Signal + + + + + one + + 1 + 1 + + one + + + + + two + + 2 + 2 + + two + + + + + three + + 3 + 3 + + three + + + + + + 0 + 1 + + + 1 + + + + + + + + + + Unit + + + someTestSignal + specialCharUnit°$ + + + Signal + someUnit + + + + + + + ECU + + + testBU + + sender ECU + + + /IPDUGroup/testBU_Tx + + + + CN_testBU + + + testFrame1 + OUT + + + someTestSignal + OUT + + + Signal + OUT + + + extendedFrame + OUT + + + + + + + recBU + + receiver ECU + + + /IPDUGroup/recBU_Rx + + + + CN_recBU + + + testFrame1 + IN + + + someTestSignal + IN + + + Signal + IN + + + + + + + + + IPDUGroup + + + testBU_Tx + OUT + + /PDU/PDU_testFrame1 + /PDU/PDU_extendedFrame + + + + recBU_Rx + IN + + /PDU/PDU_testFrame1 + + + + + + diff --git a/src/canmatrix/tests/test_arxml.py b/src/canmatrix/tests/test_arxml.py index cddcb295..8f7c346e 100644 --- a/src/canmatrix/tests/test_arxml.py +++ b/src/canmatrix/tests/test_arxml.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import canmatrix.formats.arxml import pathlib2 - +import io +import textwrap def test_ecu_extract(): here = pathlib2.Path(__file__).parent @@ -11,3 +12,16 @@ def test_ecu_extract(): assert len(db.frames) == 2 assert len(db.frames[0].signals) == 3 assert len(db.frames[1].signals) == 1 + + +def test_get_signals_from_container_i_pdu(): + here = pathlib2.Path(__file__).parent + matrix = canmatrix.formats.arxml.load(str(here / "ARXMLContainerTest.arxml")) + assert matrix["New_CanCluster"].frames[0].signals[0].name == 'PDU_Contained_1_Signal1_905db81da40081cb' + assert matrix["New_CanCluster"].frames[0].signalGroups[0].signals[0].name == 'PDU_Contained_1_Signal1_905db81da40081cb' + +def test_get_signals_from_secured_pdu(): + here = pathlib2.Path(__file__).parent + matrix = canmatrix.formats.arxml.load(str(here / "ARXMLSecuredPDUTest.arxml")) + assert matrix["CAN"].frames[0].signals[0].name == 'someTestSignal' + assert matrix["CAN"].frames[0].signals[1].name == 'Signal' From ca4183152f7e6e3ba1530c99a04b0e5c04ac76c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 13 Aug 2019 09:12:40 +0200 Subject: [PATCH 12/39] Iss381 - fix for #381 - wrong default ArbitrationId handling (#386) * fix for #381 wrong default ArbitrationId handling --- src/canmatrix/canmatrix.py | 4 ++-- src/canmatrix/tests/test_canmatrix.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 28c50564..ada25a81 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -68,7 +68,7 @@ class J1939needsExtendedIdetifier(ExceptionTemplate): pass def arbitration_id_converter(source): # type: (typing.Union[int, ArbitrationId]) -> ArbitrationId """Converter for attrs which accepts ArbitrationId itself or int.""" - return source if isinstance(source, ArbitrationId) else ArbitrationId.from_compound_integer(source) + return source if isinstance(source, ArbitrationId) else ArbitrationId.from_compound_integer(source) @attr.s @@ -720,7 +720,7 @@ class Frame(object): name = attr.ib(default="") # type: str # mypy Unsupported converter: - arbitration_id = attr.ib(converter=arbitration_id_converter, default=arbitration_id_converter(0)) # type: ArbitrationId + arbitration_id = attr.ib(converter=arbitration_id_converter, default=0) # type: ArbitrationId size = attr.ib(default=0) # type: int transmitters = attr.ib(factory=list) # type: typing.MutableSequence[str] # extended = attr.ib(default=False) # type: bool diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index fcc363ee..adab1bbc 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -805,6 +805,16 @@ def test_Arbitration_id(): assert id_from_int_extended == id_extended assert id_from_int_extended != id_standard +def test_arbitration_id_is_instance(): + frame1 = canmatrix.Frame(name = "Frame1") + frame2 = canmatrix.Frame(name = "Frame1") + + frame1.arbitration_id.id = 42 + + assert frame1.arbitration_id.id == 42 + assert frame2.arbitration_id.id == 0 + + @pytest.fixture def empty_matrix(): From 26bee8352f907b11d0919b9c105c26cdcc8bd381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Wed, 14 Aug 2019 09:12:25 +0200 Subject: [PATCH 13/39] support for Scapy input file (#387) * add output format for scapy From 6d22479f48578df9052aecfd37e950161ae31992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Wed, 14 Aug 2019 13:24:34 +0200 Subject: [PATCH 14/39] optional ignoring failures durig character encoding #375 (#388) --- src/canmatrix/cli/convert.py | 10 +++- src/canmatrix/formats/dbc.py | 89 +++++++++++++++++---------------- src/canmatrix/formats/dbf.py | 3 +- src/canmatrix/formats/sym.py | 7 +-- src/canmatrix/tests/test_dbc.py | 2 +- 5 files changed, 61 insertions(+), 50 deletions(-) diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index 7392925d..c005ca01 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -41,7 +41,7 @@ def main(): # type: () -> int %prog [options] import-file export-file import-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym - export-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym + export-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym|*.py following formats are available at this installation: \n""" @@ -156,6 +156,10 @@ def main(): # type: () -> int dest="jsonNativeTypes", action="store_true", default=False, help="Uses native json representation for decimals instead of string.") + parser.add_option("", "--ignoreEncodingErrors", + dest="ignoreEncodingErrors", action="store_true", default=False, + help="ignore character encoding errors during export (dbc,dbf,sym) ") + parser.add_option("", "--additionalFrameAttributes", dest="additionalFrameAttributes", default="", help="append columns to csv/xls(x), example: is_fd") @@ -236,6 +240,10 @@ def main(): # type: () -> int verbosity = -1 canmatrix.log.set_log_level(logger, verbosity) + if cmdlineOptions.ignoreEncodingErrors: + cmdlineOptions.ignoreEncodingErrors = "ignore" + else: + cmdlineOptions.ignoreEncodingErrors = "" canmatrix.convert.convert(infile, out_file_name, **cmdlineOptions.__dict__) return 0 diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 846d0b9b..b9e031df 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -100,13 +100,13 @@ def create_attribute_string(attribute, attribute_class, name, value, is_string): return attribute_string -def create_comment_string(comment_class, comment_ident, comment, export_encoding, export_comment_encoding): +def create_comment_string(comment_class, comment_ident, comment, export_encoding, export_comment_encoding, ignore_encoding_errors): # type: (str, str, str, str, str) -> bytes if len(comment) == 0: return b"" comment_string = ("CM_ " + comment_class + " " + comment_ident + ' "').encode(export_encoding, 'ignore') comment_string += comment.replace('"', '\\"').encode(export_comment_encoding, 'ignore') - comment_string += '";\n'.encode(export_encoding) + comment_string += '";\n'.encode(export_encoding, ignore_encoding_errors) return comment_string @@ -117,6 +117,7 @@ def dump(in_db, f, **options): dbc_export_encoding = options.get("dbcExportEncoding", 'iso-8859-1') dbc_export_comment_encoding = options.get("dbcExportCommentEncoding", dbc_export_encoding) + ignore_encoding_errors= options.get("ignoreExportEncodingErrors", "") write_val_table = options.get("writeValTable", True) compatibility = options.get('compatibility', True) @@ -163,10 +164,10 @@ def dump(in_db, f, **options): db.add_env_defines("SystemEnvVarLongSymbol", "STRING") header = "VERSION \"created by canmatrix\"\n\n\nNS_ :\n\nBS_:\n\n" - f.write(header.encode(dbc_export_encoding)) + f.write(header.encode(dbc_export_encoding, ignore_encoding_errors)) # ECUs - f.write("BU_: ".encode(dbc_export_encoding)) + f.write("BU_: ".encode(dbc_export_encoding, ignore_encoding_errors)) for ecu in db.ecus: # fix long ecu names: @@ -175,18 +176,18 @@ def dump(in_db, f, **options): ecu.name = ecu.name[0:32] db.add_ecu_defines("SystemNodeLongSymbol", "STRING") - f.write((ecu.name + " ").encode(dbc_export_encoding)) + f.write((ecu.name + " ").encode(dbc_export_encoding, ignore_encoding_errors)) - f.write("\n\n".encode(dbc_export_encoding)) + f.write("\n\n".encode(dbc_export_encoding, ignore_encoding_errors)) if write_val_table: # ValueTables for table in sorted(db.value_tables): - f.write(("VAL_TABLE_ " + table).encode(dbc_export_encoding)) + f.write(("VAL_TABLE_ " + table).encode(dbc_export_encoding, ignore_encoding_errors)) for row in db.value_tables[table]: - f.write(' {} "{}"'.format(str(row), db.value_tables[table][row]).encode(dbc_export_encoding)) - f.write(";\n".encode(dbc_export_encoding)) - f.write("\n".encode(dbc_export_encoding)) + f.write(' {} "{}"'.format(str(row), db.value_tables[table][row]).encode(dbc_export_encoding, ignore_encoding_errors)) + f.write(";\n".encode(dbc_export_encoding, ignore_encoding_errors)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) output_names = collections.defaultdict(dict) # type: typing.Dict[canmatrix.Frame, typing.Dict[canmatrix.Signal, str]] @@ -241,7 +242,7 @@ def dump(in_db, f, **options): ": %d " % frame.size + frame.transmitters[0] + - "\n").encode(dbc_export_encoding)) + "\n").encode(dbc_export_encoding, ignore_encoding_errors)) duplicate_signal_totals = collections.Counter( normalize_name(s.name, whitespace_replacement) for s in frame.signals @@ -284,21 +285,21 @@ def dump(in_db, f, **options): if len(signal.receivers) == 0: signal.add_receiver('Vector__XXX') signal_line += ','.join(signal.receivers) + "\n" - f.write(signal_line.encode(dbc_export_encoding)) + f.write(signal_line.encode(dbc_export_encoding, ignore_encoding_errors)) - f.write("\n".encode(dbc_export_encoding)) - f.write("\n".encode(dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) # second Sender: for frame in db.frames: if len(frame.transmitters) > 1: - f.write(("BO_TX_BU_ %d : %s;\n" % (frame.arbitration_id.to_compound_integer(), ','.join(frame.transmitters))).encode(dbc_export_encoding)) + f.write(("BO_TX_BU_ %d : %s;\n" % (frame.arbitration_id.to_compound_integer(), ','.join(frame.transmitters))).encode(dbc_export_encoding, ignore_encoding_errors)) # frame comments # wow, there are dbcs where comments are encoded with other coding than rest of dbc... for frame in db.frames: - f.write(create_comment_string("BO_", "%d " % frame.arbitration_id.to_compound_integer(), frame.comment, dbc_export_encoding, dbc_export_comment_encoding)) - f.write("\n".encode(dbc_export_encoding)) + f.write(create_comment_string("BO_", "%d " % frame.arbitration_id.to_compound_integer(), frame.comment, dbc_export_encoding, dbc_export_comment_encoding, dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) # signal comments for frame in db.frames: @@ -310,15 +311,15 @@ def dump(in_db, f, **options): "%d " % frame.arbitration_id.to_compound_integer() + name, signal.comment, dbc_export_encoding, - dbc_export_comment_encoding)) - f.write("\n".encode(dbc_export_encoding)) + dbc_export_comment_encoding, dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) # ecu comments for ecu in db.ecus: if ecu.comment: f.write(create_comment_string("BU_", ecu.name, ecu.comment, dbc_export_encoding, - dbc_export_comment_encoding)) - f.write("\n".encode(dbc_export_encoding)) + dbc_export_comment_encoding, dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) defaults = {} # type: typing.Dict[str, str] @@ -339,26 +340,26 @@ def dump(in_db, f, **options): f.write(create_define(data_type, define, "", defaults).encode(dbc_export_encoding, 'replace')) for define_name in sorted(defaults): - f.write(('BA_DEF_DEF_ "' + define_name + '" ').encode(dbc_export_encoding) + - defaults[define_name].encode(dbc_export_encoding, 'replace') + ';\n'.encode(dbc_export_encoding)) + f.write(('BA_DEF_DEF_ "' + define_name + '" ').encode(dbc_export_encoding, ignore_encoding_errors) + + defaults[define_name].encode(dbc_export_encoding, 'replace') + ';\n'.encode(dbc_export_encoding, ignore_encoding_errors)) # ecu-attributes: for ecu in db.ecus: for attrib, val in sorted(ecu.attributes.items()): - f.write(create_attribute_string(attrib, "BU_", ecu.name, val, db.ecu_defines[attrib].type == "STRING").encode(dbc_export_encoding)) - f.write("\n".encode(dbc_export_encoding)) + f.write(create_attribute_string(attrib, "BU_", ecu.name, val, db.ecu_defines[attrib].type == "STRING").encode(dbc_export_encoding, ignore_encoding_errors)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) # global-attributes: for attrib, val in sorted(db.attributes.items()): f.write(create_attribute_string(attrib, "", "", val, db.global_defines[attrib].type == "STRING").encode( - dbc_export_encoding)) - f.write("\n".encode(dbc_export_encoding)) + dbc_export_encoding, ignore_encoding_errors)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) # messages-attributes: for frame in db.frames: for attrib, val in sorted(frame.attributes.items()): - f.write(create_attribute_string(attrib, "BO_", str(frame.arbitration_id.to_compound_integer()), val, db.frame_defines[attrib].type == "STRING").encode(dbc_export_encoding)) - f.write("\n".encode(dbc_export_encoding)) + f.write(create_attribute_string(attrib, "BO_", str(frame.arbitration_id.to_compound_integer()), val, db.frame_defines[attrib].type == "STRING").encode(dbc_export_encoding, ignore_encoding_errors)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) # signal-attributes: for frame in db.frames: @@ -368,15 +369,15 @@ def dump(in_db, f, **options): if isinstance(val, float): val = format_float(val) f.write(create_attribute_string(attrib, "SG_", '%d ' % frame.arbitration_id.to_compound_integer() + name, val, - db.signal_defines[attrib].type == "STRING").encode(dbc_export_encoding)) + db.signal_defines[attrib].type == "STRING").encode(dbc_export_encoding, ignore_encoding_errors)) - f.write("\n".encode(dbc_export_encoding)) + f.write("\n".encode(dbc_export_encoding, ignore_encoding_errors)) for env_var_name, env_var in db.env_vars.items(): if "attributes" in env_var: for attribute, value in env_var["attributes"].items(): f.write(create_attribute_string(attribute, "EV_", "", value, - db.env_defines[attribute].type == "STRING").encode(dbc_export_encoding)) + db.env_defines[attribute].type == "STRING").encode(dbc_export_encoding, ignore_encoding_errors)) # signal-values: for frame in db.frames: @@ -391,11 +392,11 @@ def dump(in_db, f, **options): f.write( ('VAL_ %d ' % frame.arbitration_id.to_compound_integer() + - output_names[frame][signal]).encode(dbc_export_encoding)) + output_names[frame][signal]).encode(dbc_export_encoding, ignore_encoding_errors)) for attr_name, val in sorted(signal.values.items(), key=lambda x: int(x[0])): f.write( - (' ' + str(attr_name) + ' "' + val + '"').encode(dbc_export_encoding)) - f.write(";\n".encode(dbc_export_encoding)) + (' ' + str(attr_name) + ' "' + val + '"').encode(dbc_export_encoding, ignore_encoding_errors)) + f.write(";\n".encode(dbc_export_encoding, ignore_encoding_errors)) # SIG_VALTYPE for frame in db.frames: @@ -403,28 +404,28 @@ def dump(in_db, f, **options): if signal.is_float: if int(signal.size) > 32: f.write(('SIG_VALTYPE_ %d %s : 2;\n' % (frame.arbitration_id.to_compound_integer(), output_names[frame][signal])).encode( - dbc_export_encoding)) + dbc_export_encoding, ignore_encoding_errors)) else: f.write(('SIG_VALTYPE_ %d %s : 1;\n' % (frame.arbitration_id.to_compound_integer(), output_names[frame][signal])).encode( - dbc_export_encoding)) + dbc_export_encoding, ignore_encoding_errors)) # signal-groups: for frame in db.frames: for sigGroup in frame.signalGroups: f.write(("SIG_GROUP_ " + str(frame.arbitration_id.to_compound_integer()) + " " + sigGroup.name + - " " + str(sigGroup.id) + " :").encode(dbc_export_encoding)) + " " + str(sigGroup.id) + " :").encode(dbc_export_encoding, ignore_encoding_errors)) for signal in sigGroup.signals: - f.write((" " + output_names[frame][signal]).encode(dbc_export_encoding)) - f.write(";\n".encode(dbc_export_encoding)) + f.write((" " + output_names[frame][signal]).encode(dbc_export_encoding, ignore_encoding_errors)) + f.write(";\n".encode(dbc_export_encoding, ignore_encoding_errors)) for frame in db.frames: if frame.is_complex_multiplexed: for signal in frame.signals: if signal.muxer_for_signal is not None: - f.write(("SG_MUL_VAL_ %d %s %s " % (frame.arbitration_id.to_compound_integer(), signal.name, signal.muxer_for_signal)).encode(dbc_export_encoding)) - f.write((", ".join(["%d-%d" % (a, b) for a, b in signal.mux_val_grp])).encode(dbc_export_encoding)) + f.write(("SG_MUL_VAL_ %d %s %s " % (frame.arbitration_id.to_compound_integer(), signal.name, signal.muxer_for_signal)).encode(dbc_export_encoding, ignore_encoding_errors)) + f.write((", ".join(["%d-%d" % (a, b) for a, b in signal.mux_val_grp])).encode(dbc_export_encoding, ignore_encoding_errors)) - f.write(";\n".encode(dbc_export_encoding)) + f.write(";\n".encode(dbc_export_encoding, ignore_encoding_errors)) for env_var_name in db.env_vars: env_var = db.env_vars[env_var_name] @@ -432,7 +433,7 @@ def dump(in_db, f, **options): env_var_name, env_var["varType"], env_var["min"], env_var["max"], env_var["unit"], env_var["initialValue"], env_var["evId"], env_var["accessType"], - ",".join(env_var["accessNodes"]))).encode(dbc_export_encoding)) + ",".join(env_var["accessNodes"]))).encode(dbc_export_encoding, ignore_encoding_errors)) class _FollowUps(object): diff --git a/src/canmatrix/formats/dbf.py b/src/canmatrix/formats/dbf.py index e389752d..8633c560 100644 --- a/src/canmatrix/formats/dbf.py +++ b/src/canmatrix/formats/dbf.py @@ -311,6 +311,7 @@ def dump(mydb, f, **options): # create copy because export changes database db = copy.deepcopy(mydb) dbf_export_encoding = options.get("dbfExportEncoding", 'iso-8859-1') + ignore_encoding_errors = options.get("ignoreExportEncodingErrors", "") db.enum_attribs_to_keys() if len(db.signals) > 0: free_signals_dummy_frame = canmatrix.Frame("VECTOR__INDEPENDENT_SIG_MSG") @@ -510,4 +511,4 @@ def dump(mydb, f, **options): ',"' + attrib + '","' + val + '"\n' out_str += "[END_PARAM_SIG_VAL]\n" out_str += "[END_PARAM_VAL]\n" - f.write(out_str.encode(dbf_export_encoding)) + f.write(out_str.encode(dbf_export_encoding, ignore_encoding_errors)) diff --git a/src/canmatrix/formats/sym.py b/src/canmatrix/formats/sym.py index d309ce2c..37c8d8ba 100644 --- a/src/canmatrix/formats/sym.py +++ b/src/canmatrix/formats/sym.py @@ -185,6 +185,7 @@ def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.A global enum_dict global enums sym_encoding = options.get('symExportEncoding', 'iso-8859-1') + ignore_encoding_errors = options.get("ignoreExportEncodingErrors", "") enum_dict = {} enums = "{ENUMS}\n" @@ -192,7 +193,7 @@ def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.A header = """FormatVersion=5.0 // Do not edit this line! Title=\"canmatrix-Export\" """ - f.write(header.encode(sym_encoding)) + f.write(header.encode(sym_encoding, ignore_encoding_errors)) def send_receive(for_frame): return ( @@ -308,8 +309,8 @@ def send_receive(for_frame): output += "\n" enums += '\n'.join(sorted(enum_dict.values())) # write output file - f.write((enums + '\n').encode(sym_encoding)) - f.write(output.encode(sym_encoding)) + f.write((enums + '\n').encode(sym_encoding, ignore_encoding_errors)) + f.write(output.encode(sym_encoding, ignore_encoding_errors)) def load(f, **options): # type: (typing.IO, **typing.Any) -> canmatrix.CanMatrix diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index 5fe7b14c..3d7414dd 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -50,7 +50,7 @@ def test_create_attribute_string(): def test_create_comment_string(): - test_string = canmatrix.formats.dbc.create_comment_string("BO_", "ident", "some comment", "utf8", "utf8") + test_string = canmatrix.formats.dbc.create_comment_string("BO_", "ident", "some comment", "utf8", "utf8", "") assert test_string == b'CM_ BO_ ident "some comment";\n' From d5c5f53021cf01c186f4fa2f9e378c4a5c0f92e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 19 Aug 2019 11:50:50 +0200 Subject: [PATCH 15/39] fix for #238 (j1939 Frame setters might raise TypeError) (#389) move j1939 (pgn, prio, source) handling direct to arbitration-id class (fixes #238) --- src/canmatrix/canmatrix.py | 51 ++++++++++++++++----------- src/canmatrix/tests/test_canmatrix.py | 22 ++++++------ 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index ada25a81..038c20ad 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -613,6 +613,20 @@ def pgn(self): _pgn += ps return _pgn + @pgn.setter + def pgn(self, value): # type: (int) -> None + self.extended = True + ps = value & 0xff + pf = (value >> 8) & 0xFF + _pgn = pf << 8 + if pf >= 240: + _pgn += ps + + self.id &= 0xff0000ff + self.id |= (_pgn & 0xffff) << 8 # default pgn is None -> mypy reports error + + + @property def j1939_tuple(self): # type: () -> typing.Tuple[int, int, int] """Get tuple (destination, PGN, source) @@ -637,6 +651,11 @@ def j1939_source(self): raise J1939needsExtendedIdetifier return self.id & 0xFF + @j1939_source.setter + def j1939_source(self, value): # type: (int) -> None + self.extended = True + self.id = (self.id & 0xffffff00) | (value & 0xff) + @property def j1939_ps(self): if not self.extended: @@ -659,7 +678,12 @@ def j1939_edp(self): def j1939_priority(self): if not self.extended: raise J1939needsExtendedIdetifier - return (self.id >> 25) & 0x7 + return (self.id >> 26) & 0x7 + + @j1939_priority.setter + def j1939_priority(self, value): # type: (int) -> None + self.extended = True + self.id = (self.id & 0x2ffffff) | ((value & 0x7) << 26) @property def j1939_str(self): # type: () -> str @@ -733,9 +757,6 @@ class Frame(object): receivers = attr.ib(factory=list) # type: typing.MutableSequence[str] signalGroups = attr.ib(factory=list) # type: typing.MutableSequence[SignalGroup] - j1939_pgn = attr.ib(default=None) # type: typing.Optional[int] - j1939_source = attr.ib(default=0) # type: int - j1939_prio = attr.ib(default=0) # type: int is_j1939 = attr.ib(default=False) # type: bool # ('cycleTime', '_cycleTime', int, None), # ('sendType', '_sendType', str, None), @@ -787,38 +808,28 @@ def pgn(self): # type: () -> int @pgn.setter def pgn(self, value): # type: (int) -> None - self.j1939_pgn = value - self.recalc_J1939_id() + self.arbitration_id.pgn = value @property def priority(self): # type: () -> int """Get J1939 priority.""" - return self.j1939_prio + return self.arbitration_id.j1939_prio @priority.setter def priority(self, value): # type: (int) -> None """Set J1939 priority.""" - self.j1939_prio = value - self.recalc_J1939_id() + self.arbitration_id.j1939_priority = value @property def source(self): # type: () -> int """Get J1939 source.""" - return self.j1939_source + return self.arbitration_id.j1939_source @source.setter def source(self, value): # type: (int) -> None """Set J1939 source.""" - self.j1939_source = value - self.recalc_J1939_id() - - def recalc_J1939_id(self): # type: () -> None - """Recompute J1939 ID""" - self.arbitration_id.id = self.j1939_source & 0xff - self.arbitration_id.id += (self.j1939_pgn & 0xffff) << 8 # default pgn is None -> mypy reports error - self.arbitration_id.id += (self.j1939_prio & 0x7) << 26 - self.arbitration_id.extended = True - self.is_j1939 = True + self.arbitration_id.j1939_source = value + # @property # def cycleTime(self): diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index adab1bbc..ee809033 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -557,22 +557,13 @@ def test_frame_not_multiplexed(): frame.add_signal(canmatrix.canmatrix.Signal(name="some")) assert not frame.is_multiplexed - def test_frame_calc_j1939_id(): # we have to set all j1939 properties in the __init__ otherwise the setters crash - frame = canmatrix.canmatrix.Frame(j1939_source=0x11, j1939_pgn=0xFFFF, j1939_prio=0) + frame = canmatrix.canmatrix.Frame() frame.source = 0x22 frame.pgn = 0xAAAA frame.priority = 3 - assert hex(frame.arbitration_id.id) == hex(0x0CAAAA22) - - -def test_frame_get_j1939_properties(): - frame = canmatrix.canmatrix.Frame(j1939_source=0x11, j1939_pgn=0xFFFF, j1939_prio=1) - frame.recalc_J1939_id() # pgn property is computed from id! - assert frame.pgn == frame.j1939_pgn - assert frame.source == frame.j1939_source - assert frame.priority == frame.j1939_prio + assert frame.arbitration_id.id == 0xcaa0022 def test_frame_add_transmitter(empty_frame): @@ -814,7 +805,14 @@ def test_arbitration_id_is_instance(): assert frame1.arbitration_id.id == 42 assert frame2.arbitration_id.id == 0 - +def test_arbitration_id_j1939_direct_setters(): + arb_id = canmatrix.ArbitrationId(0) + arb_id.pgn = 0xF1AA + arb_id.j1939_source = 0x22 + arb_id.j1939_priority = 3 + assert arb_id.pgn == 0xF1AA + assert arb_id.j1939_source == 0x22 + assert arb_id.j1939_priority == 3 @pytest.fixture def empty_matrix(): From 60c61f4f395222ccad98f45c3b73b773cc6db8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 19 Aug 2019 12:39:05 +0200 Subject: [PATCH 16/39] Iss385 // Arxml Container support and ARXML refactoring (#390) ARXML updates: * fix for #385 * json fix multiplex reading issue (#136) * ARXML refactoring, DLC for canFD support canmatrix.Frame.fit_dlc now fits to next correct dlc value, DBC export reniced for candb++ (#385) * add test for fit_dlc * arxml refactoring and better type handling #368 * improvement for #242 --- src/canmatrix/canmatrix.py | 16 +- src/canmatrix/formats/arxml.py | 298 +++++++----- src/canmatrix/formats/cmjson.py | 8 +- src/canmatrix/formats/dbc.py | 23 +- src/canmatrix/tests/ARXML_min_max.arxml | 608 ++++++++++++++++++++++++ src/canmatrix/tests/test_arxml.py | 9 +- src/canmatrix/tests/test_canmatrix.py | 34 ++ 7 files changed, 868 insertions(+), 128 deletions(-) create mode 100644 src/canmatrix/tests/ARXML_min_max.arxml diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 038c20ad..aae2e64e 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -1013,7 +1013,20 @@ def calc_dlc(self): for sig in self.signals: if sig.get_startbit() + int(sig.size) > max_bit: max_bit = sig.get_startbit() + int(sig.size) - self.size = max(self.size, int(math.ceil(max_bit / 8))) + max_byte = int(math.ceil(max_bit / 8)) + self.size = max(self.size, max_byte) + + def fit_dlc(self): + """ + Compute next allowed DLC (length) for current Frame + """ + max_byte = self.size + last_size = 8 + for max_size in [12, 16, 20, 24, 32, 48, 64]: + if max_byte > last_size and max_byte < max_size: + self.size = max_size + break + last_size = max_size def get_frame_layout(self): # type: () -> typing.Sequence[typing.Sequence[str]] @@ -1726,7 +1739,6 @@ def recalc_dlc(self, strategy): # type: (str) -> None :param str strategy: selected strategy, "max" or "force". """ for frame in self.frames: - originalDlc = frame.size # unused, remove? if "max" == strategy: frame.calc_dlc() if "force" == strategy: diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index f396c0b1..01be9f91 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -927,9 +927,14 @@ def decode_compu_method(compu_method, root_or_cache, ns, float_factory): numerator = get_children(numerator_parent, "V", root_or_cache, ns) denominator_parent = get_child(rational, "COMPU-DENOMINATOR", root_or_cache, ns) denominator = get_children(denominator_parent, "V", root_or_cache, ns) - - factor = float_factory(numerator[1].text) / float_factory(denominator[0].text) - offset = float_factory(numerator[0].text) / float_factory(denominator[0].text) + try: + factor = float_factory(numerator[1].text) / float_factory(denominator[0].text) + offset = float_factory(numerator[0].text) / float_factory(denominator[0].text) + except decimal.DivisionByZero: + if numerator[0].text != denominator[0].text or numerator[1].text != denominator[1].text: + logger.warning("ARXML signal scaling: polynom is not supported and it is replaced by factor=1 and offset =0.") + factor = float_factory(1) + offset = float_factory(0) else: const = get_child(compu_scale, "COMPU-CONST", root_or_cache, ns) # add value @@ -938,7 +943,32 @@ def decode_compu_method(compu_method, root_or_cache, ns, float_factory): return values, factor, offset, unit, const -def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_factory): +def eval_type_of_signal(type_encoding, base_type, ns): + if type_encoding == "NONE": + is_signed = False + is_float = False + elif type_encoding == "2C": + is_signed = True + is_float = False + elif type_encoding == "IEEE754" or type_encoding == "SINGLE" or type_encoding == "DOUBLE": + is_signed = True + is_float = True + elif type_encoding == "BOOLEAN": + is_signed = False + is_float = False + elif base_type is not None: + is_float = False + type_name = get_element_name(base_type, ns) + if type_name[0] == 'u': + is_signed = False # unsigned + else: + is_signed = True # signed + else: + is_float = False + is_signed = False # signed + return is_signed, is_float + +def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_factory, bit_offset = 0): # type: (typing.Sequence[_Element], canmatrix.Frame, _DocRoot, str, _MultiplexId, typing.Callable) -> None """Add signals from xml to the Frame.""" global signal_rxs @@ -968,12 +998,17 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact frame.name, get_child(signal, "SHORT-NAME", root_or_cache, ns).text) base_type = get_child(isignal, "BASE-TYPE", root_or_cache, ns) + try: + type_encoding = get_child(base_type,"BASE-TYPE-ENCODING", root_or_cache, ns).text + except AttributeError: + type_encoding = "None" signal_name = None # type: typing.Optional[str] signal_name_elem = get_child(isignal, "LONG-NAME", root_or_cache, ns) if signal_name_elem is not None: signal_name_elem = get_child(signal_name_elem, "L-4", root_or_cache, ns) if signal_name_elem is not None: signal_name = signal_name_elem.text + system_signal = get_child(isignal, "SYSTEM-SIGNAL", root_or_cache, ns) if system_signal is None: logger.debug('Frame %s, signal %s has no system-signal', frame.name, isignal.tag) @@ -1015,21 +1050,14 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact if base_type is None: base_type = get_child(test_signal, "BASE-TYPE", root_or_cache, ns) - - lower = get_child(data_constr, "LOWER-LIMIT", root_or_cache, ns) upper = get_child(data_constr, "UPPER-LIMIT", root_or_cache, ns) encoding = None # TODO - find encoding in AR4 else: lower = get_child(datatype, "LOWER-LIMIT", root_or_cache, ns) upper = get_child(datatype, "UPPER-LIMIT", root_or_cache, ns) - encoding = get_child(datatype, "ENCODING", root_or_cache, ns) + type_encoding = get_child(datatype, "ENCODING", root_or_cache, ns) - if encoding is not None and (encoding.text == "SINGLE" or encoding.text == "DOUBLE"): - is_float = True - else: - is_float = False - if lower is not None and upper is not None: signal_min = float_factory(lower.text) signal_max = float_factory(upper.text) @@ -1074,14 +1102,8 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact if base_type is None: base_type = get_child(datdefprops, "BASE-TYPE", root_or_cache, ns) - if base_type is not None: - type_name = get_element_name(base_type, ns) - if type_name[0] == 'u': - is_signed = False # unsigned - else: - is_signed = True # signed - else: - is_signed = True # signed + + (is_signed, is_float) = eval_type_of_signal(type_encoding, base_type, ns) if unit_elem is not None: longname = get_child(unit_elem, "LONG-NAME", root_or_cache, ns) @@ -1126,7 +1148,7 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact if start_bit is not None: new_signal = canmatrix.Signal( name.text, - start_bit=int(start_bit.text), + start_bit=int(start_bit.text) + bit_offset, size=int(length.text), is_little_endian=is_little_endian, is_signed=is_signed, @@ -1145,7 +1167,7 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact if not new_signal.is_little_endian: # startbit of motorola coded signals are MSB in arxml - new_signal.set_startbit(int(start_bit.text), bitNumbering=1) + new_signal.set_startbit(int(start_bit.text) + bit_offset, bitNumbering=1) # save signal, to determin receiver-ECUs for this signal later signal_rxs[system_signal] = new_signal @@ -1169,6 +1191,137 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact new_signal.add_attribute("LongName", signal_name) frame.add_signal(new_signal) +def get_frame_from_multiplexed_ipdu(pdu, target_frame, multiplex_translation, root_or_cache, ns, float_factory): + selector_byte_order = get_child(pdu, "SELECTOR-FIELD-BYTE-ORDER", root_or_cache, ns) + selector_len = get_child(pdu, "SELECTOR-FIELD-LENGTH", root_or_cache, ns) + selector_start = get_child(pdu, "SELECTOR-FIELD-START-POSITION", root_or_cache, ns) + is_little_endian = False + if selector_byte_order.text == 'MOST-SIGNIFICANT-BYTE-LAST': + is_little_endian = True + is_signed = False # unsigned + multiplexor = canmatrix.Signal( + "Multiplexor", + start_bit=int(selector_start.text), + size=int(selector_len.text), + is_little_endian=is_little_endian, + multiplex="Multiplexor") + + multiplexor._initValue = 0 + target_frame.add_signal(multiplexor) + static_part = get_child(pdu, "STATIC-PART", root_or_cache, ns) + ipdu = get_child(static_part, "I-PDU", root_or_cache, ns) + if ipdu is not None: + pdu_sig_mappings = get_child(ipdu, "SIGNAL-TO-PDU-MAPPINGS", root_or_cache, ns) + pdu_sig_mapping = get_children(pdu_sig_mappings, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) + get_signals(pdu_sig_mapping, target_frame, root_or_cache, ns, None, float_factory) + multiplex_translation[get_element_name(ipdu, ns)] = get_element_name(pdu, ns) + + dynamic_part = get_child(pdu, "DYNAMIC-PART", root_or_cache, ns) + # segmentPositions = arGetChild(dynamic_part, "SEGMENT-POSITIONS", arDict, ns) + # segmentPosition = arGetChild(segmentPositions, "SEGMENT-POSITION", arDict, ns) + # byteOrder = arGetChild(segmentPosition, "SEGMENT-BYTE-ORDER", arDict, ns) + # segLength = arGetChild(segmentPosition, "SEGMENT-LENGTH", arDict, ns) + # segPos = arGetChild(segmentPosition, "SEGMENT-POSITION", arDict, ns) + dynamic_part_alternatives = get_child(dynamic_part, "DYNAMIC-PART-ALTERNATIVES", root_or_cache, ns) + dynamic_part_alternative_list = get_children(dynamic_part_alternatives, "DYNAMIC-PART-ALTERNATIVE", + root_or_cache, ns) + for alternative in dynamic_part_alternative_list: + selector_id = get_child(alternative, "SELECTOR-FIELD-CODE", root_or_cache, ns) + ipdu = get_child(alternative, "I-PDU", root_or_cache, ns) + multiplex_translation[get_element_name(ipdu, ns)] = get_element_name(pdu, ns) + if ipdu is not None: + pdu_sig_mappings = get_child(ipdu, "SIGNAL-TO-PDU-MAPPINGS", root_or_cache, ns) + pdu_sig_mapping = get_children(pdu_sig_mappings, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) + get_signals(pdu_sig_mapping, target_frame, root_or_cache, ns, selector_id.text, float_factory) + + + +def get_frame_from_container_ipdu(pdu, target_frame, root_or_cache, ns, float_factory): + target_frame.is_fd = True + pdus = get_children(pdu, "CONTAINED-PDU-TRIGGERING", root_or_cache, ns) + signal_group_id = 1 + singnals_grouped = [] + header_type = get_child(pdu, "HEADER-TYPE", root_or_cache, ns).text + if header_type == "SHORT-HEADER": + header_length = 32 + target_frame.add_signal(canmatrix.Signal(start_bit=0, size=24, name="Header_ID", multiplex ="Multiplexor", is_little_endian = True)) + target_frame.add_signal(canmatrix.Signal(start_bit=24, size= 8, name="Header_DLC", is_little_endian = True)) + elif header_type == "LONG-HEADER": + header_length = 64 + target_frame.add_signal(canmatrix.Signal(start_bit=0, size=32, name="Header_ID", multiplex="Multiplexor", + is_little_endian=True)) + target_frame.add_signal(canmatrix.Signal(start_bit=32, size=32, name="Header_DLC", is_little_endian=True)) + else: + raise("header " + header_type + " not supported for containers yet") + # none type + #TODO + + for cpdu in pdus: + ipdu = get_child(cpdu, "I-PDU", root_or_cache, ns) + try: + if header_type == "SHORT-HEADER": + header_id = get_child(ipdu, "HEADER-ID-SHORT-HEADER", root_or_cache, ns).text + elif header_type == "LONG-HEADER": + header_id = get_child(ipdu, "HEADER-ID-LONG-HEADER", root_or_cache, ns).text + else: + #none type + pass + except AttributeError: + header_id = "0" + if header_id.startswith("0x"): + header_id = int(header_id, 16) + else: + header_id = int(header_id) + + # pdu_sig_mapping = get_children(ipdu, "I-SIGNAL-IN-I-PDU", root_or_cache, ns) + pdu_sig_mapping = get_children(ipdu, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) + # TODO + if pdu_sig_mapping: + get_signals(pdu_sig_mapping, target_frame, root_or_cache, ns, header_id, float_factory, bit_offset=header_length) + new_signals = [] + for signal in target_frame: + if signal.name not in singnals_grouped and signal.name is not "Header_ID" and signal.name is not "Header_DLC": + new_signals.append(signal.name) + target_frame.add_signal_group("HEARDER_ID_" + str(header_id), signal_group_id, new_signals) + singnals_grouped += new_signals + signal_group_id += 1 + +def store_frame_timings(target_frame, cyclic_timing, event_timing, minimum_delay, repeats, starting_time, time_offset, repeating_time, root_or_cache, time_period, ns, float_factory): + if cyclic_timing is not None and event_timing is not None: + target_frame.add_attribute("GenMsgSendType", "cyclicAndSpontanX") # CycleAndSpontan + if minimum_delay is not None: + target_frame.add_attribute("GenMsgDelayTime", str(int(float_factory(minimum_delay.text) * 1000))) + if repeats is not None: + target_frame.add_attribute("GenMsgNrOfRepetitions", repeats.text) + elif cyclic_timing is not None: + target_frame.add_attribute("GenMsgSendType", "cyclicX") # CycleX + if minimum_delay is not None: + target_frame.add_attribute("GenMsgDelayTime", str(int(float_factory(minimum_delay.text) * 1000))) + if repeats is not None: + target_frame.add_attribute("GenMsgNrOfRepetitions", repeats.text) + else: + target_frame.add_attribute("GenMsgSendType", "spontanX") # Spontan + if minimum_delay is not None: + target_frame.add_attribute("GenMsgDelayTime", str(int(float_factory(minimum_delay.text) * 1000))) + if repeats is not None: + target_frame.add_attribute("GenMsgNrOfRepetitions", repeats.text) + + if starting_time is not None: + value = get_child(starting_time, "VALUE", root_or_cache, ns) + target_frame.add_attribute("GenMsgStartDelayTime", str(int(float_factory(value.text) * 1000))) + elif cyclic_timing is not None: + value = get_child(time_offset, "VALUE", root_or_cache, ns) + if value is not None: + target_frame.add_attribute("GenMsgStartDelayTime", str(int(float_factory(value.text) * 1000))) + + value = get_child(repeating_time, "VALUE", root_or_cache, ns) + if value is not None: + target_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) + elif cyclic_timing is not None: + value = get_child(time_period, "VALUE", root_or_cache, ns) + if value is not None: + target_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) + def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_factory): # type: (_Element, _DocRoot, dict, str, typing.Callable) -> typing.Union[canmatrix.Frame, None] @@ -1218,46 +1371,7 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ logger.debug(get_element_name(pdu, ns)) if pdu is not None and "MULTIPLEXED-I-PDU" in pdu.tag: - selector_byte_order = get_child(pdu, "SELECTOR-FIELD-BYTE-ORDER", root_or_cache, ns) - selector_len = get_child(pdu, "SELECTOR-FIELD-LENGTH", root_or_cache, ns) - selector_start = get_child(pdu, "SELECTOR-FIELD-START-POSITION", root_or_cache, ns) - is_little_endian = False - if selector_byte_order.text == 'MOST-SIGNIFICANT-BYTE-LAST': - is_little_endian = True - is_signed = False # unsigned - multiplexor = canmatrix.Signal( - "Multiplexor", - start_bit=int(selector_start.text), - size=int(selector_len.text), - is_little_endian=is_little_endian, - multiplex="Multiplexor") - - multiplexor._initValue = 0 - new_frame.add_signal(multiplexor) - static_part = get_child(pdu, "STATIC-PART", root_or_cache, ns) - ipdu = get_child(static_part, "I-PDU", root_or_cache, ns) - if ipdu is not None: - pdu_sig_mappings = get_child(ipdu, "SIGNAL-TO-PDU-MAPPINGS", root_or_cache, ns) - pdu_sig_mapping = get_children(pdu_sig_mappings, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) - get_signals(pdu_sig_mapping, new_frame, root_or_cache, ns, None, float_factory) - multiplex_translation[get_element_name(ipdu, ns)] = get_element_name(pdu, ns) - - dynamic_part = get_child(pdu, "DYNAMIC-PART", root_or_cache, ns) -# segmentPositions = arGetChild(dynamic_part, "SEGMENT-POSITIONS", arDict, ns) -# segmentPosition = arGetChild(segmentPositions, "SEGMENT-POSITION", arDict, ns) -# byteOrder = arGetChild(segmentPosition, "SEGMENT-BYTE-ORDER", arDict, ns) -# segLength = arGetChild(segmentPosition, "SEGMENT-LENGTH", arDict, ns) -# segPos = arGetChild(segmentPosition, "SEGMENT-POSITION", arDict, ns) - dynamic_part_alternatives = get_child(dynamic_part, "DYNAMIC-PART-ALTERNATIVES", root_or_cache, ns) - dynamic_part_alternative_list = get_children(dynamic_part_alternatives, "DYNAMIC-PART-ALTERNATIVE", root_or_cache, ns) - for alternative in dynamic_part_alternative_list: - selector_id = get_child(alternative, "SELECTOR-FIELD-CODE", root_or_cache, ns) - ipdu = get_child(alternative, "I-PDU", root_or_cache, ns) - multiplex_translation[get_element_name(ipdu, ns)] = get_element_name(pdu, ns) - if ipdu is not None: - pdu_sig_mappings = get_child(ipdu, "SIGNAL-TO-PDU-MAPPINGS", root_or_cache, ns) - pdu_sig_mapping = get_children(pdu_sig_mappings, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) - get_signals(pdu_sig_mapping, new_frame, root_or_cache, ns, selector_id.text, float_factory) + get_frame_from_multiplexed_ipdu(pdu, new_frame, multiplex_translation, root_or_cache, ns, float_factory) if new_frame.comment is None: new_frame.add_comment(get_element_desc(pdu, root_or_cache, ns)) @@ -1281,60 +1395,10 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ time_offset = get_child(cyclic_timing, "TIME-OFFSET", root_or_cache, ns) time_period = get_child(cyclic_timing, "TIME-PERIOD", root_or_cache, ns) - if cyclic_timing is not None and event_timing is not None: - new_frame.add_attribute("GenMsgSendType", "cyclicAndSpontanX") # CycleAndSpontan - if minimum_delay is not None: - new_frame.add_attribute("GenMsgDelayTime", str(int(float_factory(minimum_delay.text) * 1000))) - if repeats is not None: - new_frame.add_attribute("GenMsgNrOfRepetitions", repeats.text) - elif cyclic_timing is not None: - new_frame.add_attribute("GenMsgSendType", "cyclicX") # CycleX - if minimum_delay is not None: - new_frame.add_attribute("GenMsgDelayTime", str(int(float_factory(minimum_delay.text) * 1000))) - if repeats is not None: - new_frame.add_attribute("GenMsgNrOfRepetitions", repeats.text) - else: - new_frame.add_attribute("GenMsgSendType", "spontanX") # Spontan - if minimum_delay is not None: - new_frame.add_attribute("GenMsgDelayTime", str(int(float_factory(minimum_delay.text) * 1000))) - if repeats is not None: - new_frame.add_attribute("GenMsgNrOfRepetitions", repeats.text) - - if starting_time is not None: - value = get_child(starting_time, "VALUE", root_or_cache, ns) - new_frame.add_attribute("GenMsgStartDelayTime", str(int(float_factory(value.text) * 1000))) - elif cyclic_timing is not None: - value = get_child(time_offset, "VALUE", root_or_cache, ns) - if value is not None: - new_frame.add_attribute("GenMsgStartDelayTime", str(int(float_factory(value.text) * 1000))) - - value = get_child(repeating_time, "VALUE", root_or_cache, ns) - if value is not None: - new_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) - elif cyclic_timing is not None: - value = get_child(time_period, "VALUE", root_or_cache, ns) - if value is not None: - new_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) - + store_frame_timings(new_frame, cyclic_timing, event_timing, minimum_delay, repeats, starting_time, time_offset, repeating_time, root_or_cache, time_period, ns, float_factory) if pdu.tag == ns + "CONTAINER-I-PDU": - pdus = get_children(pdu, "CONTAINED-PDU-TRIGGERING", root_or_cache, ns) - signal_group_id = 1 - singnals_grouped = [] - for pdu in pdus: - ipdu = get_child(pdu, "I-PDU", root_or_cache, ns) - # pdu_sig_mapping = get_children(ipdu, "I-SIGNAL-IN-I-PDU", root_or_cache, ns) - pdu_sig_mapping = get_children(ipdu, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) - # TODO - if pdu_sig_mapping: - get_signals(pdu_sig_mapping, new_frame, root_or_cache, ns, None, float_factory) - new_signals = [] - for signal in new_frame: - if signal.name not in singnals_grouped: - new_signals.append(signal.name) - new_frame.add_signal_group(get_element_name(pdu, ns), signal_group_id, new_signals) - singnals_grouped += new_signals - signal_group_id += 1 + get_frame_from_container_ipdu(pdu, new_frame, root_or_cache, ns, float_factory) else: pdu_sig_mapping = get_children(pdu, "I-SIGNAL-TO-I-PDU-MAPPING", root_or_cache, ns) @@ -1360,6 +1424,7 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ get_signals(signal_to_pdu_maps, new_frame, root_or_cache, ns, None, float_factory) # todo BUG expects list, not item else: logger.debug("Frame %s (assuming AR4.2) no PDU-TRIGGERINGS found", new_frame.name) + new_frame.fit_dlc() return new_frame @@ -1677,7 +1742,10 @@ def load(file, **options): for frame in db.frames: sig_value_hash = dict() for sig in frame.signals: - sig_value_hash[sig.name] = sig._initValue + try: + sig_value_hash[sig.name] = sig._initValue + except AttributeError: + sig_value_hash[sig.name] = 0 frame_data = frame.encode(sig_value_hash) frame.add_attribute("GenMsgStartValue", "".join(["%02x" % x for x in frame_data])) result[bus_name] = db diff --git a/src/canmatrix/formats/cmjson.py b/src/canmatrix/formats/cmjson.py index 8e522ad9..459df00c 100644 --- a/src/canmatrix/formats/cmjson.py +++ b/src/canmatrix/formats/cmjson.py @@ -87,7 +87,7 @@ def dump(db, f, **options): "offset": number_converter(signal.offset), "is_big_endian": signal.is_little_endian is False, "is_signed": signal.is_signed, - "is_float": signal.is_float + "is_float": signal.is_float, }) symbolic_frame = {"name": frame.name, "id": int(frame.arbitration_id.id), @@ -131,7 +131,9 @@ def dump(db, f, **options): "is_float": signal.is_float, "comment": signal.comment, "attributes": attributes, - "values": values + "values": values, + "is_multiplexer" : signal.is_multiplexer, + "mux_value" : signal.mux_val } if signal.multiplex is not None: symbolic_signal["multiplex"] = signal.multiplex @@ -210,7 +212,7 @@ def load(f, **_options): new_signal.unit = signal["unit"] if signal.get("multiplex", False): - new_signal.unit = signal["multiplex"] + new_signal.multiplex = signal["multiplex"] if signal.get("values", False): for key in signal["values"]: diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index b9e031df..7f3c5ca3 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -125,14 +125,21 @@ def dump(in_db, f, **options): if whitespace_replacement in ['', None] or {' ', '\t'}.intersection(whitespace_replacement): logger.warning("Settings may result in whitespace in DBC variable names. This is not supported by the DBC format.") + if db.contains_fd and db.contains_j1939: + db.add_frame_defines("VFrameFormat", + 'ENUM "StandardCAN","ExtendedCAN","StandardCAN_FD","ExtendedCAN_FD","J1939PG"') + logger.warning("dbc export not fully compatible to candb, because both J1939 and CAN_FD frames are defined") + + elif db.contains_fd: + db.add_global_defines("BusType", "STRING") + db.add_attribute("BusType", "CAN FD") + db.add_frame_defines("VFrameFormat", 'ENUM "StandardCAN","ExtendedCAN","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","StandardCAN_FD","ExtendedCAN_FD"') + elif db.contains_j1939: + db.add_global_defines("ProtocolType", "STRING") + db.add_attribute("ProtocolType", "J1939") + db.add_frame_defines("VFrameFormat", 'ENUM "StandardCAN","ExtendedCAN","reserved","J1939PG"') + if db.contains_fd or db.contains_j1939: - if db.contains_fd: - db.add_global_defines("BusType", "STRING") - db.add_attribute("BusType", "CAN FD") - elif db.contains_j1939: - db.add_global_defines("ProtocolType", "STRING") - db.add_attribute("ProtocolType", "J1939") - db.add_frame_defines("VFrameFormat", 'ENUM "StandardCAN","ExtendedCAN","StandardCAN_FD","ExtendedCAN_FD","J1939PG"') for frame in db.frames: if frame.is_fd: if frame.arbitration_id.extended: @@ -223,6 +230,8 @@ def dump(in_db, f, **options): name = normalized_names[signal] if compatibility: name = re.sub("[^A-Za-z0-9]", whitespace_replacement, name) + if name[0].isdigit(): + name = whitespace_replacement + name duplicate_signal_counter[name] += 1 if duplicate_signal_totals[name] > 1: # TODO: pad to 01 in case of 10+ instances, for example? diff --git a/src/canmatrix/tests/ARXML_min_max.arxml b/src/canmatrix/tests/ARXML_min_max.arxml new file mode 100644 index 00000000..f3dac73b --- /dev/null +++ b/src/canmatrix/tests/ARXML_min_max.arxml @@ -0,0 +1,608 @@ + + + + + + VectorAutosarExplorerGeneratedObjects + + + SYSTEM + + + System + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster + + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU + + + /VectorAutosarExplorerGeneratedObjects/FRAME/New_Frame + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_1 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_2 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_3 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_4 + + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_5 + + + /VectorAutosarExplorerGeneratedObjects/PDUS/New_Frame_NewPDU + + + /VectorAutosarExplorerGeneratedObjects/PDU_GROUP/PduGroup_3d1efacc48324fb6a458184295d222c5_Rx + + + + + + + New_CanCluster + + + New_CanCluster + + + 250000 + + + CANChannel + + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f + + + + + NewFrameTriggering_da879414224fd9a2 + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/framePort_fee56426c0f5d2a3 + + /VectorAutosarExplorerGeneratedObjects/FRAME/New_Frame + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewPduTriggering_a1c914924e7a9908 + + + STANDARD + CAN-FD + 1 + + + + + NewSignalTriggering_b62ee9d4c50e6c9a + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/SP_cef6f2b8d73546568794359c9a2a4f5c_Rx + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal + + + NewSignalTriggering_7cfa964bc203bb08 + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/SP_7a4fcad1cfba48098e94f0573468de09_Rx + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_1 + + + NewSignalTriggering_88b663171f0a13df + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/SP_e9dbba2d6e3b4114a534d69dc7282b13_Rx + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_2 + + + NewSignalTriggering_c692530680bd7c7e + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/SP_19f4ade4ae0242e883eea84e083b9108_Rx + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_3 + + + NewSignalTriggering_69ccfba3cb53e752 + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/SP_ce5f248122604afdb1440f8a7ac1b295_Rx + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_4 + + + NewSignalTriggering_b195eb23b91e65a9 + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/SP_8df6e862731f403c82dd1a92f9f19830_Rx + + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_5 + + + + + NewPduTriggering_a1c914924e7a9908 + + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Connector_New_ECU_1c8171768535fd8f/PP_d757904cffa04e799d91690b59226ace_Rx + + /VectorAutosarExplorerGeneratedObjects/PDUS/New_Frame_NewPDU + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_b62ee9d4c50e6c9a + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_7cfa964bc203bb08 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_88b663171f0a13df + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_c692530680bd7c7e + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_69ccfba3cb53e752 + + + /VectorAutosarExplorerGeneratedObjects/New_CanCluster/New_CanCluster/CANChannel/NewSignalTriggering_b195eb23b91e65a9 + + + + + + + CAN + 250000 + + + + + + + ECU_INSTANCES + + + New_ECU + + /VectorAutosarExplorerGeneratedObjects/PDU_GROUP/PduGroup_3d1efacc48324fb6a458184295d222c5_Rx + + + + Controller_New_ECU_26c2009afd6ed0f5 + + + + + + + + + + + + + + Connector_New_ECU_1c8171768535fd8f + /VectorAutosarExplorerGeneratedObjects/ECU_INSTANCES/New_ECU/Controller_New_ECU_26c2009afd6ed0f5 + + + framePort_fee56426c0f5d2a3 + IN + + + PP_d757904cffa04e799d91690b59226ace_Rx + IN + + + SP_cef6f2b8d73546568794359c9a2a4f5c_Rx + IN + + + SP_7a4fcad1cfba48098e94f0573468de09_Rx + IN + + + SP_e9dbba2d6e3b4114a534d69dc7282b13_Rx + IN + + + SP_19f4ade4ae0242e883eea84e083b9108_Rx + IN + + + SP_ce5f248122604afdb1440f8a7ac1b295_Rx + IN + + + SP_8df6e862731f403c82dd1a92f9f19830_Rx + IN + + + + + 0 + + + + + FRAME + + + New_Frame + 8 + + + PduToFrameMapping_a48ffcd274baecd2 + MOST-SIGNIFICANT-BYTE-LAST + /VectorAutosarExplorerGeneratedObjects/PDUS/New_Frame_NewPDU + 0 + + + + + + + PDUS + + + New_Frame_NewPDU + 8 + + + SignalPduMapping_d12425b0cf87e337 + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal + MOST-SIGNIFICANT-BYTE-FIRST + 0 + PENDING + + + SignalPduMapping_cbe48419bd90be0c + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_1 + MOST-SIGNIFICANT-BYTE-FIRST + 1 + PENDING + + + SignalPduMapping_37669ae8aab1d57d + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_2 + MOST-SIGNIFICANT-BYTE-LAST + 16 + + + SignalPduMapping_7de6d326c0e389eb + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_3 + MOST-SIGNIFICANT-BYTE-FIRST + 32 + PENDING + + + SignalPduMapping_32ed7fa6bba2303c + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_4 + MOST-SIGNIFICANT-BYTE-FIRST + 56 + PENDING + + + SignalPduMapping_c205706ea96dfa5c + /VectorAutosarExplorerGeneratedObjects/I_SIGNALS/New_Frame_NewPDU_NewSignal_5 + MOST-SIGNIFICANT-BYTE-FIRST + 2 + PENDING + + + + + + + I_SIGNALS + + + New_Frame_NewPDU_NewSignal + OVERRIDE + 8 + + + + /VectorAutosarExplorerGeneratedObjects/BASE_TYPES/New_BaseType + + + + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/New_Frame_NewPDU_NewSignal_d3ad4ded3d1f5a52 + + + New_Frame_NewPDU_NewSignal_1 + OVERRIDE + 4 + + + + /VectorAutosarExplorerGeneratedObjects/BASE_TYPES/New_BaseType + + + + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/New_Frame_NewPDU_NewSignal_1_97dba33bf5006571 + + + New_Frame_NewPDU_NewSignal_2 + OVERRIDE + 16 + + + + /VectorAutosarExplorerGeneratedObjects/BASE_TYPES/New_BaseType + + + + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/New_Frame_NewPDU_NewSignal_2_c4d5cde179c23521 + + + New_Frame_NewPDU_NewSignal_3 + OVERRIDE + 12 + + + + /VectorAutosarExplorerGeneratedObjects/BASE_TYPES/New_BaseType + + + + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/New_Frame_NewPDU_NewSignal_3_545262b7a6cd1260 + + + New_Frame_NewPDU_NewSignal_4 + OVERRIDE + 2 + + + + /VectorAutosarExplorerGeneratedObjects/BASE_TYPES/New_BaseType + + + + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/New_Frame_NewPDU_NewSignal_4_7c569e4203cfd6a3 + + + New_Frame_NewPDU_NewSignal_5 + OVERRIDE + 1 + + + + /VectorAutosarExplorerGeneratedObjects/BASE_TYPES/New_BaseType + + + + /VectorAutosarExplorerGeneratedObjects/SYSTEM_SIGNALS/New_Frame_NewPDU_NewSignal_5_0fa1a7a828ef955d + + + + + BASE_TYPES + + + New_BaseType + 16 + NONE + + + + + COMPUMETHODS + + + New_Frame_NewPDU_NewSignal_Encoding + SCALE_LINEAR_AND_TEXTTABLE + + + + 0 + 255 + + + 0 + 1 + + + 0 + 1 + + + + + + + + New_Frame_NewPDU_NewSignal_1_Encoding + SCALE_LINEAR_AND_TEXTTABLE + + + + 0 + 16 + + + 0 + 1 + + + 0 + 1 + + + + + + + + New_Frame_NewPDU_NewSignal_2_Encoding + SCALE_LINEAR_AND_TEXTTABLE + + + + 0 + 65534 + + + 0 + 0.125 + + + 0 + 1 + + + + + + + + New_Frame_NewPDU_NewSignal_3_Encoding + SCALE_LINEAR_AND_TEXTTABLE + + + + 0 + 4094 + + + -400 + 0.5 + + + 0 + 1 + + + + + + + + New_Frame_NewPDU_NewSignal_4_Encoding + SCALE_LINEAR_AND_TEXTTABLE + + + + 0 + 0 + + + 0 + 1 + + + 0 + 1 + + + + + + + + New_Frame_NewPDU_NewSignal_5_Encoding + SCALE_LINEAR_AND_TEXTTABLE + + + + 0 + 20000 + + + -20000 + 2 + + + 0 + 1 + + + + + + + + + + SYSTEM_SIGNALS + + + New_Frame_NewPDU_NewSignal_d3ad4ded3d1f5a52 + + + + /VectorAutosarExplorerGeneratedObjects/COMPUMETHODS/New_Frame_NewPDU_NewSignal_Encoding + + + + + + New_Frame_NewPDU_NewSignal_1_97dba33bf5006571 + + + + /VectorAutosarExplorerGeneratedObjects/COMPUMETHODS/New_Frame_NewPDU_NewSignal_1_Encoding + + + + + + New_Frame_NewPDU_NewSignal_2_c4d5cde179c23521 + + + + /VectorAutosarExplorerGeneratedObjects/COMPUMETHODS/New_Frame_NewPDU_NewSignal_2_Encoding + + + + + + New_Frame_NewPDU_NewSignal_3_545262b7a6cd1260 + + + + /VectorAutosarExplorerGeneratedObjects/COMPUMETHODS/New_Frame_NewPDU_NewSignal_3_Encoding + + + + + + New_Frame_NewPDU_NewSignal_4_7c569e4203cfd6a3 + + + + /VectorAutosarExplorerGeneratedObjects/COMPUMETHODS/New_Frame_NewPDU_NewSignal_4_Encoding + + + + + + New_Frame_NewPDU_NewSignal_5_0fa1a7a828ef955d + + + + /VectorAutosarExplorerGeneratedObjects/COMPUMETHODS/New_Frame_NewPDU_NewSignal_5_Encoding + + + + + + + + PDU_GROUP + + + PduGroup_3d1efacc48324fb6a458184295d222c5_Rx + IN + + + + + + + \ No newline at end of file diff --git a/src/canmatrix/tests/test_arxml.py b/src/canmatrix/tests/test_arxml.py index 8f7c346e..e7516cd7 100644 --- a/src/canmatrix/tests/test_arxml.py +++ b/src/canmatrix/tests/test_arxml.py @@ -17,7 +17,9 @@ def test_ecu_extract(): def test_get_signals_from_container_i_pdu(): here = pathlib2.Path(__file__).parent matrix = canmatrix.formats.arxml.load(str(here / "ARXMLContainerTest.arxml")) - assert matrix["New_CanCluster"].frames[0].signals[0].name == 'PDU_Contained_1_Signal1_905db81da40081cb' + assert matrix["New_CanCluster"].frames[0].signals[0].name == 'Header_ID' + assert matrix["New_CanCluster"].frames[0].signals[1].name == 'Header_DLC' + assert matrix["New_CanCluster"].frames[0].signals[2].name == 'PDU_Contained_1_Signal1_905db81da40081cb' assert matrix["New_CanCluster"].frames[0].signalGroups[0].signals[0].name == 'PDU_Contained_1_Signal1_905db81da40081cb' def test_get_signals_from_secured_pdu(): @@ -25,3 +27,8 @@ def test_get_signals_from_secured_pdu(): matrix = canmatrix.formats.arxml.load(str(here / "ARXMLSecuredPDUTest.arxml")) assert matrix["CAN"].frames[0].signals[0].name == 'someTestSignal' assert matrix["CAN"].frames[0].signals[1].name == 'Signal' + +def test_min_max(): + here = pathlib2.Path(__file__).parent + matrix = canmatrix.formats.arxml.load(str(here / "ARXML_min_max.arxml")) + assert matrix["New_CanCluster"].frames[0].signals[0].is_signed == False \ No newline at end of file diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index ee809033..5da1ff9a 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -460,6 +460,40 @@ def test_frame_compute_dlc(): frame.calc_dlc() assert frame.size == 2 +def test_frame_fit_dlc(): + frame = canmatrix.canmatrix.Frame() + for i in range(1,9): + frame.size = i + frame.fit_dlc() + assert frame.size == i + for i in range(9,13): + frame.size = i + frame.fit_dlc() + assert frame.size == 12 + for i in range(13,17): + frame.size = i + frame.fit_dlc() + assert frame.size == 16 + for i in range(17,21): + frame.size = i + frame.fit_dlc() + assert frame.size == 20 + for i in range(21,25): + frame.size = i + frame.fit_dlc() + assert frame.size == 24 + for i in range(25,33): + frame.size = i + frame.fit_dlc() + assert frame.size == 32 + for i in range(33,49): + frame.size = i + frame.fit_dlc() + assert frame.size == 48 + for i in range(49,65): + frame.size = i + frame.fit_dlc() + assert frame.size == 64 def test_frame_find_unused_bits(): frame = canmatrix.canmatrix.Frame(size=1) From f1af9f08b05a18c6623935672a2f4c9b3d4bcc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 19 Aug 2019 12:52:53 +0200 Subject: [PATCH 17/39] DBC: fix #242. J1939 and FD Frames in dbc candb seems to be queasy about the order of the VFrameFormat attribute definition. This Patch seems to generate a dbc, which can contain can_fd AND J1939-frames. --- src/canmatrix/formats/dbc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 7f3c5ca3..f01bc49b 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -127,7 +127,7 @@ def dump(in_db, f, **options): if db.contains_fd and db.contains_j1939: db.add_frame_defines("VFrameFormat", - 'ENUM "StandardCAN","ExtendedCAN","StandardCAN_FD","ExtendedCAN_FD","J1939PG"') + 'ENUM "StandardCAN","ExtendedCAN","reserved","J1939PG","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","StandardCAN_FD","ExtendedCAN_FD"') logger.warning("dbc export not fully compatible to candb, because both J1939 and CAN_FD frames are defined") elif db.contains_fd: From 1b026d6a3167f94596545e101be029cb09810ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 19 Aug 2019 14:29:29 +0200 Subject: [PATCH 18/39] XLSX fixes (#392) XLSX: fixes #240 (signal init value in excel template) XLSX: fixes #367 (2.) --- examples/cmTemplate.xlsx | Bin 9688 -> 14597 bytes src/canmatrix/formats/xls.py | 31 ++++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/examples/cmTemplate.xlsx b/examples/cmTemplate.xlsx index 3d9654eb98e41ea761dfbb4aed98d08ac6f59c51..ea68b1184220dfa01d6145a4d0f8e137fdc050ec 100644 GIT binary patch literal 14597 zcmeHu1y>!}wl(hV!QI_mf&_O65ZvM5F2Oyx1lNPRLvRfQcXx;2!2$&MPUqft)1B`3 z{egFD49?iasWmBf&9#^8S;}&dP*`9vU~phyU}RuqMD{X8;9y`zuwY=AU~mxc#O>`| z%AF`f!lM(dStSO$};Wm}44CH)A>tI-n^Qs?DxS`H0^va=GGnzFN8ydh@co1SJE32Ob-R`mJP z99+28zPHV(V5hZrmp*kN9V-}@L_T;#=7j3?S5fI0uWpVR-PMKzP)W* zCTZryTgXC=@ss`<+0opq|7m>)pH^Q3XtBrJ;shyAZx6 z?uV?$)M723yu#-MxhVQXx&n;n+cJ?Uu<4St-$+2q5<2av{xc!u-eQf8F~3urL4VU$00|kb`7H3q22fAsg)wSfMAMwqcPxR4{!4XG?oB z3qsF_zt*;C^? zd=x(XNNxg2Or!IZb9fGzQdO0r3Q32|+P^>Hg>GmskaWiMTTPRCf56(#j#{i`$1()G zW2+T18Gk#$gE78d_wbJ{BU@Tz^v5@EAi==!!Qj9>Y*_x~HSYFK0AqW5z#lR3e>?~r z6c|D7^?&TpbWRvzZ}rVHt4T7hM)#RyZdF)0=Cd`wR|Uf9iw!X8R)VQeqxeVSYGL7kMX>;V)M%>EdFp2FausrVJWl$jo!&GldZ8 zM}*y2tB5c`lMJ+&1(M;j0M=c%5ml`(4fLX^I1=E+Ff$8$46b3C1=RrzC0-S>JRc<^ z&>81~zXbOM?F%1B}RkEFHs8++$1RXmClDu~AA_+YV)8>?SaEsllI;ygh33%Dw@O36-9vXz|eOZ*@N~?3vaSV)Ha>1)~tN z#Ds~VEoMktk0aBHAyca2&0fenz08&OC^|*VIaY0Xf5ytCtFWo3^R>dCitYqbyVHL* zNss_As|_zu;dLmMil)$NR_7H-4vAIA&K4CH{($YUvX1cn(mqy|^-|euW8Lw7(6IXD z&?-gIXF`Jdj;&{$mvHQE>{e(*J_aGI4?erun&AdS68A==+g_@8DyT%!hu%m_wc#a5jMlDLqpo z0}%SSn3cUyrt_YuJyT!lV#CrSfiE@2^Q?#;1WRB5(u^w#DU1H2>moEip7re4ukzOw zSTeod_|x8x7>36IwNDL~@?;O)L$Yio#<>xeacq6%EGPGkgHsZ@*`oEa+5n5| zgu!{P^2x3U@7HP1x40;03-?`LdY1kz7BAz@-G5KgTycKkl7( zG3og1Ui-?G-h#buNb8#O;z12;TAdDU;Bk5b?OT&}7Hd;WQfETo62uEL!r%;s z-yj{$_{K$wtYUE6rb3rNG-Wf!J2Qwfa+mJ(>_|~S4nQd)2Ex;MpV&D|7K!15O*^T`<-My;^3LNBfw7!reIeg{t3rwh;qhSIV%g;x8w^SHEocvz zq)V@4JD+BNWpqcX9T%ED;ncgN!$vt@VD!WC%Z{RloI0W-w}&+RB!3P?}s_g;uk^9vM9fC#QgH2-Ia?=pysx~k*n z=;zKp+=L7-%HGBsSkcc~X2K_wT7^#xygpuBQt8mv#K2c4;3sW7JzilCQRnRR5RWHP zS%pG%E0+{a+)_go!VXR7$Xo?`5Xdc?m_4AC+BkyURm~+PJ+2IeBS1Dj;gepYl2+O zFgaNFxl%_rw+^3q$oMi#gF0vw|(JQk}8*$Fa{vpVmGfW9jh(%<{ zyrSG&2+Q@PRk5}-pxbslrUzS<*;>AETH1!8m)&aO!#B3bp5k_pS)9q~dPIk?yHtN# zmIeIc+(ukM=Pj|r8#Y)3d$V#C$DogZJJ=&Pzo@7&?xfmxM4`-nNQ3*aV)geXyaPF#LxKpc zas)`!yfg2uw_2gQ*7a*gU+(N~m^(Tc2J*E(rAJe#k8(917{}Sbf$TUI7AF9ZAA!QBnvPPdKP|7he}xD^n~<=_feQ)IT4%R zHp2E^Kx@(83m?P7UFB!cH^-oOOz|rgJ6oEWxj6qjq5FBl_MdbPln5*Kv7&|CNw4;# z3%Ti{y)IGY!B%ZnMlsBkG3I)Xw?*g>3ZgA3RjnOz+Fv^N;kb3WIf7{#OtQT|pse=K zmS^~( zjFq@kt8yAYdgIa&%4cBNnI!*>zt`>%cXVKbm0f@>YJ9@W9f~agxhlxh{cuDgc(KhW z>lzmMO%=bZ7M25ZdXB#E6jgCOX;B)EGdodVaX<`kw_!kz(@8NswSpy8zXoerl~^Uq zYP%x&$Jm2hoV)Yu^vzBK5Ba;5A1fd6e5M}$F_kg=q4zo(lmHJQfq~)uZTfyr9Qz*= zmy{xBzru>-e-3#|0!8Gev-3t@!Msh20PEC9a>`{zyLL~j#LP1xq2cK!e^(HHka-&{ z0yFZ5bUgVO)Z1#oHvoEUOv&($>_~Jb$_Qex<-s3J7BTXx#czH9|!ec#+=9d%=Pjp0m2;&~7q76nY3Sy=6l#n>n z_`Xhq4)6$fo5vlf32nv@jM6jk@lryewX6O#UeOPM!96JQi}3|k;nj~b06+gM+8XeO zzC$UW?=kBkn^&p3*F6%PVY)4G42dBjXe?4cgyCxu4JDoNGdxHkQn)(u_`(TzRbS}e zeI&E6r$a#5aM!fA-6y8fL6fwXcut|>=P+lJwUpIt5nj!_ZVwRn7WP<3Q`?enlV+vt z-^Oh?vui7*fn)_K;!TR=9W9A+yNT&&K28#x)xLaO#O_Wy$WREq;aRIuHT$CyU$@!% z$=Cj*CGivE&?mZjtIjA7;C0E|EwZXB@P-3nBBde>Ok_nkStHNr0z#;FIUAvRLGcbe>&$4S#^%LZIZP|*DF*3feiq~ z`=}e{jM^P$EehSMri~~rqO%h`f-QWv$*3%s9(>SXF^cQPy|YcT6^6LcKkqxgf3yp- zpdGllkP8^W5&ow=L658t z`(stWJFk$9(r*r4<$U4I}IU(IHfQ1nZD;EmKSc{ z%pJ0JaP&q7=p?zx6F=-cA*$oN?sJ%KNa*<@x0SacEf+Fr8_7!a%I`qET2?(FVVKW5 zOa?2)eYjvcw&r`yHez{fd>j%rg8*#UCoEODUQVf3tA4mOaTBuU+20((jaCkd{%Cc6172_}=5 zpgD`>)l9jFnd}ZyoKK4CUobJAK)u_)uYi$(c3O!rU|=!$e{^<#RwFK!X0~Q5KRjWb?Nc1hT7Q3loL$yl+%;- z5jt*^mtimtsh$8$3RY@gx+ZDH7AY$C?9%N>nY8=Z^Y5>(k2-iZ5;<{M)}l+DgVhwZ zrrpYM>8pYg(Fqbwm)-19U<-?m9Rd>AfQ&u1?g1^{R*z42%s?jeEj)oqk*#+nr&6y+ zn}*GV1I_zcYF;UBE(I5|VK`(cj_hC&1+Aqf13t?xuhZeMK!@fC4Ze~fI z(p-=Dfb7%g3we`rHzE*)3a}n^@v6a}y?W1bSaHGthJF0WH=pD>=%Wy{Xg>NV=MHe? zx~am*COZM(}_B( zaRCE^FOZJwM~{4!or`Yj7*5M49Z@e=gig7RL=`3OT&Vd<{p*Fnv!H9CU|zWmeLYg^KG)i#_IGq}QOF*i zzJr^sB!$jmj1&eD#*m)|@lNYzzxp#cF^={1d9pX6W{(t zGsQCs+IRhc5m3b2(;GjrNH&nXv_{>3aZLQGFseSn!49)HGJK9o+{utqb;>HNA1x&$ znlyO%Vr-qMc%;O3Ug*6k`BsSN>}%if(yf6JOJ-#o4n7ICIik);2~&!eF6lS?RTIz> zULWY3A52DDDkmDT_RFE45W*vcPP|>vGrp+DiD!)I^{2+1)b_Eyz8oD+ql}Mv@+W!y zf&73Ullwa{#|D}ws-x)8fWrp)BHZ25YX?jhjbe4m@b~OWOttM%Y4^g+hfqd^?4*yO z>4TJfYRgIytuKnR^<^$PvjTLrojL-=1@AG>L})jKIF+hQJS^rB7X_Yti#N_*^t*UE zMh>c%LzII;am!sB-C}u|*Jy&LeQI+(Qp)E9!oG15i{>wDmUQe{Gw?)ivTxAheX{zX zPC{e0O+gNPf*Ui8Fwh{FqMJ}qYT+;;)O;?}wvD)?Td{s&jlEmsU8&V9cXCgUfPDkB zto~l^wrCrUM8x?)Z*jPNc|mc`&QnJ8_K616y_d&uMT{7zLkC{CQ_hZ#he(d}0_nzB z#2cfwhp|O%v9Yy8_-ejdw{@muL3I})s0b!I4x>OPPkrp+TadPQqMqXb!@(Ruq9tET z(B)B78fTVkd>h^%_F9f7F*rFC9e+nq;3hxuD$2DSu2f8^)%czpixYp02OU61Ufd8s z-Ksj-&u7;rwiY&1i=N)N27mHni#=QH%%SB>(gk7Af+F6W<;OAY2;&|w%p-|UH$t%p zh7Fz9l{R9fD)X71z!JzQ;aEN|ingxf#1!|jIhqh^4T(Kl{zCfDXhEl-xc;5;cX@^i zC5^iU*pX}-l&$sHfx&U`tYRLtg4B%?S=bo(Fvwi%{V}!x%(0Jg*!S*btb29kBy?qj z!^`MdlC;&dt*I6cR6qv)uXcNor_4DVye?}Yuxi?dFRpV!ZR&CpRzU4pd2tQXxrWH2 z42Ey`<-lJwT~zT**AWqtu*FNMNoC0}Mxr%)l`_BbR_ZS83Kxpy-uE zO^lMQANHWznf?<3)q8JgbjF9e#9evr zP3#tiZ(QWMd{;>gYu?yhJ0V;mj2h{_UAuD~vZY7vUkhW-7s`FQbdFpBcX>78v{esF z7AfGFZ>A)lFC`nRef%R*-q_(vF*0-91Qb?;m!q=IE$^eUqJU4e;LgHSdX*C->D-Lx z?%uSHsWKq77V4vMdj;tq^1KUrta2{s)-NXZ66?}NC^ORf7WkoH!{#Hte&zfnewO*h z@#;hh8|#(4u#MuaX_N# zxgq+gM7f(8TSYW3(knZRRdkp#F%b#q`*fBT7k3l|4tO*)zWaJyp=jLf=jTy%so3|$ z$aknN3F;>qA`5xV1cb@<5pWi}Bj)9172M@5m=mTOX?0`p8?k!xyf?f*UfB(+psCg+NM*mP(xk^Vi{q@ZIpZ(PW0W z-ktcy^Mta1c`MGZ!8MTf^0tzTmmSi&xzKfl$;@ZqW66G2;TKU>n!scScG%T*ckKGE9L)s-ZR!5v7Y+ z+iJqYO44BTY1hH_CY@?r^Oluln!B%)K1nS+yxPnqa<+x;!Lr`h48Vp~wgw<4l!QIE|8Mz`X)aCt=GQ_Ngq zYOovMteGQ(zr+eX*^a^M-(a)<8s%c;f{<;z8~Yns^&@YH)X{VqCm>~Wab0qlcg8_l>}-jh%FabIK8jrAy#9h_?z?Yf}#!cB-)9Jl)`3edNyk0f>~dJ|%_ z29vcME+pT}daIyID8($(lbi7E*JaidZxyVdEUo)nwBkvoYI^KwRnoJnqab8PTvU)C zrNS9`Ffr~N$PPwrI$o_;HjJFJcHe?KCce?4-{y`jDGS#pR#8LWP7D85QXcM0Jf)0& z=h+|f!Q%@BvqnE@>?c+9K0#n9xm0>gUXidhX-WCFmWu4CkY)ZU4>2E~X;Ed9Vtlx- zC-RVDm01ANl4eBzZf8F8w2ZI10ar;0%F_Kv&Fk>O};%r->c_$sX|SkMH7HwgL-ga zMDu(_Kc#X*p#Ue5H8>Mj3lq4=6+w0(D@gre@uuK1keB;&WtNo<+ReVFG&0c^1gVt{ z*DTONGNR;C^`p|N)ShKQ4GxNwk?n0;@n$}aXA|NT=JlK?s}E*)c4q{4Aq&oR{cX74 zoiKIb5lajgV>s7z(uWo=eD-KD~$EXiEt?cNs6d7Qv%P6Gr^F}=clXN=TAq=8jZEhGeX!ZvK zy%{~a1Ho~SY7K*-W3^ZZ0^xB4je4*U&9ztu10|)ZWYOOV|Q5gSYHUrIR4DUq|-hyVEnRWwO zN)!U0Ig>?erf1veG#EW6(5db!d74<$EDv&pwFTiU6&%r1nh*sMBF>LZ`BO*tQ7Tuh zPjEDkyCIEdQZN&2Q{0vz)tz@(V@UbfO4Zjhibu))Hr-R1Tyut&-3mT1U0H*aDS?5B zcKNNIMA5V;hZ;og=9DX;61i9!l60AM#MS04HEE;i20*JR;L2OOgh_Qxp0x?uyji^s(w_*PfjT1*fK~fEnb<^#?E*=-he4s*h zUsD`4W523aV5M<1ngY?YX?(0%Ms^cqKwB-eEd_%SU;NGT^|y%O-gl0geN|p@r7++a zLz?W(ZIt$_2x&`uY42kBUg4Ap@@($8=H|lk*t+lPqezA8>Arn!8+D+HVq_C0}Y= zj*KjtY`ig6iO3(v zl$whD3MrazPQ#1;qPRiAfMSLvMN=WY+D4PiN`a6jo`d`cz7fO0qw0--tiq2)Ryf=a z8}5UbYkUL*;unoE$b6>)Bbg-{eQR}7KuFk+1_+jmlXwr$Yooz_Yx>X&8b+;< zo|BXVGr94y2cU9jQmBuSsm61nhwXJ7mH{o5hH56TobzUG~bjUTN|t)jRsi{)$^MCx_qN>7l{!LnQ)B==mh z>=I4UyVR;mUZ)$b>k>PsGva)*X{mO`PonbFl=QdDyZfJWlQtQ61L-GVu`7$N^gY!SZQ&pjbIh0poiFz#0DMKtN{`I zVfwlQ?g$2XaFmKC_&ojAQ_JTJepkz+o3pR`wfj_2dC9@1s;DV-P=-U%!df^V9Mnu1 zBq&(kA)hoFaMyKA;oWgG!Q5*SU$*C5wpVY?Q9_DM8~fG( zL+xav3UY8L*O;X-2Jwq)vm;|Yq%w~W)y`0CCb=o9>dKY#u- z_zbX#_eJV%hu2ztZrPf>bI#9a{BDBV1riMWonFx^1B~DxdZB{0*#6yd{SUqVJ@}dG zW~wRt(Q)lSUGzh9F*yAs7l&6H$*k>m)C#dS4ha~kRrbM4Fc*07O)}-Nn$p`35)+<2 z7gGIpYn~K%J*riuA%^>wj!Ismb^oi@q=5)(&U}&#z>TA0; z0X?C2z-tQ33Mb-0(}h6(x_3ds@BAh)6?A=e>2@enIvM#XmHOQE@`=9hxWwTR1RcP( z*x?7ZdZ;KpM^}*!(#eEunx`?%V98<6??VY-d^wm9Fj?a%qPi3lLrzD&p4`yJeRq(| znu^md>=3X3Rm?e9oW)uIt1>C>(JoxKGQyqr1#NG~?pY>4vtz}bmePF`t;bAkfkh$i zk;+%YHFXIbmrcqiuSn=&ts{6Q0De4aB?yvb*ZwJ^i^A~PfcXVPj=$5!_^NPT07R%& z&<|*1_7Ba0iM_2YNWtm+lP>DYBi5izjdt7z)X1~wOhQ?@CTBQ21R<_^uPar^JwJxsIRL%~1UtJXVLyN~U z!<5a&YcU-^w$(+htD%Jok~$PdeYvRMat{^!#)yLTZG@USHlf<8+*3MOh=BZ3k>$g- zig$z99MxHWe}D7qg~I2cD*o!^!p?}-K!w72XK2jR!fN$rUIIePvSZc5I0Dsm`}<9n z#rzSN1A3)%U?lu>Q>FS0)=q18X@nT{IzpChVn;5)^*j-c2b&v#y!_j3UZq%k)oSR( z-QCTZ58!OcWO6N8sQz2u-`cBQlP>ZHULCCLl_{+! z%BnmZO6!D44Ddr=v(x?OiNtwe$6P{2*r1!`^%T^A=b#1V2Y4{_<$U-uy}ZBap^a8V}twj zQYEC}<`BksBzm@@aTbddknBRCZ!(~?6h(=kUg3%2L9qL8`O6W!e(g`z9h@eX9|SE! zSA@D-D7o){UBh<4_M^BHS4x49oXnrWcE`yVMwxt(ryr4$r5jC*!vI90e_+v<4cTQS z5QEx5u??gG1~;`gQFgL-aAq-ab#}40{bQ#GBp3Xz*aIrwV zK!`FIw_6#CG8QxiC+4n}nq6+}Bwj*3H_&a53dO~N?$}|5!}6;h+bIa9Ik_@_aZFHU}ML_>tUY-S^`h@ zdf84uK88J~sCY2Bhu#N6mggDb+osc{(1d*Bq9X@xS^jAhyMbu0vmtIpji|1phW;O- zS13N%Kv@J`E3eK|PcII^!^?yDwV}!{HF@s-gF@|OpMa%4eD0z&xDEYfPZ(VsTQ@6I z8~@0|P;CsT91st&Ks-eM3lHs`%>K(l(477I2u@g2>?6e*JXd%R+uKO=`JOGKidwB0 zmzk|rYKN%T5g3ADI8G&;!m=4DbEMg9$+;EiJf1^xz#!tQhV2D?Y+4zXdaD{GdZi;R zM6{jZl!?UZlx@{hrqhSU(!I4~?9FgMz0(-N@Q$EHKTtfNKyP3SO~lil{WYN<#AjU= zS{FFsc}+GFc>$`>OI&W~x{M-Ni2#d0PbqvuV}5dda_I9obMtaIv`kTGga-HETiW}1 zubSbf2U4l|B-w`$crK-ZaZ;P78k{|}|X zz%teJ0HD&|hvY=W!}myyy!dngu1+?i3ahD3bhR^v;GQ4-BNfG3uxXdYi>aSYf&x)k zsMw=hmy65U6nfY49RCvVYB*gmE2^GTjKa2blwOG>vTbUC^Af5E$`*P5h}g%AO4xVP z*@D2OV3G#B_q(7TCYRbkyRHecFX1w^3;nTmZd@yNy+$GBx=u^!6q>+99Sf3sa8bY0 z?6tpD81LG&x0oCQg~*HgNrtG_1;nuwWZvcp8cwn(Zkbekh*QqRanY141hhsxTlV97BA7mVLi@ywo{T}!N33H45kPo!#esR{}(0<^Wa(Mgwzw9-v81s|X`?&ft z>N@@JV(;H^ei!@xLXwC7oAmd06hsuDF6SrpEXL<8G%I_V- zUntS!KT-bHPy8L>_cqTj1bV8U2>+?de{1^u4)l9L{|hJrR6l?o)PI2fT;BhV@_T*v z3#FUxC(2){z2B{WFIs+C(=q(C{;gzT`R)8?3G+MXUyFrbkYHdij9_5@P&)h$@YgKw w&j2yZe+Kw>&iA|dU&HC2%}v?AZTz6?gV#tg1fs13z7%f`<-Ox-m`z) zT0f@OnyH#z)zx2rUDfhZ;1K8_FfcG6@AF(_Kz1FHc(H#w@#-5JFGA;d1Ub$nlIKIa}g|%C&AldKEUtyV>Ke3+x19q8Ne|U8#9+ z2Ci@J1ubVzFLQNc-6J~$RpK+58s?%5n9iEL8X5y#nk)$&s^T&#h+Y*xP*s33#+}rf z?mE61CF!tLO`wP$SUj+sNBL81Kg#4F>e)mn3l8oIV6GF?W zn!9j?)<#T?MoJG2OM%e)vc+-d<4Pa{_YAF62szbB$m7j~V_g0m(~-Uw`hH)ZxTEJv zeCMJcyY@g*P@tbXF>6nQcHh?Ga+LsOdZjW8ZG2D?Zy?ETHOExxq+F4r9N`nAj5M58 zarkL!iC&hva0 zff^-Ya6-Id3_)fc1N>VUK~>n{7H3s04Z9U=j88MpVTqELM3S1cs>!Ot-Q5SCiHPBv z>5n7TmcflVMe};>$l5HmQLuG;cYDn)ebA%U{)qU9eN^{NQfr5uy~g!nbFuJyEmFYb>md=!k zE%?^=#?|O8gr7WU>*}lYx1TB12P+W=a3$NSinwvkC@r0gWrZKxS z2V1(Vnu)@4>&8R@x7Sd2I|Fp(m80q=Qqk`}ffipGXq%pz=M9GjqJ6rn<2Vieu=1HB z<-54EX*qpv!~koWaI{9nxac$*9%|jE3E(Pqh{X=|-l(sBOEnfT{hOIUVwg@<6!Rl0 zqh+^xdExcDm^?Jz>G9IoMe2>|l)kOqdj)`GZ%!f6NSA>C0;B9bQ7Bcx<93f@_~i%s zxaw`jrPra{9aQ_bc=S4Db|iXyn?W4RU(8uhocad(Do&0I@9syE9-&@BHDz$M=~hF$ZZRL)T(x?eNWki%$!;V0>igTZ7MSCcxW4?E+gA(GaO6k&0- z#0w2V6j@$I>FgblXtlU?9adGT_~OaY#CouX4M?Dmbntq3q3BvA-UJH| z;x&v(g9&=KtyNv!dz)%EjyD$U1T%Hxbemz0;Dfz>+kDprrZ*9O;FqX?3pe!f@n44`IBc;o!2Q?twSjVQnrdb%WqO`>3FOn1th%$Y?o_^;XgKIS`#FNsfh^Y%Xdl_a6Utvh z7@QK_MtrlSP@0~yrZAMbGxK_q!l`II9vR7~Hajc$Egb`LO?ES|pgP@C>1_6eTI|o^anM2*5*R(QU;q z+$2D7jEL#EIu8DZERzR&uVT4m(G2mRWXLSEI@c!R-KV(>VSKM)gBwBS*78-?m}?;q zVkr5@xz$>K^hBURA2y#4QN@hoti|1{_|qE8hi>6+synt;DxS{V>=UU zCNZ#J-fASa;|L+o-*`APELZ^$KwX3%t5%83KSBth&+~EjjuOKV$D~J9KpSRq38oX9 z&wR_dT0ER_IXx2yzO{Qnll|q$Z?B$_QXu`#iAc4B@3lqdx$+eJZy zX@kuZ2ES(EcL_4O{QnRxQ|9lqfOc zQ0v`9WtFxNa%o#8UB!Zle*yJ(RFJ7Mr!hKc_+zU*ZKD85Dl!co-|CEqATml;tL=xc zDYW3H^`924Q|?kHn~U-}E(w`>82V_My6~qwBvwb4$*RVKIS=nVLS)NIw*3M_y35xHR-sKe%|hhKHiBphyY{ z?FX12x}?~eY0TC zKZoZhX)6Vez;!aA1fBA~nQM}m3Je1r=fUW{AtKIQB(nB-YdBrcK^q2%OvrmOd{W+_iDNQop)uF4Ka;AEx3p+N*wS=`8d@OUOuX_xynzX z)rb5pz`|r4fvVfDB$ zBlesu7_abb^!F_grDtH5yQ0UJRGy3oJ#}nHT6ZH|K5rocha)=99QAcMcgG0A<^6nN zRtgeoW6Sn^NH>xfXYN#T$tx_9Tr($XgrF8BJ>dOjVliVG7&_ zq!RI4=xo_!V=B#9B=|Mb4n^sMZ3XSKUzcuNu|7vK#k7! z=W>!J1I}5kw{0f(;^n2j@gt2T@2jJmbvtl1PuNe(R%=wT7;wu|)unzUk(n$ng+n#k z+$9Z%Nrc*D)8i)2d|zjg>G$E2J;T+FFjoQImvZL;lXGnEuFB6*l2IiZ+3jBnI=j}x zLJ#Q)$sXlYG>$Bml(~x2)0bDh(7f`}w!Rb}3Uj@pu+HjkmKVlUQ^(ZF?XViyg6Bg2 zs0{)r{)T>PPku&gppr`M{89ff%y14%MP}MgV-<#?NLl^_FqgmKw<^&;8!R?Mj^I#| zr_#5SnGxY7VtB=|U9L!0wUCV0Hl2WTTOD+qR#8e~ol$FjGp5wYmFM-D)sri$fW*16 zwC=|)O%qq1?`PI)$Ig}g1NVc!F9NZpSoLHNLu%BQjm@lNeO-F8&;^ zz@nJlNM0}8_;&|FANVW;$#EV&iO0ZYx{5hC54e$JK+osA(;u`mZpvD&cV+3sKd+6p zk4DYm&i0PPo<%)j-q0dgCm^GA3G$6>C?VtS3oGW%_KIvMBlGMFOXc1;!geSgzpqzR+H*wXOhsOxldUCW z`o3QST?~8$S5n1Rv}EA)Spg!ZDRY9iZaCe())tq$NoFF0Q z7OSUbG-nuLcf=hDa>KEBg?DCg>s8<-hCqn(Fr|mH<`uVKvSVN2Fb~ zQf&=^p>6Xamal-8p>7|@fdWf7Wuwyrzl*wfd_}ivr`r1R#8>c+Uzr~ueW06paR^iR z;90@8E%JBgGA~j|SY@o`?|iB+*hJ;;qM$v;gTUHQEr|bm^t|_IyM!I|J#F(x0(PjG zV+(a*fl+Y_mtEdr&zXHHMl;@&WskXUq@`m=|!ZO zd`b^1^(Ad%$%cb*@Ix}<;02bNtd9l~t+YtvCsquFw>RfgxP49zjwDuM-5t}`w)&Lu z4k0jDq2cmpo1{o><*^-lrbtY_05PM-!e+2e_ zKpzlL2TMUIS)mFuHkL>$e1}7#@%oLwVHpe(Gscbww$CC#qx)QeK~mIdP&%zuBEEstJiT>SN&aI^)Z-bK8`x#ta1ll1A`t>1=`nr%sD)=D0))#qPY0wt=UsxoC#aiWDlvl zpZbn`%FS)aAiUYry7*`dBK1hF`mHhGnh&K?I!T@Jq5MY87ymw;U70*y3KaeaY|RgY zyTx~O(>bFck)g0by0^*9Jr*c?oPlWvvGjs#(zGhFh)C1i9c zcsMbhGF7A^eZ0){ap#i5CRJDAh1~BH$Vf{MedYDOY10l$Yx(=hzO-#Q(0rh1W!tHv z4PB}%86*-{Wu}AC(Tn6xJRUs3PVNC*k{z^X21l_uY z1@u5F0&H&0RaUvjOJ2Bnrl$B zcXQ^pm+y(i60#*?Zy5hEU)Hqf8V z_#Rt6!^*O=RTnL;x=nv^Y=R!rvGSkvg`lHXgcomU%22q_$;DJwHPr2b;#@gpT4erO zr73dus@pNT)8fX0VykAnl(r|2o#jU_+K1yoU?n-I1ImoS&Nt|)Zn{?|pGQ701Y*=k zIK!qmg0h3q^Q2bSn@1>eI+PeZi(jMJ2*HmIT{yemQHZsGW?>LY^3s z()*BnOqZhI&>{jv?XesrR>yZq^Va&N)n%q1x`v~nO5f=CS=63F#>a~+FLhYLbqHT`-Wes))Zz~r^$dfgJiS8Z)D@N)7#|9URO-p!G{jM z6Sd>i@3|5O22NEse5u!}Tt}j|J>F0om>BKfX+ppnq9-~Tb6Fx-0;SdfKD@66>LZi$ z$+jpW>QWe)?RoEa>#lNb?nU)WzS>{KE!*m`)i%&$rz;#wy1tncH`HL#Qa0=<+-h_r z^?;R9qK{`n(jT+HYL$r-;J80-OdBFE@{}BM12C@WHH^8fN?EL|R^!*Wfoq+B6m)#_NW*$Qc|^kG8@FmOiRaG`qJ%E=P|BJiIuoNNiz*2= zJe!vJB-0>pX%+!ar@fEfghcIT<5*6az^g(0W`B!2{+)++yLfS_AL5Q+W?*v?JLn_9 zp}1MUjBm5dow8%if;#oPjOI;LAZXfm$b2VtKuRvKtVf{j_C$U2x>(QwD+Ra4R}s6I z^Ls{Jq_&O!ZW)*$Ma~dsYXmwLw|=q(;B{bqwI7@2J3D>vCnFz%-0)WxlXg}1Y-0~A zPYg&$r~%(j*u$A*vXL&3=XxC>k8;|8YlrL~+Fd)H2;=W1H>^E!sw0jUQtJBr+IDr! zVLpm}r9m$*r0ij2Z{PyTV=FN%fDLkttwphog(x@h>0>8U| z#4MxPc~j~5I3pB=so0f?54!ICL$*R3M}vNw@Ax-qVH!`_dOxrcF}E8#wc4*jq`nf6 zCm3&kHjS0`agMcK3$>UJ2$!Cfh0|reZm6h?=)w>65dRc|8YP@6#!V2trF8eDI~efb zi}rmeo9svJr>CDeb_-0C0Nv+ZZ87}6#V6ih@oDU6;Pw)ljIK7;qJOoSUq82_6j$w1 znNXh8fcGf?N}H+~_}F||k3~wGgllZBYt*GVe&bZZ>)A1=xT?e=nBm9ko8{$vR_^y1 zS4Y~wUX7hMkRkV96gso|ScV~SUD;D29d6q=>7^+2A9Pq7k&OkZ)?DADP9f*k?2*sg zjt;9ehu9a9C{+=2*tF$J#lc1z=sx-f&|k9URX>sAu;_)FOEI${s|XECBg^u^;%_5` zqy}`oGPWx$LB=Am!o_HhedCxb+++-Jb zu>C@g&htm}=dNko3RA%6(zq-`xx2LzL4smznM<#fZ`BtEnKf`&sx&kmx&_3QBjZSE z$hrXAATC8t^VhQB9%+nL1m)rnm<$LE((jC#$b;s{0;8a_5;$cV#4shJF%n}vvmfM< z<~NB%WsV=A>Gbh<|tvXNu;IurZ~lbpP7|Hp}f*ODOug-=E6Wr(3@YsE%Fc; zi*DHid@tucJL+3!P;@_L_U!}C6d0|ZA+)I!>Izz|nmt6kzboH^Ta!JaYdi= z*pwUiajeRtb%oy6fF=vJ;l20bNyGK{ec8vo$MEBiltyT1-3^evwwDFQcnP}ALcV&# zTTGt!STDd=7gbG%@*G&?|C$khjyjOPYFmG$M&deTpX*s6r(O}XH*Cv-Fj@Ic(r=qc z0EF%2ws^JSIo*L5*P^e`5TdHOq8)sEpA7R>q;2U}m?))m!&NlG!CEMdybHRAo*Xfk2kE!70s(tV|+?u6Mst3VO)PDC_Duz~ii1J^~NjTv&NWvfX<4 zA&NIygF>K2A)Es@lSCM`S@ul@)(;D0uSH#ZkpTtfDQ8YR3IdDwO%6HfUUgAQ7@Mcu z49o)K%_6Hog`-Dy9vqx|>xnZ<1Eu{HS;%62e2pXx*+o&FOq^f*C{&MATaG&pIi!4k z=JwpT$M1!n(^$pe|Av65{}=%~N0S%-dn+!!gsb;1T{iDj-adQM=hC-Ec)U!o;iM>b zB+O*vxe9U1Cc&x>K0L(U8+#xNasWBc#q0X>;J>+k4s z^|yGZ0x&Y&j`uVq^OzH}LpykWa`K*Z7?li4*SxPvQ&Yj!-5s@MMrJ zw&~=KJY$_ceBS~+L#!roiW9MX)fYQX?=E3&^tBCp9nt9n#u0N$1VuGiOV+vd#~k=8 zcMX%eZdwVyO;uc?>(uEEBEd8Ge5|30NNGVp@=QGD=NWCL-Q9KKbn>usc60pp6x(US zd*3A?QH%I--YkpqM9O8mO?EIB6L>m}WfS(o_jR_@wOahGAU931npAVT-@#n%jh?%x)2N*>x zlI3}bgr1He((D`2ZFwjpS^nA>0b_hzq`ho;8U!5!OX!POW(Wfk^ehDC*y1^BT!jPv z;tMP@3Q4HVP&$3^zz5V>ss~18=qo3^C+yM6GYF#gH*}~F1+$JY)W`bxVfQBcdg#89 z6Sx$WqNH`E8EaQ=(8stl&N5ANxB??hV=DEBgr8IWb?(;T(G`2~wRmNE4;r_>VfO8_ zah@Z-fX;`8ApN6fKY0IZ_VxvIv_$M|ou8`qU`cBni(q3P`C>RFiV9-%ey2!Wd=DCtYg!R{4t+HcI;Z>j~49jqC}Mblh=6Hm%0$SfTRN$@lrr8FFxr6oUf8^_=m z9nz&W7zCw>8cAulghmD?wnwase^1%jTy1iTFY5bQt8Yn$Xhvplc$xJIU0P zS2+CNZD8j(TA2AncEqL?rM*H0~iUlE(-wVza?>OB!SMLy9$V-EYf zU%kfvvEsH>d6SIaS?Qu9MyJAGcWR-igT1@v60vmBX?4_sVtEkxW>9S}sMp;e1ol6@{#QSIOy@>x;RFs#3e4e8qAV|+w M`g7=$lfK;jKW^NzhX4Qo diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index 05aba8ff..86639a81 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -322,6 +322,22 @@ def parse_value_name_column(value_name, value_str, signal_size, float_factory): return mini, maxi, offset, value_table +def read_additional_signal_attributes(signal, attribute_name, attribute_value): + attribute_mapping = {"initial_value": "GenSigStartValue"} + if not attribute_name.startswith("signal"): + return + if attribute_name.replace("signal.", "") in vars(signal): + command_str = attribute_name + "=" + command_str += str(attribute_value) + if len(str(attribute_value)) > 0: + exec(command_str) + elif attribute_name.replace("signal.", "") in attribute_mapping: + signal_attribute = attribute_mapping[attribute_name.replace("signal.", "")] + if len(str(attribute_value)) > 0: + signal.add_attribute(signal_attribute, attribute_value) + else: + pass + def load(file, **options): # type: (typing.IO, **typing.Any) -> canmatrix.CanMatrix motorola_bit_format = options.get("xlsMotorolaBitFormat", "msbreverse") @@ -341,7 +357,7 @@ def load(file, **options): db.add_frame_defines("GenMsgNrOfRepetitions", 'INT 0 65535') # db.addFrameDefines("GenMsgStartValue", 'STRING') launch_types = [] # type: typing.List[str] - # db.addSignalDefines("GenSigStartValue", 'HEX 0 4294967295') + db.add_signal_defines("GenSigStartValue", 'HEX 0 4294967295') db.add_signal_defines("GenSigSNA", 'STRING') # eval search for correct columns: @@ -426,9 +442,10 @@ def load(file, **options): # eval launch_type if launch_type is not None: - new_frame.add_attribute("GenMsgSendType", launch_type) - if launch_type not in launch_types: - launch_types.append(launch_type) + if len(launch_type) > 0: + new_frame.add_attribute("GenMsgSendType", launch_type) + if launch_type not in launch_types: + launch_types.append(launch_type) # eval cycle time try: @@ -506,11 +523,7 @@ def load(file, **options): for additional_index in additional_inputs: # todo explain this possibly dangerous code with eval if "signal" in additional_inputs[additional_index]: - command_str = additional_inputs[additional_index].replace("signal", "new_signal") - command_str += "=" - command_str += str(sh.cell(row_num, additional_index).value) - if len(str(sh.cell(row_num, additional_index).value)) > 0: - exec(command_str) + read_additional_signal_attributes(new_signal, additional_inputs[additional_index], sh.cell(row_num, additional_index).value) new_frame.add_signal(new_signal) new_signal.add_comment(signal_comment) From 287d01bfbfe65ab13a312ad9209731516ddd4cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 20 Aug 2019 14:22:31 +0200 Subject: [PATCH 19/39] fix for #288 (#393) --- src/canmatrix/cli/convert.py | 7 +++++++ src/canmatrix/formats/xlsx.py | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index c005ca01..22587179 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -143,6 +143,13 @@ def main(): # type: () -> int parser.add_option("", "--xlsMotorolaBitFormat", dest="xlsMotorolaBitFormat", default="msbreverse", help="Excel format for startbit of motorola codescharset signals\nValid values: msb, lsb, msbreverse\n default msbreverse") + + parser.add_option("", "--xlsValuesInSeperateLines", action="store_true", + dest="xlsValuesInSeperateLines", default=False, + help="Excel format: create seperate line for each value of signal value table\tdefault: False") + + + parser.add_option("", "--jsonExportCanard", dest="jsonCanard", action="store_true", default=False, help="Export Canard compatible json format") diff --git a/src/canmatrix/formats/xlsx.py b/src/canmatrix/formats/xlsx.py index 27d7b38d..db47eea2 100644 --- a/src/canmatrix/formats/xlsx.py +++ b/src/canmatrix/formats/xlsx.py @@ -104,9 +104,11 @@ def write_excel_line(worksheet, row, col, row_array, style): def dump(db, filename, **options): # type: (canmatrix.CanMatrix, str, **str) -> None motorola_bit_format = options.get("xlsMotorolaBitFormat", "msbreverse") + values_in_seperate_lines = options.get("xlsValuesInSeperateLines", True) additional_signal_columns = [x for x in options.get("additionalAttributes", "").split(",") if x] additional_frame_columns = [x for x in options.get("additionalFrameAttributes", "").split(",") if x] + head_top = [ 'ID', 'Frame Name', @@ -244,7 +246,7 @@ def dump(db, filename, **options): signal_style = sty_norm # valuetable available? - if len(sig.values) > 0: + if len(sig.values) > 0 and not values_in_seperate_lines: value_style = signal_style # iterate over values in valuetable for val in sorted(sig.values.keys()): @@ -264,6 +266,7 @@ def dump(db, filename, **options): temp = getattr(sig, item, "") back_row.append(temp) + write_excel_line(worksheet, row, col + 2, back_row, signal_style) write_excel_line(worksheet, row, col, [val, sig.values[val]], value_style) @@ -299,7 +302,8 @@ def dump(db, filename, **options): back_row.append(temp) write_excel_line(worksheet, row, col, back_row, signal_style) - + if len(sig.values) > 0: + write_excel_line(worksheet, row, col, ["\n".join(["{}: {}".format(a,b) for (a,b) in sig.values.items()])], signal_style) # next row row += 1 # set style to normal - without border From 749642fcffd2bbab187294ed7115a724d03ae619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Wed, 4 Sep 2019 11:39:31 +0200 Subject: [PATCH 20/39] switch from optparse to click (#236) (#394) --- examples/compare.py | 2 +- examples/convert.py | 2 +- src/canmatrix/cli/compare.py | 86 +++-------- src/canmatrix/cli/convert.py | 290 ++++++++++------------------------- 4 files changed, 107 insertions(+), 273 deletions(-) diff --git a/examples/compare.py b/examples/compare.py index 3cf058ac..f1307db6 100755 --- a/examples/compare.py +++ b/examples/compare.py @@ -3,4 +3,4 @@ sys.path.append('..') import canmatrix.cli.compare -canmatrix.cli.compare.main() +canmatrix.cli.compare.cli_compare() diff --git a/examples/convert.py b/examples/convert.py index c23a2036..8ceb51a4 100755 --- a/examples/convert.py +++ b/examples/convert.py @@ -3,4 +3,4 @@ sys.path.append('..') import canmatrix.cli.convert -canmatrix.cli.convert.main() +canmatrix.cli.convert.cli_convert() diff --git a/src/canmatrix/cli/compare.py b/src/canmatrix/cli/compare.py index 4e421974..d31a0df1 100644 --- a/src/canmatrix/cli/compare.py +++ b/src/canmatrix/cli/compare.py @@ -25,75 +25,37 @@ from __future__ import print_function import logging -import optparse import sys import typing +import click import attr import canmatrix.compare logger = logging.getLogger(__name__) +@click.command() +@click.option('-v', '--verbose', 'verbosity', help="Output verbosity", count=True, default=1) +@click.option('-s', '--silent', is_flag=True, default=False, help="don't print status messages to stdout. (only errors)") +@click.option('-f', '--frames', is_flag=True, default=False, help="show list of frames") +@click.option('-c', '--comments', 'check_comments', is_flag=True, default=False, help="ignore changed comments") +@click.option('-a', '--attributes', 'check_attributes', is_flag=True, default=False, help="ignore changed attributes") +@click.option('-t', '--valueTable', 'ignore_valuetables', is_flag=True, default=False, help="ignore changed valuetables") +@click.argument('matrix1', required=1) +@click.argument('matrix2', required=1) +def cli_compare(matrix1, matrix2, verbosity, silent, check_comments, check_attributes, ignore_valuetables, frames): # type: () -> int + """ + canmatrix.cli.compare [options] matrix1 matrix2 + + matrixX can be any of *.dbc|*.dbf|*.kcd|*.arxml|*.xls(x)|*.sym + """ -def main(): # type: () -> int import canmatrix.log canmatrix.log.setup_logger() - usage = """ - %prog [options] cancompare matrix1 matrix2 - matrixX can be any of *.dbc|*.dbf|*.kcd|*.arxml - """ - parser = optparse.OptionParser(usage=usage) - parser.add_option( - "-s", - dest="silent", - action="store_true", - help="don't print status messages to stdout. (only errors)", - default=False) - parser.add_option( - "-v", - dest="verbosity", - action="count", - help="Output verbosity", - default=0) - parser.add_option( - "-f", "--frames", - dest="frames", - action="store_true", - help="show list of frames", - default=False) - parser.add_option( - "-c", "--comments", - dest="check_comments", - action="store_true", - help="check changed comments", - default=False) - parser.add_option( - "-a", "--attributes", - dest="check_attributes", - action="store_true", - help="check changed attributes", - default=False) - parser.add_option( - "-t", "--valueTable", - dest="ignore_valuetables", - action="store_true", - help="check changed valuetables", - default=False) - - (cmdlineOptions, args) = parser.parse_args() - - if len(args) < 2: - parser.print_help() - sys.exit(1) - - matrix1 = args[0] - matrix2 = args[1] - - verbosity = cmdlineOptions.verbosity - if cmdlineOptions.silent: + if silent: # Only print ERROR messages (ignore import warnings) verbosity = -1 canmatrix.log.set_log_level(logger, verbosity) @@ -102,25 +64,25 @@ def main(): # type: () -> int import canmatrix.formats # due this import we need the import alias for log module logger.info("Importing " + matrix1 + " ... ") - db1 = next(iter(canmatrix.formats.loadp(matrix1).values())) + db1 = canmatrix.formats.loadp_flat(matrix1) logger.info("%d Frames found" % (db1.frames.__len__())) logger.info("Importing " + matrix2 + " ... ") - db2 = next(iter(canmatrix.formats.loadp(matrix2).values())) + db2 = canmatrix.formats.loadp_flat(matrix2) logger.info("%d Frames found" % (db2.frames.__len__())) ignore = {} # type: typing.Dict[str, typing.Union[str, bool]] - if not cmdlineOptions.check_comments: + if not check_comments: ignore["comment"] = "*" - if not cmdlineOptions.check_attributes: + if not check_attributes: ignore["ATTRIBUTE"] = "*" - if cmdlineOptions.ignore_valuetables: + if ignore_valuetables: ignore["VALUETABLES"] = True - if cmdlineOptions.frames: + if frames: only_in_matrix1 = [ frame.name for frame in db1.frames @@ -144,4 +106,4 @@ def main(): # type: () -> int # to be run as module `python -m canmatrix.compare`, NOT as script with argument `canmatrix/compare.py` if __name__ == '__main__': - sys.exit(main()) + sys.exit(cli_compare()) diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index 22587179..ef21938a 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -27,234 +27,106 @@ import logging import sys import typing +import click import canmatrix.convert logger = logging.getLogger(__name__) - -def main(): # type: () -> int - canmatrix.log.setup_logger() - from optparse import OptionParser - - usage = """ - %prog [options] import-file export-file - - import-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym - export-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym|*.py - - following formats are available at this installation: - \n""" - +def get_formats(): + input = "" + output = "" for suppFormat, features in canmatrix.formats.supportedFormats.items(): - usage += suppFormat + "\t" if 'load' in features: - usage += "import" - usage += "\t" + input += suppFormat + "\n" if 'dump' in features: - usage += "export" - usage += "\n" - - parser = OptionParser(usage=usage) - # parser.add_option("-d", "--debug", - # dest="debug", default=False, - # help="print debug messages to stdout") - - parser.add_option( - "-v", - dest="verbosity", - action="count", - help="Output verbosity", - default=1) - parser.add_option( - "-s", - dest="silent", - action="store_true", - help="don't print status messages to stdout. (only errors)", - default=False) - parser.add_option( - "-f", - dest="force_output", - help="enforce output format, ignoring output file extension (e.g., -f csv") - parser.add_option("", "--deleteZeroSignals", action="store_true", - dest="deleteZeroSignals", default=False, - help="delete zero length signals (signals with 0 bit length) from matrix\ndefault False") - parser.add_option("", "--deleteSignalAttributes", - dest="deleteSignalAttributes", default=None, - help="delete attributes from all signals\nExample --deleteSignalAttributes GenMsgCycle,CycleTime") - parser.add_option("", "--deleteFrameAttributes", - dest="deleteFrameAttributes", default=None, - help="delete attributes from all frames\nExample --deleteFrameAttributes GenMsgCycle,CycleTime") - parser.add_option("", "--deleteObsoleteDefines", action="store_true", - dest="deleteObsoleteDefines", default=False, - help="delete defines from all ECUs, frames and Signals\nExample --deleteObsoleteDefines") - parser.add_option("", "--recalcDLC", - dest="recalcDLC", default=False, - help="recalculate dlc; max: use maximum of stored and calculated dlc; force: force new calculated dlc") - parser.add_option("", "--skipLongDlc", - dest="skipLongDlc", default=None, - help="skip all Frames with dlc bigger than given threshold\n") - parser.add_option("", "--cutLongFrames", - dest="cutLongFrames", default=None, - help="cut all signals out of Frames with dlc bigger than given threshold\n") - - - - parser.add_option("", "--arxmlIgnoreClusterInfo", action="store_true", - dest="arxmlIgnoreClusterInfo", default=False, - help="Ignore any can cluster info from arxml; Import all frames in one matrix\ndefault 0") - - parser.add_option("", "--arxmlUseXpath", action="store_true", - dest="arxmlUseXpath", default=False, - help="Use Xpath-Implementation for resolving AR-Paths; \ndefault False") - - - parser.add_option("", "--arxmlExportVersion", - dest="arVersion", default="3.2.3", - help="Set output AUTOSAR version\ncurrently only 3.2.3 and 4.1.0 are supported\ndefault 3.2.3") - - parser.add_option("", "--dbcImportEncoding", - dest="dbcImportEncoding", default="iso-8859-1", - help="Import charset of dbc (relevant for units), maybe utf-8\ndefault iso-8859-1") - parser.add_option("", "--dbcImportCommentEncoding", - dest="dbcImportCommentEncoding", default="iso-8859-1", - help="Import charset of Comments in dbc\ndefault iso-8859-1") - parser.add_option("", "--dbcExportEncoding", - dest="dbcExportEncoding", default="iso-8859-1", - help="Export charset of dbc (relevant for units), maybe utf-8\ndefault iso-8859-1") - parser.add_option("", "--dbcExportCommentEncoding", - dest="dbcExportCommentEncoding", default="iso-8859-1", - help="Export charset of comments in dbc\ndefault iso-8859-1") - - parser.add_option("", "--dbfImportEncoding", - dest="dbfImportEncoding", default="iso-8859-1", - help="Import charset of dbf, maybe utf-8\ndefault iso-8859-1") - parser.add_option("", "--dbfExportEncoding", - dest="dbfExportEncoding", default="iso-8859-1", - help="Export charset of dbf, maybe utf-8\ndefault iso-8859-1") - - parser.add_option("", "--symImportEncoding", - dest="symImportEncoding", default="iso-8859-1", - help="Import charset of sym format, maybe utf-8\ndefault iso-8859-1") - parser.add_option("", "--symExportEncoding", - dest="symExportEncoding", default="iso-8859-1", - help="Export charset of sym format, maybe utf-8\ndefault iso-8859-1") - - parser.add_option("", "--xlsMotorolaBitFormat", - dest="xlsMotorolaBitFormat", default="msbreverse", - help="Excel format for startbit of motorola codescharset signals\nValid values: msb, lsb, msbreverse\n default msbreverse") - - parser.add_option("", "--xlsValuesInSeperateLines", action="store_true", - dest="xlsValuesInSeperateLines", default=False, - help="Excel format: create seperate line for each value of signal value table\tdefault: False") + output += suppFormat + "\n" + return (input, output) + +@click.command() +# global switches +@click.option('-v', '--verbose', 'verbosity', count=True, default=1) +@click.option('-s', '--silent/--no-silent', default=False, help="don't print status messages to stdout. (only errors)") +@click.option('-f', '--force_output', help="enforce output format, ignoring output file extension (e.g., -f csv).\nSupported formats for writing:\n" + get_formats()[1]) +@click.option('-i', '--input_format', 'import_type', help="give hint for input format\nSupported formats for reading:\n" + get_formats()[0]) +@click.option('--ignoreEncodingErrors/--no-ignoreEncodingErrors', 'ignoreEncodingErrors', default=False, help="ignore character encoding errors during export (dbc,dbf,sym)") +# manipulation and filter switches +@click.option('--deleteObsoleteDefines/--no-deleteObsoleteDefines', 'deleteObsoleteDefines', default=False, help="delete defines from all ECUs, frames and Signals\nExample --deleteObsoleteDefines") +@click.option('--deleteEcu', 'deleteEcu', help="delete Ecu form databases. (comma separated list)\nSyntax: --deleteEcu=myEcu,mySecondEcu") +@click.option('--renameEcu', 'renameEcu', help="rename Ecu form databases. (comma separated list)\nSyntax: --renameEcu=myOldEcu:myNewEcu,mySecondEcu:mySecondNewEcu") +@click.option('--deleteSignal', 'deleteSignal', help="delete Signal form databases. (comma separated list)\nSyntax: --deleteSignal=mySignal1,mySecondSignal") +@click.option('--renameSignal', 'renameSignal', help="rename Signal form databases. (comma separated list)\nSyntax: --renameSignal=myOldSignal:myNewSignal,mySecondSignal:mySecondNewSignal") +@click.option('--deleteZeroSignals/--no-deleteZeroSignals', 'deleteZeroSignals', default=False, help="delete zero length signals (signals with 0 bit length) from matrix\ndefault False") +@click.option('--deleteSignalAttributes', 'deleteSignalAttributes', help="delete attributes from all signals\nExample --deleteSignalAttributes GenMsgCycle,CycleTime") +@click.option('--deleteFrame', 'deleteFrame', help="delete Frame form databases. (comma separated list)\nSyntax: --deleteFrame=myFrame1,mySecondFrame") +@click.option('--renameFrame', 'renameFrame', help="increment each frame.id in database by increment\nSyntax: --frameIdIncrement=increment") +@click.option('--addFrameReceiver', 'addFrameReceiver', help="add receiver Ecu to frame(s) (comma separated list)\nSyntax: --addFrameReceiver=framename:myNewEcu,mySecondEcu:myNEWEcu") +@click.option('--changeFrameId', 'changeFrameId', help="change frame.id in database\nSyntax: --changeFrameId=oldId:newId") +@click.option('--setFrameFd', 'setFrameFd', help="set Frame from database to canfd. (comma separated list)\nSyntax: --setFrameFd=myFrame1,mySecondFrame") +@click.option('--unsetFrameFd', 'unsetFrameFd', help="set Frame from database to normal (not FD). (comma separated list)\nSyntax: --unsetFrameFd=myFrame1,mySecondFrame") +@click.option('--recalcDLC', 'recalcDLC', help="recalculate dlc; max: use maximum of stored and calculated dlc; force: force new calculated dlc") +@click.option('--skipLongDlc', 'skipLongDlc', help="skip all Frames with dlc bigger than given threshold") +@click.option('--cutLongFrames', 'cutLongFrames', help="cut all signals out of Frames with dlc bigger than given threshold") +@click.option('--deleteFrameAttributes', 'deleteFrameAttributes', help="delete attributes from all frames\nExample --deleteFrameAttributes GenMsgCycle,CycleTime") +@click.option('--ecus', help="Copy only given ECUs (comma separated list) to target matrix") +@click.option('--frames', help="Copy only given Frames (comma separated list) to target matrix") +@click.option('--signals', help="Copy only given Signals (comma separated list) to target matrix just as 'free' signals without containing frame") +@click.option('--merge', help="merge additional can databases.\nSyntax: --merge filename[:ecu=SOMEECU][:frame=FRAME1][:frame=FRAME2],filename2") +# arxml switches +@click.option('--arxmlIgnoreClusterInfo/--no-arxmlIgnoreClusterInfo', 'arxmlIgnoreClusterInfo', default=False, help="Ignore any can cluster info from arxml; Import all frames in one matrix\ndefault False") +@click.option('--arxmlUseXpath(--no-arxmlUseXpath', 'arxmlUseXpath', default=False, help="Use experimental Xpath-Implementation for resolving AR-Paths; \ndefault False") +@click.option('--arxmlExportVersion', 'arVersion', default="3.2.3", help="Set output AUTOSAR version\ncurrently only 3.2.3 and 4.1.0 are supported\ndefault 3.2.3") +# dbc switches +@click.option('--dbcImportEncoding', 'dbcImportEncoding', default="iso-8859-1", help="Import charset of dbc (relevant for units), maybe utf-8\ndefault iso-8859-1") +@click.option('--dbcImportCommentEncoding', 'dbcImportCommentEncoding', default="iso-8859-1", help="Import charset of Comments in dbc\ndefault iso-8859-1") +@click.option('--dbcExportEncoding', 'dbcExportEncoding', default="iso-8859-1", help="Export charset of dbc (relevant for units), maybe utf-8\ndefault iso-8859-1") +@click.option('--dbcExportCommentEncoding', 'dbcExportCommentEncoding', default="iso-8859-1", help="Export charset of comments in dbc\ndefault iso-8859-1") +# dbf switches +@click.option('--dbfImportEncoding', 'dbfImportEncoding', default="iso-8859-1", help="Import charset of dbf, maybe utf-8\ndefault iso-8859-1") +@click.option('--dbfExportEncoding', 'dbfExportEncoding', default="iso-8859-1", help="Export charset of dbf, maybe utf-8\ndefault iso-8859-1") +# sym switches +@click.option('--symImportEncoding', 'symImportEncoding', default="iso-8859-1", help="Import charset of sym format, maybe utf-8\ndefault iso-8859-1") +@click.option('--symExportEncoding', 'symExportEncoding', default="iso-8859-1", help="Export charset of sym format, maybe utf-8\ndefault iso-8859-1") +# xls/csv switches +@click.option('--xlsMotorolaBitFormat', 'xlsMotorolaBitFormat', default="msbreverse", help="Excel format for startbit of motorola codescharset signals\nValid values: msb, lsb, msbreverse\n default msbreverse") +@click.option('--additionalFrameAttributes', 'additionalFrameAttributes', default = "", help="append columns to csv/xls(x), example: is_fd") +@click.option('--additionalSignalAttributes', 'additionalSignalAttributes', default = "", help="append columns to csv/xls(x), example: is_signed,attributes[\"GenSigStartValue\"]") +@click.option('--xlsValuesInSeperateLines/--no-xlsValuesInSeperateLines', 'xlsValuesInSeperateLines', default = False, help="Excel format: create seperate line for each value of signal value table\tdefault: False") +# json switches +@click.option('--jsonExportCanard/--no-jsonExportCanard', 'jsonExportCanard', default=False, help="Export Canard compatible json format") +@click.option('--jsonExportAll/--no-jsonExportAll', 'jsonExportAll', default=False, help="Export more data to json format") +@click.option('--jsonMotorolaBitFormat', 'jsonMotorolaBitFormat', default="lsb", help="Json format: startbit of motorola signals\nValid values: msb, lsb, msbreverse\n default lsb") +@click.option('--jsonNativeTypes/--no-jsonNativeTypes', 'jsonNativeTypes', default=False, help="Uses native json representation for decimals instead of string.") +#sym switches +@click.option('--symExportEncoding', 'symExportEncoding', default="iso-8859-1", help="Export charset of sym format, maybe utf-8\ndefault iso-8859-1") +# in and out file +@click.argument('infile', required=1) +@click.argument('outfile', required=1) + +def cli_convert(infile, outfile, silent, verbosity, **options): # type: () -> int + """ + canmatrix.cli.convert [options] import-file export-file + import-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym + export-file: *.dbc|*.dbf|*.kcd|*.arxml|*.json|*.xls(x)|*.sym|*.py + \n""" - parser.add_option("", "--jsonExportCanard", - dest="jsonCanard", action="store_true", default=False, - help="Export Canard compatible json format") - parser.add_option("", "--jsonExportAll", - dest="jsonAll", action="store_true", default=False, - help="Export more data to json format") - parser.add_option("", "--jsonMotorolaBitFormat", - dest="jsonMotorolaBitFormat", default="lsb", - help="Json format: startbit of motorola signals\nValid values: msb, lsb, msbreverse\n default lsb") - parser.add_option("", "--jsonNativeTypes", - dest="jsonNativeTypes", action="store_true", default=False, - help="Uses native json representation for decimals instead of string.") - - parser.add_option("", "--ignoreEncodingErrors", - dest="ignoreEncodingErrors", action="store_true", default=False, - help="ignore character encoding errors during export (dbc,dbf,sym) ") - - parser.add_option("", "--additionalFrameAttributes", - dest="additionalFrameAttributes", default="", - help="append columns to csv/xls(x), example: is_fd") - - parser.add_option("", "--additionalSignalAttributes", - dest="additionalAttributes", default="", - help="append columns to csv/xls(x), example: is_signed,attributes[\"GenSigStartValue\"] ") - - parser.add_option("", "--ecus", - dest="ecus", default=None, - help="Copy only given ECUs (comma separated list) to target matrix") - - parser.add_option("", "--frames", - dest="frames", default=None, - help="Copy only given Frames (comma separated list) to target matrix") - - parser.add_option("", "--signals", - dest="signals", default=None, - help="Copy only given Signals (comma separated list) to target matrix just as 'free' signals without containing frame") - - parser.add_option("", "--merge", - dest="merge", default=None, - help="merge additional can databases.\nSyntax: --merge filename[:ecu=SOMEECU][:frame=FRAME1][:frame=FRAME2],filename2") - - parser.add_option("", "--deleteEcu", - dest="deleteEcu", default=None, - help="delete Ecu form databases. (comma separated list)\nSyntax: --deleteEcu=myEcu,mySecondEcu") - parser.add_option("", "--renameEcu", - dest="renameEcu", default=None, - help="rename Ecu form databases. (comma separated list)\nSyntax: --renameEcu=myOldEcu:myNewEcu,mySecondEcu:mySecondNewEcu") - - parser.add_option("", "--addFrameReceiver", - dest="addFrameReceiver", default=None, - help="add receiver Ecu to frame(s) (comma separated list)\nSyntax: --addFrameReceiver=framename:myNewEcu,mySecondEcu:myNEWEcu") - - - - parser.add_option("", "--deleteFrame", - dest="deleteFrame", default=None, - help="delete Frame form databases. (comma separated list)\nSyntax: --deleteFrame=myFrame1,mySecondFrame") - parser.add_option("", "--renameFrame", - dest="renameFrame", default=None, - help="rename Frame form databases. (comma separated list)\nSyntax: --renameFrame=myOldFrame:myNewFrame,mySecondFrame:mySecondNewFrame") - - parser.add_option("", "--frameIdIncrement", - dest="frameIdIncrement", default=None, - help="increment each frame.id in database by increment\nSyntax: --frameIdIncrement=increment") - - parser.add_option("", "--changeFrameId", - dest="changeFrameId", default=None, - help="change frame.id in database\nSyntax: --changeFrameId=oldId:newId") - - - parser.add_option("", "--deleteSignal", - dest="deleteSignal", default=None, - help="delete Signal form databases. (comma separated list)\nSyntax: --deleteSignal=mySignal1,mySecondSignal") - parser.add_option("", "--renameSignal", - dest="renameSignal", default=None, - help="rename Signal form databases. (comma separated list)\nSyntax: --renameSignal=myOldSignal:myNewSignal,mySecondSignal:mySecondNewSignal") - parser.add_option("", "--setFrameFd", - dest="setFrameFd", default=None, - help="set Frame from database to canfd. (comma separated list)\nSyntax: --setFrameFd=myFrame1,mySecondFrame") - parser.add_option("", "--unsetFrameFd", - dest="unsetFrameFd", default=None, - help="set Frame from database to normal (not FD). (comma separated list)\nSyntax: --unsetFrameFd=myFrame1,mySecondFrame") - - (cmdlineOptions, args) = parser.parse_args() - if len(args) < 2: - parser.print_help() - return 1 - - infile = args[0] - out_file_name = args[1] + canmatrix.log.setup_logger() - verbosity = cmdlineOptions.verbosity - if cmdlineOptions.silent: + if silent == True: # only print error messages, ignore verbosity flag verbosity = -1 canmatrix.log.set_log_level(logger, verbosity) - if cmdlineOptions.ignoreEncodingErrors: - cmdlineOptions.ignoreEncodingErrors = "ignore" + if options["ignoreEncodingErrors"]: + options["ignoreEncodingErrors"] = "ignore" else: - cmdlineOptions.ignoreEncodingErrors = "" + options["ignoreEncodingErrors"] = "" - canmatrix.convert.convert(infile, out_file_name, **cmdlineOptions.__dict__) + canmatrix.convert.convert(infile, outfile, **options) return 0 if __name__ == '__main__': - sys.exit(main()) + sys.exit(cli_convert()) From 29744761e1ce5460196aa8b2c5442a201c1dd428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 10 Sep 2019 11:04:52 +0200 Subject: [PATCH 21/39] [WIP] add Basic cli tests (#395) * add tests for global, manipulation and filter swithces of cli.convert * add basic cli test for cli.compare * fix some bugs, which were found by these tests --- requirements.test.py2.txt | 1 + requirements.test.py3.txt | 1 + requirements.tox.txt | 1 + requirements.txt | 1 + src/canmatrix/cli/compare.py | 8 +- src/canmatrix/cli/convert.py | 7 +- src/canmatrix/convert.py | 5 +- src/canmatrix/formats/dbc.py | 6 +- src/canmatrix/tests/test_cli_compare.py | 96 ++++++++ src/canmatrix/tests/test_cli_convert.py | 304 ++++++++++++++++++++++++ 10 files changed, 419 insertions(+), 11 deletions(-) create mode 100644 src/canmatrix/tests/test_cli_compare.py create mode 100644 src/canmatrix/tests/test_cli_convert.py diff --git a/requirements.test.py2.txt b/requirements.test.py2.txt index 36b9f674..e8f40695 100644 --- a/requirements.test.py2.txt +++ b/requirements.test.py2.txt @@ -17,4 +17,5 @@ typing==3.6.6 virtualenv==16.0.0 xlwt==1.3.0 xlrd==1.1.0 +click==7.0 lxml diff --git a/requirements.test.py3.txt b/requirements.test.py3.txt index 778bca5a..35988840 100644 --- a/requirements.test.py3.txt +++ b/requirements.test.py3.txt @@ -17,3 +17,4 @@ virtualenv==16.0.0 xlwt==1.3.0 xlrd==1.1.0 lxml==4.3.1 +click==7.0 diff --git a/requirements.tox.txt b/requirements.tox.txt index 65e9129f..4e0f8cff 100644 --- a/requirements.tox.txt +++ b/requirements.tox.txt @@ -6,3 +6,4 @@ toml==0.10.0 tox==3.7.0 typing==3.6.6; python_version < '3.5' virtualenv==16.4.1 +click==7.0 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 66c128f7..8b299014 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +click lxml xlwt xlrd diff --git a/src/canmatrix/cli/compare.py b/src/canmatrix/cli/compare.py index d31a0df1..0d926663 100644 --- a/src/canmatrix/cli/compare.py +++ b/src/canmatrix/cli/compare.py @@ -38,8 +38,8 @@ @click.option('-v', '--verbose', 'verbosity', help="Output verbosity", count=True, default=1) @click.option('-s', '--silent', is_flag=True, default=False, help="don't print status messages to stdout. (only errors)") @click.option('-f', '--frames', is_flag=True, default=False, help="show list of frames") -@click.option('-c', '--comments', 'check_comments', is_flag=True, default=False, help="ignore changed comments") -@click.option('-a', '--attributes', 'check_attributes', is_flag=True, default=False, help="ignore changed attributes") +@click.option('-c', '--comments', 'check_comments', is_flag=True, default=False, help="look for changed comments") +@click.option('-a', '--attributes', 'check_attributes', is_flag=True, default=False, help="look for changed attributes") @click.option('-t', '--valueTable', 'ignore_valuetables', is_flag=True, default=False, help="ignore changed valuetables") @click.argument('matrix1', required=1) @click.argument('matrix2', required=1) @@ -51,14 +51,14 @@ def cli_compare(matrix1, matrix2, verbosity, silent, check_comments, check_attri """ import canmatrix.log - canmatrix.log.setup_logger() + root_logger = canmatrix.log.setup_logger() if silent: # Only print ERROR messages (ignore import warnings) verbosity = -1 - canmatrix.log.set_log_level(logger, verbosity) + canmatrix.log.set_log_level(root_logger, verbosity) # import only after setting log level, to also disable warning messages in silent mode. import canmatrix.formats # due this import we need the import alias for log module diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index ef21938a..9b60999a 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -46,7 +46,7 @@ def get_formats(): @click.command() # global switches @click.option('-v', '--verbose', 'verbosity', count=True, default=1) -@click.option('-s', '--silent/--no-silent', default=False, help="don't print status messages to stdout. (only errors)") +@click.option('-s', '--silent/--no-silent', is_flag=True, default=False, help="don't print status messages to stdout. (only errors)") @click.option('-f', '--force_output', help="enforce output format, ignoring output file extension (e.g., -f csv).\nSupported formats for writing:\n" + get_formats()[1]) @click.option('-i', '--input_format', 'import_type', help="give hint for input format\nSupported formats for reading:\n" + get_formats()[0]) @click.option('--ignoreEncodingErrors/--no-ignoreEncodingErrors', 'ignoreEncodingErrors', default=False, help="ignore character encoding errors during export (dbc,dbf,sym)") @@ -112,13 +112,14 @@ def cli_convert(infile, outfile, silent, verbosity, **options): # type: () -> i \n""" - canmatrix.log.setup_logger() + root_logger = canmatrix.log.setup_logger() if silent == True: # only print error messages, ignore verbosity flag verbosity = -1 + options["silent"] = True - canmatrix.log.set_log_level(logger, verbosity) + canmatrix.log.set_log_level(root_logger, verbosity) if options["ignoreEncodingErrors"]: options["ignoreEncodingErrors"] = "ignore" else: diff --git a/src/canmatrix/convert.py b/src/canmatrix/convert.py index 11629a24..b24c3bf8 100644 --- a/src/canmatrix/convert.py +++ b/src/canmatrix/convert.py @@ -84,7 +84,7 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non canmatrix.copy.copy_ecu_with_frames( mergeOpt.split('=')[1], db_temp_list[dbTemp], db) if mergeOpt.split('=')[0] == "frame": - frame_to_copy = dbs[name].frame_by_name(mergeOpt.split('=')[1]) + frame_to_copy = db_temp_list[name].frame_by_name(mergeOpt.split('=')[1]) canmatrix.copy.copy_frame(frame_to_copy.arbitration_id, db_temp_list[dbTemp], db) if 'renameEcu' in options and options['renameEcu'] is not None: @@ -141,6 +141,7 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non frame_ptr = db.frame_by_name(frame_name) if frame_ptr is not None: frame_ptr.is_fd = False + frame_ptr.del_attribute("VFrameFormat") if 'skipLongDlc' in options and options['skipLongDlc'] is not None: delete_frame_list = [] # type: typing.List[cm.Frame] @@ -198,7 +199,7 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non out_dbs[name] = db if 'force_output' in options and options['force_output'] is not None: - canmatrix.formats.dumpp(out_dbs, out_file_name, exportType=options[ + canmatrix.formats.dumpp(out_dbs, out_file_name, export_type=options[ 'force_output'], **options) else: canmatrix.formats.dumpp(out_dbs, out_file_name, **options) diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index f01bc49b..0e64f326 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -117,7 +117,7 @@ def dump(in_db, f, **options): dbc_export_encoding = options.get("dbcExportEncoding", 'iso-8859-1') dbc_export_comment_encoding = options.get("dbcExportCommentEncoding", dbc_export_encoding) - ignore_encoding_errors= options.get("ignoreExportEncodingErrors", "") + ignore_encoding_errors= options.get("ignoreEncodingErrors", "") write_val_table = options.get("writeValTable", True) compatibility = options.get('compatibility', True) @@ -159,7 +159,9 @@ def dump(in_db, f, **options): # free signals are in special frame in dbc... if len(db.signals) > 0: free_signals_dummy_frame = canmatrix.Frame("VECTOR__INDEPENDENT_SIG_MSG") - free_signals_dummy_frame.arbitration_id = canmatrix.ArbitrationId(0x40000000, extended=True) + # set arbitration id manualy, constructor would not allow this special id + free_signals_dummy_frame.arbitration_id.extended = True + free_signals_dummy_frame.arbitration_id.id = 0x40000000 free_signals_dummy_frame.signals = db.signals db.add_frame(free_signals_dummy_frame) diff --git a/src/canmatrix/tests/test_cli_compare.py b/src/canmatrix/tests/test_cli_compare.py new file mode 100644 index 00000000..fb0b7164 --- /dev/null +++ b/src/canmatrix/tests/test_cli_compare.py @@ -0,0 +1,96 @@ +import pytest +import pathlib2 +import sys +import canmatrix.formats +pytest_plugins = ["pytester"] + + +here = pathlib2.Path(__file__).parent + +@pytest.fixture +def run(testdir): + def do_run(*args): + args = [sys.executable,"-m","canmatrix.cli.compare"] + list(args) + return testdir.run(*args) + return do_run + +def test_silent(tmpdir, run): + inputFile1 = str(here / "test_frame_decoding.dbc") + inputFile2 = str(here / "ARXML_min_max.arxml") + + normal_result = run(inputFile1 ,inputFile2) + silent_result = run("-s", inputFile1 ,inputFile2) + assert len(normal_result.errlines) > len(silent_result.errlines) + +def test_verbose(tmpdir, run): + inputFile1 = str(here / "test_frame_decoding.dbc") + inputFile2 = str(here / "ARXML_min_max.arxml") + + normal_result = run(inputFile1, inputFile2) + verbose_result = run("-vv", inputFile1 ,inputFile2) + assert len(normal_result.errlines) < len(verbose_result.errlines) + +def create_dbc(): + outFile1 = str(here / "tmpa.dbc") + outFile2 = str(here / "tmpb.dbc") + myFrame = canmatrix.Frame("testFrame3", arbitration_id=canmatrix.arbitration_id_converter(0x124), size=8, transmitters=["testBU"]) + mySignal = canmatrix.Signal("someTestSignal", + size=11, + is_little_endian=False, + is_signed=False, + factor=5.0, + offset=1.0, + min=0, + max=500, + receivers=["recBU"]) + myFrame.add_signal(mySignal) + mySignal.add_values(1, "one") + db = canmatrix.CanMatrix() + db.add_frame(myFrame) + canmatrix.formats.dumpp({"": db}, outFile1, dbcExportEncoding='iso-8859-1', + dbcExportCommentEncoding='iso-8859-1') + + db.add_frame_defines("myAttribute","INT -5 10") + db.add_signal_defines("mySignalAttribute", 'INT 0 65535') + mySignal.add_attribute("mySignalAttribute", "7") + myFrame.add_attribute("myAttribute", "42") + mySignal.add_values(2, "two") + myFrame.comment = "my Frame Comment" + mySignal.comment = "my Signal Comment" + canmatrix.formats.dumpp({"": db}, outFile2, dbcExportEncoding='iso-8859-1', + dbcExportCommentEncoding='iso-8859-1') + return outFile1, outFile2 + +def test_frames(tmpdir, run): + (inputFile1, inputFile2) = create_dbc() + + result = run("--frames", inputFile1, inputFile2) + for line in result.outlines: + assert line.startswith("Frames") + +def test_attributes(tmpdir, run): + (inputFile1, inputFile2) = create_dbc() + + reference = run(inputFile1, inputFile2) + result = run("--attributes", inputFile1, inputFile2) + assert len(reference.outlines) < len(result.outlines) + assert "ATTRIBUTES" not in "".join(reference.outlines) + assert "ATTRIBUTES" in "".join(result.outlines) + +def test_value_tables(tmpdir, run): + (inputFile1, inputFile2) = create_dbc() + + reference = run(inputFile1, inputFile2) + result = run("--valueTable", inputFile1, inputFile2) + assert len(reference.outlines) > len(result.outlines) + assert "Valuetable" in "".join(reference.outlines) + assert "Valuetable" not in "".join(result.outlines) + +def test_comments(tmpdir, run): + (inputFile1, inputFile2) = create_dbc() + reference = run(inputFile1, inputFile2) + result = run("--comments", inputFile1, inputFile2) + assert len(reference.outlines) < len(result.outlines) + assert "comment:" not in "".join(reference.outlines) + assert "comment:" in "".join(result.outlines) + diff --git a/src/canmatrix/tests/test_cli_convert.py b/src/canmatrix/tests/test_cli_convert.py new file mode 100644 index 00000000..4484e9bf --- /dev/null +++ b/src/canmatrix/tests/test_cli_convert.py @@ -0,0 +1,304 @@ +import pytest +import pathlib2 +import sys +import canmatrix.formats +pytest_plugins = ["pytester"] + + +here = pathlib2.Path(__file__).parent + +@pytest.fixture +def run(testdir): + def do_run(*args): + args = [sys.executable,"-m","canmatrix.cli.convert"] + list(args) + return testdir.run(*args) + return do_run + +def test_silent(tmpdir, run): + inputFile = str(here / "test_frame_decoding.dbc") + + normal_result = run(inputFile ,"tmp.dbc") + silent_result = run("-s", inputFile,"tmp.dbc") + assert len(normal_result.errlines) > len(silent_result.errlines) + +def test_verbose(tmpdir, run): + inputFile = str(here / "ARXML_min_max.arxml") + + normal_result = run(inputFile ,"tmp.dbc") + verbose_result = run("-vv", inputFile,"tmp.dbc") + assert len(normal_result.errlines) < len(verbose_result.errlines) + +def test_force_output_format(tmpdir, run): + inputFile = str(here / "test_frame_decoding.dbc") + outFile = str(here / "tmp.tmp") + normal_result = run("-v", "-f","dbc", inputFile, outFile) + assert 'INFO - convert - done' in normal_result.errlines[-1] + with open(outFile, "r") as fd: + first_line = fd.readline() + assert first_line == 'VERSION "created by canmatrix"\n' + +def test_foce_input_format(tmpdir, run): + #requires test_force_output to run first + inputFile = str(here / "tmp.tmp") + normal_result = run("-i","dbc", inputFile, "tmp.dbc") + assert 'INFO - convert - done' in normal_result.errlines[-1] + +def create_dbc_with_special_char(): + outFile = str(here / "tmp.dbc") + myFrame = canmatrix.Frame("testFrame1", arbitration_id=canmatrix.arbitration_id_converter(0x123), size=8, transmitters=["testBU"]) + mySignal = canmatrix.Signal("someTestSignal", + size=11, + is_little_endian=False, + is_signed=False, + factor=5.0, + offset=1.0, + min=0, + max=500, + unit=u"specialCharUnit°$", # .decode("utf-8"), + receivers=["recBU"]) + myFrame.add_signal(mySignal) + + db = canmatrix.CanMatrix() + db.add_frame(myFrame) + db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') + canmatrix.formats.dumpp({"": db}, outFile, dbcExportEncoding='iso-8859-1', + dbcExportCommentEncoding='iso-8859-1') + return outFile + +def test_ignore_encoding_errors(tmpdir, run): + inputFile = create_dbc_with_special_char() + normal_result = run("--ignoreEncodingErrors","--dbcExportEncoding", "ascii", inputFile, "tmp2.dbc") + assert 'INFO - convert - done' in normal_result.errlines[-1] + +def test_delete_obsolete_defines(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--deleteObsoleteDefines", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"BA_DEF_" not in content + normal_result = run(inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"BA_DEF_" in content + +def test_delete_ecu(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--deleteEcu","testBU", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"testBU" not in content + +def test_rename_ecu(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--renameEcu","testBU:renamedECU", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"testBU" not in content + assert b"renamedECU" in content + +def test_delete_signal(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--deleteSignal","someTestSignal", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"someTestSignal" not in content + +def test_rename_signal(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--renameSignal","someTestSignal:renamedSignal", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"someTestSignal" not in content + assert b"renamedSignal" in content + +def test_delete_frame(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--deleteFrame","testFrame1", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert "testFrame1" not in content + +def test_rename_frame(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--renameFrame","testFrame1:renamedFrame", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"testFrame1" not in content + assert b"renamedFrame" in content + +def test_add_frame_receiver(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--addFrameReceiver","testFrame1:newECU", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"recBU,newECU" in content + +def test_change_frame_id(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--changeFrameId","291:666", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"BO_ 666" in content + +def test_set_frame_fd(tmpdir, run): + inputFile = create_dbc_with_special_char() + deleted_result = run("--setFrameFd","testFrame1", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b'BA_ "VFrameFormat" BO_ 291 14' in content + deleted_result = run("--unsetFrameFd","testFrame1", "tmp2.dbc", "tmp3.dbc") + with open("tmp3.dbc","rb") as fd: + content = fd.read() + assert b'BA_ "VFrameFormat" BO_ 291 14' not in content + +def test_recalc_dlc(tmpdir, run): + inputFile = create_dbc_with_special_char() + result = run("--recalcDLC","max", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"testFrame1: 8" in content + + result = run("--recalcDLC","force", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"testFrame1: 2" in content + +def test_skip_long_dlc(tmpdir, run): + inputFile = create_dbc_with_special_char() + result = run("--skipLongDlc", "7", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert "someTestSignal" not in content + +def test_cut_long_frames(tmpdir, run): + inputFile = create_dbc_with_special_char() + result = run("--cutLongFrames", "1", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert "someTestSignal" not in content + result = run("--cutLongFrames", "2", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"someTestSignal" in content + +def test_copy_signals(tmpdir, run): + inputFile = create_dbc_with_special_char() + result = run("--signals", "someTestSignal", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"someTestSignal" in content + assert b"VECTOR__INDEPENDENT_SIG_MSG" in content + + +def create_dbc(): + outFile = str(here / "tmpb.dbc") + myFrame = canmatrix.Frame("testFrame3", arbitration_id=canmatrix.arbitration_id_converter(0x124), size=8, transmitters=["testBU"]) + mySignal = canmatrix.Signal("someTestSignal", + size=11, + is_little_endian=False, + is_signed=False, + factor=5.0, + offset=1.0, + min=0, + max=500, + receivers=["recBU"]) + myFrame.add_signal(mySignal) + myFrame2 = canmatrix.Frame("testFrame2", arbitration_id=canmatrix.arbitration_id_converter(0x125), size=8, transmitters=["testBU2"]) + myFrame2.add_attribute("myAttribute","42") + mySignal2 = canmatrix.Signal("someTestSignal2", + start_bit=15, + size=11, + is_little_endian=False, + is_signed=False, + factor=5.0, + offset=1.0, + min=0, + max=500, + receivers=["recBU2"]) + myFrame2.add_signal(mySignal2) + mySignal3 = canmatrix.Signal("zeroSignal", + start_bit=20, + size=0, + is_little_endian=False, + is_signed=False, + factor=5.0, + offset=1.0, + min=0, + max=500, + receivers=["recBU2"]) + mySignal3.add_attribute("mySignalAttribute", "7") + myFrame2.add_signal(mySignal3) + + db = canmatrix.CanMatrix() + db.add_frame(myFrame) + db.add_frame(myFrame2) + db.add_frame_defines("myAttribute","INT -5 10") + db.add_signal_defines("mySignalAttribute", 'INT 0 65535') + canmatrix.formats.dumpp({"": db}, outFile, dbcExportEncoding='iso-8859-1', + dbcExportCommentEncoding='iso-8859-1') + return outFile + +def test_copy_ecus(tmpdir, run): + inputFile = create_dbc() + result = run("--ecus", "testBU", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert "testBU2" not in content + assert "testBU" in content + +def test_copy_frames(tmpdir, run): + inputFile = create_dbc() + result = run("--frames", "testFrame3", inputFile, "tmp2.dbc") + with open("tmp2.dbc","rb") as fd: + content = fd.read() + assert b"testFrame2" not in content + assert b"testFrame3" in content + +def test_delete_frame_attributes(tmpdir, run): + inputFile = create_dbc() + result = run("--deleteFrameAttributes", "myAttribute", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert 'BA_ "myAttribute"' not in content + +def test_delete_zero_signals(tmpdir, run): + inputFile = create_dbc() + result = run("--deleteZeroSignals", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert 'zeroSignal' not in content + + +def test_delete_signal_attributes(tmpdir, run): + inputFile = create_dbc() + result = run("--deleteSignalAttributes", "mySignalAttribute", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert 'BA_ "mySignalAttribute"' not in content + +def test_merge(tmpdir, run): + inputFile1 = create_dbc_with_special_char() + inputFile2 = create_dbc() + + if inputFile1[1] == ":": + inputFile1 = inputFile1[2:] + result = run("--merge", inputFile1, inputFile2, "tmp2.dbc") + with open("tmp2.dbc", "rb") as fd: + content = fd.read() + assert b"BO_ 291" in content + assert b"BO_ 292" in content + assert b"BO_ 293" in content + + result = run("--merge", inputFile1 + ":ecu=testBU", inputFile2, "tmp3.dbc") + with open("tmp3.dbc", "rb") as fd: + content = fd.read() + assert b"BO_ 291" in content + assert b"BO_ 292" in content + assert b"BO_ 293" in content + + result = run("--merge", inputFile1 + ":frame=testFrame1", inputFile2, "tmp4.dbc") + with open("tmp4.dbc", "rb") as fd: + content = fd.read() + assert b"BO_ 291" in content + assert b"BO_ 292" in content + assert b"BO_ 293" in content From d11c0d34e59b3fd5d576f4726f26a09bb7b2c351 Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Tue, 17 Sep 2019 07:49:20 +0200 Subject: [PATCH 22/39] Annotation cleanup #323 (#396) --- src/canmatrix/cancluster.py | 34 +++++++++++++------------- src/canmatrix/canmatrix.py | 26 +++++++------------- src/canmatrix/cli/compare.py | 10 ++++---- src/canmatrix/cli/convert.py | 15 +++++++----- src/canmatrix/convert.py | 40 ++++++++++++++++--------------- src/canmatrix/copy.py | 14 +++++------ src/canmatrix/formats/__init__.py | 6 ++--- src/canmatrix/formats/arxml.py | 12 +++++----- src/canmatrix/formats/dbc.py | 2 +- src/canmatrix/formats/kcd.py | 6 ++--- src/canmatrix/formats/scapy.py | 10 ++++---- src/canmatrix/formats/xls.py | 1 + src/canmatrix/formats/yaml.py | 8 +++++-- 13 files changed, 93 insertions(+), 91 deletions(-) diff --git a/src/canmatrix/cancluster.py b/src/canmatrix/cancluster.py index 02787abc..73612e2d 100644 --- a/src/canmatrix/cancluster.py +++ b/src/canmatrix/cancluster.py @@ -2,23 +2,23 @@ from __future__ import absolute_import import typing -import canmatrix.canmatrix as cm +import canmatrix class CanCluster(dict): def __init__(self, *arg, **kw): super(CanCluster, self).__init__(*arg, **kw) - self._frames = [] # type: typing.List[cm.Frame] - self._signals = [] # type: typing.List[cm.Signal] - self._ecus = [] # type: typing.List[cm.Ecu] + self._frames = [] # type: typing.List[canmatrix.Frame] + self._signals = [] # type: typing.List[canmatrix.Signal] + self._ecus = [] # type: typing.List[canmatrix.Ecu] self.update() - def update_frames(self): # type: () -> typing.MutableSequence[cm.Frame] - frames = [] # type: typing.List[cm.Frame] + def update_frames(self): # type: () -> typing.MutableSequence[canmatrix.Frame] + frames = [] # type: typing.List[canmatrix.Frame] frame_names = [] # type: typing.List[str] for matrixName in self: - for frame in self[matrixName].frames: # type: cm.Frame + for frame in self[matrixName].frames: # type: canmatrix.Frame if frame.name not in frame_names: frame_names.append(frame.name) frames.append(frame) @@ -31,12 +31,12 @@ def update_frames(self): # type: () -> typing.MutableSequence[cm.Frame] self._frames = frames return frames - def update_signals(self): # type: () -> typing.MutableSequence[cm.Signal] - signals = [] # type: typing.List[cm.Signal] + def update_signals(self): # type: () -> typing.MutableSequence[canmatrix.Signal] + signals = [] # type: typing.List[canmatrix.Signal] signal_names = [] # type: typing.List[str] for matrixName in self: - for frame in self[matrixName].frames: - for signal in frame.signals: # type: cm.Signal + for frame in self[matrixName].frames: # type: canmatrix.Frame + for signal in frame.signals: if signal.name not in signal_names: signal_names.append(signal.name) signals.append(signal) @@ -47,11 +47,11 @@ def update_signals(self): # type: () -> typing.MutableSequence[cm.Signal] self._signals = signals return signals - def update_ecus(self): # type: () -> typing.MutableSequence[cm.Ecu] - ecus = [] # type: typing.List[cm.Ecu] + def update_ecus(self): # type: () -> typing.MutableSequence[canmatrix.Ecu] + ecus = [] # type: typing.List[canmatrix.Ecu] ecu_names = [] # type: typing.List[str] for matrixName in self: - for ecu in self[matrixName].ecus: # type: cm.Ecu + for ecu in self[matrixName].ecus: # type: canmatrix.Ecu if ecu.name not in ecu_names: ecu_names.append(ecu.name) ecus.append(ecu) @@ -64,19 +64,19 @@ def update(self): self.update_ecus() @property - def ecus(self): # type: () -> typing.MutableSequence[cm.Ecu] + def ecus(self): # type: () -> typing.MutableSequence[canmatrix.Ecu] if not self._ecus: self.update_ecus() return self._ecus @property - def frames(self): # type: () -> typing.MutableSequence[cm.Frame] + def frames(self): # type: () -> typing.MutableSequence[canmatrix.Frame] if not self._frames: self.update_frames() return self._frames @property - def signals(self): # type: () -> typing.MutableSequence[cm.Signal] + def signals(self): # type: () -> typing.MutableSequence[canmatrix.Signal] if not self._signals: self.update_signals() return self._signals diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index aae2e64e..392b6950 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -813,7 +813,7 @@ def pgn(self, value): # type: (int) -> None @property def priority(self): # type: () -> int """Get J1939 priority.""" - return self.arbitration_id.j1939_prio + return self.arbitration_id.j1939_priority @priority.setter def priority(self, value): # type: (int) -> None @@ -1294,15 +1294,13 @@ def decode(self, data): if self.is_complex_multiplexed: decoded_values = dict() - filtered_signals = [] - filtered_signals += self._filter_signals_for_multiplexer(None, None) + filtered_signals = self._filter_signals_for_multiplexer(None, None) multiplex_name = None multiplex_value = None while self._has_sub_multiplexer(multiplex_name): - multiplex_name, multiplex_value = self._get_sub_multiplexer(multiplex_name, multiplex_value, - decoded) + multiplex_name, multiplex_value = self._get_sub_multiplexer(multiplex_name, multiplex_value, decoded) decoded_values[multiplex_name] = decoded[multiplex_name] filtered_signals += self._filter_signals_for_multiplexer(multiplex_name, multiplex_value) @@ -1343,7 +1341,7 @@ def __init__(self, definition): # type (str) -> None :param str definition: definition string. Ex: "INT -5 10" """ definition = definition.strip() - self.definition = definition # type: str + self.definition = definition self.type = None # type: typing.Optional[str] self.defaultValue = None # type: typing.Any @@ -1561,40 +1559,34 @@ def add_define_default(self, name, value): # type: (str, typing.Any) -> None def delete_obsolete_defines(self): # type: () -> None """Delete all unused Defines. - Delete them from frameDefines, buDefines and signalDefines. + Delete them from frame_defines, ecu_defines and signal_defines. """ defines_to_delete = set() # type: typing.Set[str] - for frameDef in self.frame_defines: # type: str - found = False + for frameDef in self.frame_defines: for frame in self.frames: if frameDef in frame.attributes: - found = True break - if not found: + else: defines_to_delete.add(frameDef) for element in defines_to_delete: del self.frame_defines[element] defines_to_delete = set() for ecu_define in self.ecu_defines: - found = False for ecu in self.ecus: if ecu_define in ecu.attributes: - found = True break - if not found: + else: defines_to_delete.add(ecu_define) for element in defines_to_delete: del self.ecu_defines[element] defines_to_delete = set() for signal_define in self.signal_defines: - found = False for frame in self.frames: for signal in frame.signals: if signal_define in signal.attributes: - found = True break - if not found: + else: defines_to_delete.add(signal_define) for element in defines_to_delete: del self.signal_defines[element] diff --git a/src/canmatrix/cli/compare.py b/src/canmatrix/cli/compare.py index 0d926663..f157c298 100644 --- a/src/canmatrix/cli/compare.py +++ b/src/canmatrix/cli/compare.py @@ -29,11 +29,11 @@ import typing import click -import attr import canmatrix.compare logger = logging.getLogger(__name__) + @click.command() @click.option('-v', '--verbose', 'verbosity', help="Output verbosity", count=True, default=1) @click.option('-s', '--silent', is_flag=True, default=False, help="don't print status messages to stdout. (only errors)") @@ -41,9 +41,9 @@ @click.option('-c', '--comments', 'check_comments', is_flag=True, default=False, help="look for changed comments") @click.option('-a', '--attributes', 'check_attributes', is_flag=True, default=False, help="look for changed attributes") @click.option('-t', '--valueTable', 'ignore_valuetables', is_flag=True, default=False, help="ignore changed valuetables") -@click.argument('matrix1', required=1) -@click.argument('matrix2', required=1) -def cli_compare(matrix1, matrix2, verbosity, silent, check_comments, check_attributes, ignore_valuetables, frames): # type: () -> int +@click.argument('matrix1', required=True) +@click.argument('matrix2', required=True) +def cli_compare(matrix1, matrix2, verbosity, silent, check_comments, check_attributes, ignore_valuetables, frames): """ canmatrix.cli.compare [options] matrix1 matrix2 @@ -53,8 +53,6 @@ def cli_compare(matrix1, matrix2, verbosity, silent, check_comments, check_attri import canmatrix.log root_logger = canmatrix.log.setup_logger() - - if silent: # Only print ERROR messages (ignore import warnings) verbosity = -1 diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index 9b60999a..21e62756 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -26,13 +26,15 @@ import logging import sys -import typing + import click import canmatrix.convert +import canmatrix.log logger = logging.getLogger(__name__) + def get_formats(): input = "" output = "" @@ -43,6 +45,7 @@ def get_formats(): output += suppFormat + "\n" return (input, output) + @click.command() # global switches @click.option('-v', '--verbose', 'verbosity', count=True, default=1) @@ -100,10 +103,10 @@ def get_formats(): #sym switches @click.option('--symExportEncoding', 'symExportEncoding', default="iso-8859-1", help="Export charset of sym format, maybe utf-8\ndefault iso-8859-1") # in and out file -@click.argument('infile', required=1) -@click.argument('outfile', required=1) - -def cli_convert(infile, outfile, silent, verbosity, **options): # type: () -> int +@click.argument('infile', required=True) +@click.argument('outfile', required=True) +# +def cli_convert(infile, outfile, silent, verbosity, **options): """ canmatrix.cli.convert [options] import-file export-file @@ -114,7 +117,7 @@ def cli_convert(infile, outfile, silent, verbosity, **options): # type: () -> i root_logger = canmatrix.log.setup_logger() - if silent == True: + if silent is True: # only print error messages, ignore verbosity flag verbosity = -1 options["silent"] = True diff --git a/src/canmatrix/convert.py b/src/canmatrix/convert.py index b24c3bf8..24d28334 100644 --- a/src/canmatrix/convert.py +++ b/src/canmatrix/convert.py @@ -26,7 +26,7 @@ import sys import typing -import canmatrix.canmatrix as cm +import canmatrix import canmatrix.copy import canmatrix.formats import canmatrix.log @@ -42,25 +42,25 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non logger.info("Exporting " + out_file_name + " ... ") - out_dbs = {} + out_dbs = {} # type: typing.Dict[str, canmatrix.CanMatrix] for name in dbs: db = None if 'ecus' in options and options['ecus'] is not None: ecu_list = options['ecus'].split(',') - db = cm.CanMatrix() + db = canmatrix.CanMatrix() for ecu in ecu_list: canmatrix.copy.copy_ecu_with_frames(ecu, dbs[name], db) if 'frames' in options and options['frames'] is not None: frame_list = options['frames'].split(',') - db = cm.CanMatrix() - for frame_name in frame_list: # type: str - frame_to_copy = dbs[name].frame_by_name(frame_name) # type: cm.Frame + db = canmatrix.CanMatrix() + for frame_name in frame_list: + frame_to_copy = dbs[name].frame_by_name(frame_name) canmatrix.copy.copy_frame(frame_to_copy.arbitration_id, dbs[name], db) if options.get('signals', False): signal_list = options['signals'].split(',') - db = cm.CanMatrix() - for signal_name in signal_list: # type: str + db = canmatrix.CanMatrix() + for signal_name in signal_list: canmatrix.copy.copy_signal(signal_name, dbs[name], db) if db is None: @@ -110,8 +110,8 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non for touple in touples: (frameName, ecu) = touple.split(':') frames = db.glob_frames(frameName) - for frame in frames: # type: cm.Frame - for signal in frame.signals: # type: cm.Signal + for frame in frames: + for signal in frame.signals: signal.add_receiver(ecu) frame.update_receiver() @@ -123,7 +123,7 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non change_tuples = options['changeFrameId'].split(',') for renameTuple in change_tuples: old, new = renameTuple.split(':') - frame = db.frame_by_id(cm.ArbitrationId(int(old))) + frame = db.frame_by_id(canmatrix.ArbitrationId(int(old))) if frame is not None: frame.arbitration_id.id = int(new) else: @@ -144,20 +144,22 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non frame_ptr.del_attribute("VFrameFormat") if 'skipLongDlc' in options and options['skipLongDlc'] is not None: - delete_frame_list = [] # type: typing.List[cm.Frame] - for frame in db.frames: - if frame.size > int(options['skipLongDlc']): - delete_frame_list.append(frame) + delete_frame_list = [ + frame + for frame in db.frames + if frame.size > int(options['skipLongDlc']) + ] for frame in delete_frame_list: db.del_frame(frame) if 'cutLongFrames' in options and options['cutLongFrames'] is not None: for frame in db.frames: if frame.size > int(options['cutLongFrames']): - delete_signal_list = [] - for sig in frame.signals: - if sig.get_startbit() + int(sig.size) > int(options['cutLongFrames'])*8: - delete_signal_list.append(sig) + delete_signal_list = [ + sig + for sig in frame.signals + if sig.get_startbit() + int(sig.size) > int(options['cutLongFrames'])*8 + ] for sig in delete_signal_list: frame.signals.remove(sig) frame.size = 0 diff --git a/src/canmatrix/copy.py b/src/canmatrix/copy.py index 6998c228..1c50f498 100644 --- a/src/canmatrix/copy.py +++ b/src/canmatrix/copy.py @@ -25,13 +25,13 @@ import logging import typing -import canmatrix.canmatrix as cm +import canmatrix logger = logging.getLogger(__name__) def copy_ecu(ecu_or_glob, source_db, target_db): - # type: (typing.Union[cm.Ecu, str], cm.CanMatrix, cm.CanMatrix) -> None + # type: (typing.Union[canmatrix.Ecu, str], canmatrix.CanMatrix, canmatrix.CanMatrix) -> None """ Copy ECU(s) identified by Name or as Object from source CAN matrix to target CAN matrix. This function additionally copy all relevant Defines. @@ -41,7 +41,7 @@ def copy_ecu(ecu_or_glob, source_db, target_db): :param target_db: Destination CAN matrix """ # check whether ecu_or_glob is object or symbolic name - if isinstance(ecu_or_glob, cm.Ecu): + if isinstance(ecu_or_glob, canmatrix.Ecu): ecu_list = [ecu_or_glob] else: ecu_list = source_db.glob_ecus(ecu_or_glob) @@ -65,7 +65,7 @@ def copy_ecu(ecu_or_glob, source_db, target_db): def copy_ecu_with_frames(ecu_or_glob, source_db, target_db): - # type: (typing.Union[cm.Ecu, str], cm.CanMatrix, cm.CanMatrix) -> None + # type: (typing.Union[canmatrix.Ecu, str], canmatrix.CanMatrix, canmatrix.CanMatrix) -> None """ Copy ECU(s) identified by Name or as Object from source CAN matrix to target CAN matrix. This function additionally copy all relevant Frames and Defines. @@ -75,7 +75,7 @@ def copy_ecu_with_frames(ecu_or_glob, source_db, target_db): :param target_db: Destination CAN matrix """ # check whether ecu_or_glob is object or symbolic name - if isinstance(ecu_or_glob, cm.Ecu): + if isinstance(ecu_or_glob, canmatrix.Ecu): ecu_list = [ecu_or_glob] else: ecu_list = source_db.glob_ecus(ecu_or_glob) @@ -113,7 +113,7 @@ def copy_ecu_with_frames(ecu_or_glob, source_db, target_db): def copy_signal(signal_glob, source_db, target_db): - # type: (str, cm.CanMatrix, cm.CanMatrix) -> None + # type: (str, canmatrix.CanMatrix, canmatrix.CanMatrix) -> None """ Copy Signals identified by name from source CAN matrix to target CAN matrix. In target CanMatrix the signal is put without frame, just on top level. @@ -128,7 +128,7 @@ def copy_signal(signal_glob, source_db, target_db): def copy_frame(frame_id, source_db, target_db): - # type: (cm.ArbitrationId, cm.CanMatrix, cm.CanMatrix) -> bool + # type: (canmatrix.ArbitrationId, canmatrix.CanMatrix, canmatrix.CanMatrix) -> bool """ Copy a Frame identified by ArbitrationId from source CAN matrix to target CAN matrix. This function additionally copy all relevant ECUs and Defines. diff --git a/src/canmatrix/formats/__init__.py b/src/canmatrix/formats/__init__.py index b56b6835..3b965104 100644 --- a/src/canmatrix/formats/__init__.py +++ b/src/canmatrix/formats/__init__.py @@ -39,7 +39,7 @@ supportedFormats[loadedModule].append("clusterExporter") if "extension" in dir(moduleInstance): supportedFormats[loadedModule].append("extension") - extensionMapping[loadedModule] = moduleInstance.extension + extensionMapping[loadedModule] = moduleInstance.extension # type: ignore else: extensionMapping[loadedModule] = loadedModule @@ -101,7 +101,7 @@ def load_flat(file_object, import_type, key="", **options): def dump(can_matrix_or_cluster, file_object, export_type, **options): - # type: (typing.Union[canmatrix.CanMatrix, canmatrix.cancluster.CanCluster], typing.IO, str, **str) -> None + # type: (typing.Union[canmatrix.CanMatrix, typing.Mapping[str, canmatrix.CanMatrix]], typing.IO, str, **str) -> None module_instance = sys.modules["canmatrix.formats." + export_type] if isinstance(can_matrix_or_cluster, canmatrix.CanMatrix): module_instance.dump(can_matrix_or_cluster, file_object, **options) # type: ignore @@ -110,7 +110,7 @@ def dump(can_matrix_or_cluster, file_object, export_type, **options): def dumpp(can_cluster, path, export_type=None, **options): - # type: (canmatrix.cancluster.CanCluster, str, str, **str) -> None + # type: (typing.Mapping[str, canmatrix.CanMatrix], str, str, **str) -> None if not export_type: for key, extension in extensionMapping.items(): if path.lower().endswith("." + extension) and "dump" in supportedFormats[key]: diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 01be9f91..4602ef28 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -123,11 +123,11 @@ def get_base_type_of_signal(signal): def dump(dbs, f, **options): - # type: (canmatrix.cancluster.CanCluster, typing.IO, **str) -> None + # type: (typing.Mapping[str, canmatrix.CanMatrix], typing.IO, **str) -> None ar_version = options.get("arVersion", "3.2.3") for name in dbs: - db = dbs[name] # type: canmatrix.CanMatrix + db = dbs[name] for frame in db.frames: for signal in frame.signals: for rec in signal.receivers: @@ -968,8 +968,9 @@ def eval_type_of_signal(type_encoding, base_type, ns): is_signed = False # signed return is_signed, is_float -def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_factory, bit_offset = 0): - # type: (typing.Sequence[_Element], canmatrix.Frame, _DocRoot, str, _MultiplexId, typing.Callable) -> None + +def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_factory, bit_offset=0): + # type: (typing.Sequence[_Element], canmatrix.Frame, _DocRoot, str, _MultiplexId, typing.Callable, int) -> None """Add signals from xml to the Frame.""" global signal_rxs group_id = 1 @@ -1235,12 +1236,11 @@ def get_frame_from_multiplexed_ipdu(pdu, target_frame, multiplex_translation, ro get_signals(pdu_sig_mapping, target_frame, root_or_cache, ns, selector_id.text, float_factory) - def get_frame_from_container_ipdu(pdu, target_frame, root_or_cache, ns, float_factory): target_frame.is_fd = True pdus = get_children(pdu, "CONTAINED-PDU-TRIGGERING", root_or_cache, ns) signal_group_id = 1 - singnals_grouped = [] + singnals_grouped = [] # type: typing.List[str] header_type = get_child(pdu, "HEADER-TYPE", root_or_cache, ns).text if header_type == "SHORT-HEADER": header_length = 32 diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 0e64f326..81280e59 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -101,7 +101,7 @@ def create_attribute_string(attribute, attribute_class, name, value, is_string): def create_comment_string(comment_class, comment_ident, comment, export_encoding, export_comment_encoding, ignore_encoding_errors): - # type: (str, str, str, str, str) -> bytes + # type: (str, str, str, str, str, str) -> bytes if len(comment) == 0: return b"" comment_string = ("CM_ " + comment_class + " " + comment_ident + ' "').encode(export_encoding, 'ignore') diff --git a/src/canmatrix/formats/kcd.py b/src/canmatrix/formats/kcd.py index 3f3a9803..1e577d00 100644 --- a/src/canmatrix/formats/kcd.py +++ b/src/canmatrix/formats/kcd.py @@ -120,11 +120,11 @@ def create_signal(signal, node_list, type_enums): def dump(dbs, f, **_options): - # type: (canmatrix.cancluster.CanCluster, typing.IO, **typing.Any) -> None + # type: (typing.Mapping[str, canmatrix.CanMatrix], typing.IO, **typing.Any) -> None signal_type_enums = {} cluster = canmatrix.cancluster.CanCluster(dbs) for name in cluster: # type: str - db = cluster[name] + db = cluster[name] # type: canmatrix.CanMatrix for (typename, define) in list(db.signal_defines.items()): defines = re.split(r"\s+", define.definition) # type: typing.Sequence[str] define_type = defines[0] @@ -171,7 +171,7 @@ def dump(dbs, f, **_options): if name: bus.set("name", name) - for frame in db.frames: # type: canmatrix.Frame + for frame in db.frames: message = etree.Element( 'Message', id="0x%03X" % frame.arbitration_id.id, diff --git a/src/canmatrix/formats/scapy.py b/src/canmatrix/formats/scapy.py index ae02ac9b..a1c3d689 100644 --- a/src/canmatrix/formats/scapy.py +++ b/src/canmatrix/formats/scapy.py @@ -22,12 +22,15 @@ # this script exports scapy python files # https://scapy.readthedocs.io/en/latest/advanced_usage.html#automotive-usage -extension = "py" import textwrap +import typing + +import canmatrix +extension = "py" -def get_fmt(signal): +def get_fmt(signal): # type: (canmatrix.Signal) -> str if signal.is_little_endian: fmt = "<" @@ -43,8 +46,7 @@ def get_fmt(signal): return fmt - -def dump(db, f, **options): +def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.Any) -> None scapy_decoder = textwrap.dedent(""" #!/usr/bin/env python # -*- coding: utf-8 -*- from scapy.packet import Packet diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index 86639a81..9b23b6de 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -338,6 +338,7 @@ def read_additional_signal_attributes(signal, attribute_name, attribute_value): else: pass + def load(file, **options): # type: (typing.IO, **typing.Any) -> canmatrix.CanMatrix motorola_bit_format = options.get("xlsMotorolaBitFormat", "msbreverse") diff --git a/src/canmatrix/formats/yaml.py b/src/canmatrix/formats/yaml.py index e2c46ef9..261d81a7 100644 --- a/src/canmatrix/formats/yaml.py +++ b/src/canmatrix/formats/yaml.py @@ -79,13 +79,17 @@ def load(f, **options): # type: (typing.IO, **typing.Any) -> canmatrix.CanMatri return db +T = typing.TypeVar('T') + + def _constructor(loader, node, cls, mapping=None): + # type: (typing.Any, typing.Any, typing.Type[T], typing.Mapping) -> T d = {k.lstrip('_'): v for k, v in loader.construct_mapping(node).items()} name = d.pop('name') if mapping: for old, new in mapping.items(): d[new] = d.pop(old) - return cls(name, **d) + return cls(name, **d) # type: ignore def _frame_constructor(loader, node): @@ -108,7 +112,7 @@ def _signal_constructor(loader, node): 'startbit': 'startBit', # todo shall probably be updated to match current names like start_bit 'signalsize': 'signalSize', }, - ) # type: canmatrix.Signal + ) if not signal.is_little_endian: signal.set_startbit( From d373ff79a859b3616824194e8cba8a6f40a7d8df Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Wed, 18 Sep 2019 22:54:16 +0200 Subject: [PATCH 23/39] Remove cm prefix (#236) (#399) Thanks --- src/canmatrix/formats/__init__.py | 2 +- src/canmatrix/formats/{cmcsv.py => csv.py} | 2 -- src/canmatrix/formats/{cmjson.py => json.py} | 2 -- .../tests/{test_cmjson.py => test_json.py} | 16 ++++++++-------- 4 files changed, 9 insertions(+), 13 deletions(-) rename src/canmatrix/formats/{cmcsv.py => csv.py} (99%) rename src/canmatrix/formats/{cmjson.py => json.py} (99%) rename src/canmatrix/tests/{test_cmjson.py => test_json.py} (90%) diff --git a/src/canmatrix/formats/__init__.py b/src/canmatrix/formats/__init__.py index 3b965104..70eeefbe 100644 --- a/src/canmatrix/formats/__init__.py +++ b/src/canmatrix/formats/__init__.py @@ -13,7 +13,7 @@ import StringIO logger = logging.getLogger(__name__) -moduleList = ["arxml", "cmcsv", "dbc", "dbf", "cmjson", +moduleList = ["arxml", "csv", "dbc", "dbf", "json", "kcd", "fibex", "sym", "xls", "xlsx", "yaml", "scapy"] loadedFormats = [] supportedFormats = {} # type: typing.MutableMapping[str, typing.MutableSequence[str]] diff --git a/src/canmatrix/formats/cmcsv.py b/src/canmatrix/formats/csv.py similarity index 99% rename from src/canmatrix/formats/cmcsv.py rename to src/canmatrix/formats/csv.py index fcca2960..3c9d92f3 100644 --- a/src/canmatrix/formats/cmcsv.py +++ b/src/canmatrix/formats/csv.py @@ -36,8 +36,6 @@ logger = logging.getLogger(__name__) CsvDataType = typing.Union[str, int] -extension = 'csv' - class CsvRow: def __init__(self): # type: () -> None diff --git a/src/canmatrix/formats/cmjson.py b/src/canmatrix/formats/json.py similarity index 99% rename from src/canmatrix/formats/cmjson.py rename to src/canmatrix/formats/json.py index 459df00c..c90a3d98 100644 --- a/src/canmatrix/formats/cmjson.py +++ b/src/canmatrix/formats/json.py @@ -33,8 +33,6 @@ import canmatrix -extension = 'json' - def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.BinaryIO, **str) -> None diff --git a/src/canmatrix/tests/test_cmjson.py b/src/canmatrix/tests/test_json.py similarity index 90% rename from src/canmatrix/tests/test_cmjson.py rename to src/canmatrix/tests/test_json.py index 061734bd..17bb4e29 100644 --- a/src/canmatrix/tests/test_cmjson.py +++ b/src/canmatrix/tests/test_json.py @@ -33,7 +33,7 @@ def test_export_with_jsonall(default_matrix): """Check the jsonAll doesn't raise and export some additional field.""" matrix = default_matrix out_file = io.BytesIO() - canmatrix.formats.dump(matrix, out_file, "cmjson", jsonAll=True) + canmatrix.formats.dump(matrix, out_file, "json", jsonAll=True) data = out_file.getvalue().decode("utf-8") assert "my_value1" in data assert "my_value2" in data @@ -42,7 +42,7 @@ def test_export_with_jsonall(default_matrix): def test_export_additional_frame_info(default_matrix): matrix = default_matrix out_file = io.BytesIO() - canmatrix.formats.dump(matrix, out_file, "cmjson", additionalFrameAttributes="my_attribute1") + canmatrix.formats.dump(matrix, out_file, "json", additionalFrameAttributes="my_attribute1") data = out_file.getvalue().decode("utf-8") assert "my_value1" in data @@ -57,7 +57,7 @@ def test_export_long_signal_names(): frame.add_signal(signal) out_file = io.BytesIO() - canmatrix.formats.dump(matrix, out_file, "cmjson", jsonAll=True) + canmatrix.formats.dump(matrix, out_file, "json", jsonAll=True) data = json.loads(out_file.getvalue().decode("utf-8")) assert data['messages'][0]['signals'][0]['name'] == long_signal_name @@ -70,7 +70,7 @@ def test_export_min_max(): frame.add_signal(signal) matrix.add_frame(frame) out_file = io.BytesIO() - canmatrix.formats.dump(matrix, out_file, "cmjson", jsonAll=True) + canmatrix.formats.dump(matrix, out_file, "json", jsonAll=True) data = json.loads(out_file.getvalue().decode("utf-8")) assert(data['messages'][0]['signals'][0]['min'] == '-5') assert(data['messages'][0]['signals'][0]['max'] == '42') @@ -106,7 +106,7 @@ def test_import_min_max(): } ] }""" - matrix = canmatrix.formats.loads_flat(json_input, "cmjson", jsonAll=True) + matrix = canmatrix.formats.loads_flat(json_input, "json", jsonAll=True) assert matrix.frames[0].signals[0].min == -5 assert matrix.frames[0].signals[0].max == 42 @@ -140,7 +140,7 @@ def test_import_native(): } ] }""" - matrix = canmatrix.formats.loads_flat(json_input, "cmjson", jsonAll=True) + matrix = canmatrix.formats.loads_flat(json_input, "json", jsonAll=True) assert matrix.frames[0].signals[0].min == -4.2 assert matrix.frames[0].signals[0].max == 42 assert matrix.frames[0].signals[0].factor == 0.123 @@ -153,7 +153,7 @@ def test_export_native(): frame.add_signal(signal) matrix.add_frame(frame) out_file = io.BytesIO() - canmatrix.formats.dump(matrix, out_file, "cmjson", jsonNativeTypes=True) + canmatrix.formats.dump(matrix, out_file, "json", jsonNativeTypes=True) data = json.loads(out_file.getvalue().decode("utf-8")) assert (data['messages'][0]['signals'][0]['factor'] == 0.123) assert (data['messages'][0]['signals'][0]['offset'] == 1) @@ -165,7 +165,7 @@ def test_export_all_native(): frame.add_signal(signal) matrix.add_frame(frame) out_file = io.BytesIO() - canmatrix.formats.dump(matrix, out_file, "cmjson", jsonAll=True, jsonNativeTypes=True) + canmatrix.formats.dump(matrix, out_file, "json", jsonAll=True, jsonNativeTypes=True) data = json.loads(out_file.getvalue().decode("utf-8")) assert (data['messages'][0]['signals'][0]['min'] == -4.2) assert (data['messages'][0]['signals'][0]['max'] == 42) From 21f297d455755ff702309dcfae1578e950ce842d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Fri, 20 Sep 2019 11:03:11 +0200 Subject: [PATCH 24/39] add muxing support to scapy output; merge PR #398 also (#400) --- src/canmatrix/formats/scapy.py | 36 ++++++++++++++++--------------- src/canmatrix/tests/test_scapy.py | 16 +++++++++++--- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/canmatrix/formats/scapy.py b/src/canmatrix/formats/scapy.py index a1c3d689..a504fdf1 100644 --- a/src/canmatrix/formats/scapy.py +++ b/src/canmatrix/formats/scapy.py @@ -45,6 +45,10 @@ def get_fmt(signal): # type: (canmatrix.Signal) -> str fmt += "B" return fmt +def signal_field_line(signal): + return u'SignalField("{}", default=0, start={}, size={}, scaling={}, offset={}, unit="{}", fmt="{}"),'.format( + signal.name, signal.get_startbit(bit_numbering=1), signal.size, signal.factor, signal.offset, + signal.unit, get_fmt(signal)) def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.Any) -> None scapy_decoder = textwrap.dedent(""" #!/usr/bin/env python @@ -53,34 +57,32 @@ def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.A from scapy.packet import bind_layers from scapy.fields import * from scapy.layers.can import * - class DBC(CAN): - name = 'DBC' - fields_desc = [ - FlagsField('flags', 0, 3, ['error', - 'remote_transmission_request', - 'extended']), - XBitField('arbitration_id', 0, 29), - ByteField('length', None), - ThreeBytesField('reserved', 0), - ] """) for frame in db.frames: - scapy_decoder += "class " + frame.name + "(Packet):\n" + scapy_decoder += "class " + frame.name + "(SignalPacket):\n" scapy_decoder += " fields_desc = [ \n" - for signal in frame.signals: - scapy_decoder += u' SignalField("{}", default=0, start={}, size={}, scaling={}, offset={}, unit="{}", fmt="{}"),\n'.format( - signal.name, signal.get_startbit(bit_numbering=1), signal.size, signal.factor, signal.offset, - signal.unit, get_fmt(signal)) + if frame.is_multiplexed and not frame.is_complex_multiplexed: + multiplexer = frame.get_multiplexer + scapy_decoder += u' ' + signal_field_line(multiplexer) + '\n' + for signal in frame.signals: + if signal != multiplexer and signal.mux_val is not None: + scapy_decoder += u' ConditionalField(' + signal_field_line(signal) + ' lambda p: p.{} == {}),\n'.format(multiplexer.name, signal.mux_val) + elif signal != multiplexer: + scapy_decoder += u' ' + signal_field_line(signal) + '\n' + + else: + for signal in frame.signals: + scapy_decoder += u' ' + signal_field_line(signal) + '\n' scapy_decoder += " ]\n\n" for frame in db.frames: if frame.arbitration_id.extended: - scapy_decoder += "bind_layers(DBC, " + frame.name + ", arbitration_id = " + hex( + scapy_decoder += "bind_layers(SignalHeader, " + frame.name + ", identifier = " + hex( frame.arbitration_id.id) + ", flags = extended)\n" else: - scapy_decoder += "bind_layers(DBC, " + frame.name + ", arbitration_id = " + hex( + scapy_decoder += "bind_layers(SignalHeader, " + frame.name + ", identifier = " + hex( frame.arbitration_id.id) + ")\n" f.write(scapy_decoder.encode("utf8")) diff --git a/src/canmatrix/tests/test_scapy.py b/src/canmatrix/tests/test_scapy.py index bf793436..171e9065 100644 --- a/src/canmatrix/tests/test_scapy.py +++ b/src/canmatrix/tests/test_scapy.py @@ -1,6 +1,6 @@ import canmatrix.formats.scapy import io - +import os def test_scapy_frame_exists(): db = canmatrix.CanMatrix() @@ -8,8 +8,18 @@ def test_scapy_frame_exists(): outscapy = io.BytesIO() canmatrix.formats.dump(db, outscapy, "scapy") - assert "class some_frame(Packet):" in outscapy.getvalue().decode("utf8") - assert "class DBC(CAN)" in outscapy.getvalue().decode("utf8") + assert "class some_frame(SignalPacket):" in outscapy.getvalue().decode("utf8") + + +def test_scapy_muliplexed_frame(): + here = os.path.dirname(os.path.realpath(__file__)) + db = canmatrix.formats.loadp_flat(os.path.join(here, "test_frame_decoding.dbc")) + outscapy = io.BytesIO() + canmatrix.formats.dump(db, outscapy, "scapy") + assert "ConditionalField" in outscapy.getvalue().decode("utf8") + assert "myMuxer == 0" in outscapy.getvalue().decode("utf8") + assert "myMuxer == 1" in outscapy.getvalue().decode("utf8") + def test_scapy_signal_exists(): db = canmatrix.CanMatrix() From 00bcbe184710927e9cedbf0a4d9852b485a31021 Mon Sep 17 00:00:00 2001 From: Funth0mas <43621609+Funth0mas@users.noreply.github.com> Date: Mon, 14 Oct 2019 14:27:55 +0200 Subject: [PATCH 25/39] [try to] Unify imports (#402) * unify imports (#236) --- requirements.txt | 1 + src/canmatrix/cancluster.py | 4 +- src/canmatrix/canmatrix.py | 17 ++- src/canmatrix/cli/compare.py | 5 +- src/canmatrix/cli/convert.py | 3 +- src/canmatrix/compare.py | 5 +- src/canmatrix/convert.py | 4 +- src/canmatrix/copy.py | 3 +- src/canmatrix/formats/__init__.py | 9 +- src/canmatrix/formats/arxml.py | 36 +++--- src/canmatrix/formats/csv.py | 5 +- src/canmatrix/formats/dbc.py | 4 +- src/canmatrix/formats/dbf.py | 5 +- src/canmatrix/formats/fibex.py | 27 ++-- src/canmatrix/formats/json.py | 2 +- src/canmatrix/formats/kcd.py | 55 ++++---- src/canmatrix/formats/scapy.py | 3 + src/canmatrix/formats/sym.py | 3 +- src/canmatrix/formats/xls.py | 5 +- src/canmatrix/formats/xls_common.py | 4 + src/canmatrix/formats/xlsx.py | 5 +- src/canmatrix/formats/yaml.py | 3 +- src/canmatrix/j1939_decoder.py | 10 +- src/canmatrix/join.py | 3 + src/canmatrix/log.py | 2 +- src/canmatrix/tests/test_canmatrix.py | 4 +- src/canmatrix/tests/test_cli_convert.py | 8 +- src/canmatrix/utils.py | 3 + test/test.py | 161 ++++++++++++------------ 29 files changed, 212 insertions(+), 187 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8b299014..ff0fe5c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ pyyaml future attrs>=18.1.0 typing; python_version < '3.5' +pathlib2 diff --git a/src/canmatrix/cancluster.py b/src/canmatrix/cancluster.py index 73612e2d..df5e517b 100644 --- a/src/canmatrix/cancluster.py +++ b/src/canmatrix/cancluster.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function + import typing +from builtins import * import canmatrix diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 392b6950..3d603756 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -26,23 +26,20 @@ # TODO: Definitions should be disassembled -from __future__ import division, absolute_import +from __future__ import absolute_import, division, print_function import decimal import fnmatch +import itertools import logging import math import struct import typing -from itertools import chain +from builtins import * -try: - from itertools import zip_longest as zip_longest -except ImportError: - from itertools import izip_longest as zip_longest # type: ignore - -from past.builtins import basestring import attr +from future.moves.itertools import zip_longest +from past.builtins import basestring import canmatrix.copy import canmatrix.types @@ -1057,7 +1054,7 @@ def get_frame_layout(self): big_bit_signals.append(signal) little_bits_iter = reversed(tuple(grouper(little_bits, 8))) - little_bits = list(chain(*little_bits_iter)) + little_bits = list(itertools.chain(*little_bits_iter)) return_list = [ little + big @@ -1119,7 +1116,7 @@ def signals_to_bytes(self, data): big_bits[most:least] = bits little_bits_iter = reversed(tuple(grouper(little_bits, 8))) - little_bits = list(chain(*little_bits_iter)) + little_bits = list(itertools.chain(*little_bits_iter)) bitstring = ''.join( next(x for x in (l, b, '0') if x is not None) # l if l != ' ' else (b if b != ' ' else '0') diff --git a/src/canmatrix/cli/compare.py b/src/canmatrix/cli/compare.py index f157c298..2718b8a3 100644 --- a/src/canmatrix/cli/compare.py +++ b/src/canmatrix/cli/compare.py @@ -21,12 +21,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. -from __future__ import absolute_import -from __future__ import print_function +from __future__ import absolute_import, division, print_function import logging import sys import typing +from builtins import * + import click import canmatrix.compare diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index 21e62756..0a5d331a 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -21,8 +21,7 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. -from __future__ import absolute_import -from __future__ import print_function +from __future__ import absolute_import, division, print_function import logging import sys diff --git a/src/canmatrix/compare.py b/src/canmatrix/compare.py index d8a0d667..0c29cf28 100644 --- a/src/canmatrix/compare.py +++ b/src/canmatrix/compare.py @@ -19,13 +19,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. -from __future__ import absolute_import -from __future__ import print_function +from __future__ import absolute_import, division, print_function import logging -import optparse import sys import typing +from builtins import * import attr diff --git a/src/canmatrix/convert.py b/src/canmatrix/convert.py index 24d28334..b8cd9c6f 100644 --- a/src/canmatrix/convert.py +++ b/src/canmatrix/convert.py @@ -19,12 +19,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. -from __future__ import absolute_import -from __future__ import print_function +from __future__ import absolute_import, division, print_function import logging import sys import typing +from builtins import * import canmatrix import canmatrix.copy diff --git a/src/canmatrix/copy.py b/src/canmatrix/copy.py index 1c50f498..e0e013dc 100644 --- a/src/canmatrix/copy.py +++ b/src/canmatrix/copy.py @@ -19,11 +19,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function import copy import logging import typing +from builtins import * import canmatrix diff --git a/src/canmatrix/formats/__init__.py b/src/canmatrix/formats/__init__.py index 70eeefbe..626a1e41 100644 --- a/src/canmatrix/formats/__init__.py +++ b/src/canmatrix/formats/__init__.py @@ -1,12 +1,15 @@ # -*- coding: utf-8 -*- -from importlib import import_module -import sys +from __future__ import absolute_import, division, print_function + +import importlib import logging import os +import sys import typing import canmatrix import canmatrix.cancluster + if sys.version_info > (3, 0): import io else: @@ -21,7 +24,7 @@ for module in moduleList: try: - import_module("canmatrix.formats." + module) + importlib.import_module("canmatrix.formats." + module) loadedFormats.append(module) except ImportError: logger.info("%s is not supported", module) diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 4602ef28..cb6343d8 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -24,16 +24,14 @@ # arxml-files are the can-matrix-definitions and a lot more in AUTOSAR-Context # currently Support for Autosar 3.2 and 4.0-4.3 is planned -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +from __future__ import absolute_import, division, print_function import decimal import logging import typing from builtins import * -from lxml import etree +import lxml.etree import canmatrix import canmatrix.types @@ -47,7 +45,7 @@ class ArTree(object): - def __init__(self, name="", ref=None): # type: (str, etree._Element) -> None + def __init__(self, name="", ref=None): # type: (str, lxml.etree._Element) -> None self._name = name self._ref = ref self._array = [] # type: typing.List[ArTree] @@ -65,12 +63,12 @@ def get_child_by_name(self, name): # type: (str) -> typing.Union[ArTree, None] return None @property - def ref(self): # type: () -> etree._Element + def ref(self): # type: () -> lxml.etree._Element return self._ref # for typing only -_Element = etree._Element +_Element = lxml.etree._Element _DocRoot = typing.Union[_Element, ArTree] _MultiplexId = typing.Union[str, int, None] _FloatFactory = typing.Callable[[typing.Any], typing.Any] @@ -78,7 +76,7 @@ def ref(self): # type: () -> etree._Element def create_sub_element(parent, element_name, text=None): # type: (_Element, str, typing.Optional[str]) -> _Element - sn = etree.SubElement(parent, element_name) + sn = lxml.etree.SubElement(parent, element_name) if text is not None: sn.text = str(text) return sn @@ -135,7 +133,7 @@ def dump(dbs, f, **options): if ar_version[0] == "3": xsi = 'http://www.w3.org/2001/XMLSchema-instance' - root = etree.Element( + root = lxml.etree.Element( 'AUTOSAR', nsmap={ None: 'http://autosar.org/' + ar_version, @@ -145,7 +143,7 @@ def dump(dbs, f, **options): top_level_packages = create_sub_element(root, 'TOP-LEVEL-PACKAGES') else: xsi = 'http://www.w3.org/2001/XMLSchema-instance' - root = etree.Element( + root = lxml.etree.Element( 'AUTOSAR', nsmap={ None: "http://autosar.org/schema/r4.0", @@ -760,7 +758,7 @@ def dump(dbs, f, **options): ipdu_ref.set('DEST', "I-SIGNAL-I-PDU") ipdu_ref.text = "/PDU/PDU_" + frame_name - f.write(etree.tostring(root, pretty_print=True, xml_declaration=True)) + f.write(lxml.etree.tostring(root, pretty_print=True, xml_declaration=True)) ################################### @@ -1000,7 +998,7 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact base_type = get_child(isignal, "BASE-TYPE", root_or_cache, ns) try: - type_encoding = get_child(base_type,"BASE-TYPE-ENCODING", root_or_cache, ns).text + type_encoding = get_child(base_type, "BASE-TYPE-ENCODING", root_or_cache, ns).text except AttributeError: type_encoding = "None" signal_name = None # type: typing.Optional[str] @@ -1192,6 +1190,7 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact new_signal.add_attribute("LongName", signal_name) frame.add_signal(new_signal) + def get_frame_from_multiplexed_ipdu(pdu, target_frame, multiplex_translation, root_or_cache, ns, float_factory): selector_byte_order = get_child(pdu, "SELECTOR-FIELD-BYTE-ORDER", root_or_cache, ns) selector_len = get_child(pdu, "SELECTOR-FIELD-LENGTH", root_or_cache, ns) @@ -1244,8 +1243,8 @@ def get_frame_from_container_ipdu(pdu, target_frame, root_or_cache, ns, float_fa header_type = get_child(pdu, "HEADER-TYPE", root_or_cache, ns).text if header_type == "SHORT-HEADER": header_length = 32 - target_frame.add_signal(canmatrix.Signal(start_bit=0, size=24, name="Header_ID", multiplex ="Multiplexor", is_little_endian = True)) - target_frame.add_signal(canmatrix.Signal(start_bit=24, size= 8, name="Header_DLC", is_little_endian = True)) + target_frame.add_signal(canmatrix.Signal(start_bit=0, size=24, name="Header_ID", multiplex="Multiplexor", is_little_endian=True)) + target_frame.add_signal(canmatrix.Signal(start_bit=24, size=8, name="Header_DLC", is_little_endian=True)) elif header_type == "LONG-HEADER": header_length = 64 target_frame.add_signal(canmatrix.Signal(start_bit=0, size=32, name="Header_ID", multiplex="Multiplexor", @@ -1254,7 +1253,7 @@ def get_frame_from_container_ipdu(pdu, target_frame, root_or_cache, ns, float_fa else: raise("header " + header_type + " not supported for containers yet") # none type - #TODO + # TODO for cpdu in pdus: ipdu = get_child(cpdu, "I-PDU", root_or_cache, ns) @@ -1264,7 +1263,7 @@ def get_frame_from_container_ipdu(pdu, target_frame, root_or_cache, ns, float_fa elif header_type == "LONG-HEADER": header_id = get_child(ipdu, "HEADER-ID-LONG-HEADER", root_or_cache, ns).text else: - #none type + # none type pass except AttributeError: header_id = "0" @@ -1286,6 +1285,7 @@ def get_frame_from_container_ipdu(pdu, target_frame, root_or_cache, ns, float_fa singnals_grouped += new_signals signal_group_id += 1 + def store_frame_timings(target_frame, cyclic_timing, event_timing, minimum_delay, repeats, starting_time, time_offset, repeating_time, root_or_cache, time_period, ns, float_factory): if cyclic_timing is not None and event_timing is not None: target_frame.add_attribute("GenMsgSendType", "cyclicAndSpontanX") # CycleAndSpontan @@ -1602,7 +1602,7 @@ def load(file, **options): result = {} logger.debug("Read arxml ...") - tree = etree.parse(file) + tree = lxml.etree.parse(file) root = tree.getroot() # type: _Element logger.debug(" Done\n") @@ -1650,7 +1650,7 @@ def load(file, **options): logger.debug("%d I-SIGNAL-TO-I-PDU-MAPPING in arxml...", len(sig_ipdu)) if ignore_cluster_info is True: - ccs = [etree.Element("ignoreClusterInfo")] # type: typing.Sequence[_Element] + ccs = [lxml.etree.Element("ignoreClusterInfo")] # type: typing.Sequence[_Element] else: ccs = root.findall('.//' + ns + 'CAN-CLUSTER') for cc in ccs: # type: _Element diff --git a/src/canmatrix/formats/csv.py b/src/canmatrix/formats/csv.py index 3c9d92f3..4a75003c 100644 --- a/src/canmatrix/formats/csv.py +++ b/src/canmatrix/formats/csv.py @@ -23,13 +23,14 @@ # this script exports canmatrix-objects to a CSV file. (Based on xlsx) # Author: Martin Hoffmann (m8ddin@gmail.com) -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function import collections import csv import logging import sys import typing +from builtins import * import canmatrix.formats.xls_common @@ -68,7 +69,7 @@ def write(self, column, value): # type: (int, CsvDataType) -> None def as_list(self): # type: () -> typing.List[str] # Generate list of single cells in the row till highest index (dictionary key) # Empty cells (non-existent keys) are generated as empty string - return [str(self._row_dict[x]) + return [self._row_dict[x] for x in range(0, max(self._row_dict) + 1)] def to_csv(self, delimiter=','): # type: (str) -> str diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 81280e59..c51884e2 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -23,9 +23,7 @@ # this script exports dbc-files from a canmatrix-object # dbc-files are the can-matrix-definitions of the CANoe (Vector Informatic) -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +from __future__ import absolute_import, division, print_function import collections import copy diff --git a/src/canmatrix/formats/dbf.py b/src/canmatrix/formats/dbf.py index 8633c560..3c47c545 100644 --- a/src/canmatrix/formats/dbf.py +++ b/src/canmatrix/formats/dbf.py @@ -23,9 +23,7 @@ # this script imports dbf-files in a canmatrix-object # dbf-files are the can-matrix-definitions of the busmaster-project (http://rbei-etas.github.io/busmaster/) # -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +from __future__ import absolute_import, division, print_function import copy import decimal @@ -33,6 +31,7 @@ import math import re import typing +from builtins import * import canmatrix diff --git a/src/canmatrix/formats/fibex.py b/src/canmatrix/formats/fibex.py index 727ba4f6..ef5dd4ad 100644 --- a/src/canmatrix/formats/fibex.py +++ b/src/canmatrix/formats/fibex.py @@ -25,11 +25,12 @@ # only (fibex: Field Bus Exchange Format // # https://de.wikipedia.org/wiki/Field_Bus_Exchange_Format) -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function import typing from builtins import * -from lxml import etree + +import lxml.etree import canmatrix @@ -45,20 +46,20 @@ extension = "xml" # noinspection PyProtectedMember -_Element = etree._Element +_Element = lxml.etree._Element def create_short_name_desc(parent, short_name, desc): # type: (_Element, str, str) -> None - short_name_elem = etree.SubElement(parent, ns_ho + "SHORT-NAME") + short_name_elem = lxml.etree.SubElement(parent, ns_ho + "SHORT-NAME") short_name_elem.text = short_name - desc_elem = etree.SubElement(parent, ns_ho + "DESC") + desc_elem = lxml.etree.SubElement(parent, ns_ho + "DESC") desc_elem.text = desc def create_sub_element_fx(parent, element_name, element_text=None): # type: (_Element, str, typing.Optional[str]) -> _Element - new = etree.SubElement(parent, ns_fx + element_name) + new = lxml.etree.SubElement(parent, ns_fx + element_name) if element_text is not None: new.text = element_text return new @@ -66,7 +67,7 @@ def create_sub_element_fx(parent, element_name, element_text=None): def create_sub_element_ho(parent, element_name, element_text=None): # type: (_Element, str, typing.Optional[str]) -> _Element - new = etree.SubElement(parent, ns_ho + element_name) + new = lxml.etree.SubElement(parent, ns_ho + element_name) if element_text is not None: new.text = element_text return new @@ -75,7 +76,7 @@ def create_sub_element_ho(parent, element_name, element_text=None): def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.Any) -> None ns_map = {"fx": fx, "ho": ho, "can": can, "xsi": xsi} - root = etree.Element(ns_fx + "FIBEX", nsmap=ns_map) + root = lxml.etree.Element(ns_fx + "FIBEX", nsmap=ns_map) root.attrib[ '{{{pre}}}schemaLocation'.format( pre=xsi)] = 'http://www.asam.net/xml/fbx ..\\..\\xml_schema\\fibex.xsd http://www.asam.net/xml/fbx/can ..\\..\\xml_schema\\fibex4can.xsd' @@ -96,7 +97,7 @@ def dump(db, f, **options): # CLUSTERS # clusters = create_sub_element_fx(elements, "CLUSTERS") - cluster = etree.SubElement(clusters, ns_fx + "CLUSTER") + cluster = lxml.etree.SubElement(clusters, ns_fx + "CLUSTER") cluster.set('ID', 'canCluster1') create_short_name_desc(cluster, "clusterShort", "clusterDesc") create_sub_element_fx(cluster, "SPEED", "500") @@ -200,7 +201,7 @@ def dump(db, f, **options): if bu.name in signal.receivers: input_port = create_sub_element_fx(input_ports, "INPUT-PORT") input_port.set("ID", "INP_" + signal.name) - desc = etree.SubElement(input_port, ns_ho + "DESC") + desc = lxml.etree.SubElement(input_port, ns_ho + "DESC") desc.text = signal.comment signal_ref = create_sub_element_fx(input_port, "SIGNAL-REF") signal_ref.set("ID-REF", "SIG_" + signal.name) @@ -210,7 +211,7 @@ def dump(db, f, **options): for signal in frame.signals: output_port = create_sub_element_fx(input_ports, "OUTPUT-PORT") output_port.set("ID", "OUTP_" + signal.name) - desc = etree.SubElement(output_port, ns_ho + "DESC") + desc = lxml.etree.SubElement(output_port, ns_ho + "DESC") desc.text = "signalcomment" signal_ref = create_sub_element_fx(output_port, "SIGNAL-REF") signal_ref.set("ID-REF", "SIG_" + signal.name) @@ -230,7 +231,7 @@ def dump(db, f, **options): # # PROCESSING-INFORMATION # - proc_info = etree.SubElement(elements, ns_fx + "PROCESSING-INFORMATION", nsmap={"ho": ho}) + proc_info = lxml.etree.SubElement(elements, ns_fx + "PROCESSING-INFORMATION", nsmap={"ho": ho}) unit_spec = create_sub_element_ho(proc_info, "UNIT-SPEC") for frame in db.frames: for signal in frame.signals: @@ -286,4 +287,4 @@ def dump(db, f, **options): # # requirements = createSubElementFx(elements, "REQUIREMENTS") - f.write(etree.tostring(root, pretty_print=True)) + f.write(lxml.etree.tostring(root, pretty_print=True)) diff --git a/src/canmatrix/formats/json.py b/src/canmatrix/formats/json.py index c90a3d98..e7fabc01 100644 --- a/src/canmatrix/formats/json.py +++ b/src/canmatrix/formats/json.py @@ -24,7 +24,7 @@ # json-files are the can-matrix-definitions of the CANard-project # (https://github.com/ericevenchick/CANard) -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function import json import sys diff --git a/src/canmatrix/formats/kcd.py b/src/canmatrix/formats/kcd.py index 1e577d00..051796c6 100644 --- a/src/canmatrix/formats/kcd.py +++ b/src/canmatrix/formats/kcd.py @@ -24,8 +24,7 @@ # kcd-files are the can-matrix-definitions of the kayak # (http://kayak.2codeornot2code.org/) -from __future__ import absolute_import -from __future__ import division +from __future__ import absolute_import, division, print_function import decimal import os @@ -33,7 +32,7 @@ import typing from builtins import * -from lxml import etree +import lxml.etree import canmatrix import canmatrix.cancluster @@ -41,7 +40,7 @@ clusterExporter = 1 clusterImporter = 1 -_Element = etree._Element +_Element = lxml.etree._Element def default_float_factory(value): # type: (typing.Any) -> decimal.Decimal @@ -50,7 +49,7 @@ def default_float_factory(value): # type: (typing.Any) -> decimal.Decimal def create_signal(signal, node_list, type_enums): # type: (canmatrix.Signal, typing.Mapping[str, int], typing.Mapping[str, typing.Sequence[str]]) -> _Element - xml_signal = etree.Element( + xml_signal = lxml.etree.Element( 'Signal', name=signal.name, offset=str(signal.get_startbit())) @@ -72,18 +71,18 @@ def create_signal(signal, node_list, type_enums): comment += "\n" + more_comments if comment: - notes = etree.Element('Notes') + notes = lxml.etree.Element('Notes') notes.text = comment xml_signal.append(notes) - consumer = etree.Element('Consumer') + consumer = lxml.etree.Element('Consumer') for receiver in signal.receivers: if receiver in node_list and len(receiver) > 1: - node_ref = etree.Element('NodeRef', id=str(node_list[receiver])) + node_ref = lxml.etree.Element('NodeRef', id=str(node_list[receiver])) consumer.append(node_ref) if len(consumer) > 0: # if consumer has children xml_signal.append(consumer) - value = etree.Element('Value') + value = lxml.etree.Element('Value') if signal.is_float: if signal.size > 32: value.set('type', "double") @@ -107,9 +106,9 @@ def create_signal(signal, node_list, type_enums): xml_signal.append(value) if signal.values: # signal has value table - label_set = etree.Element('LabelSet') + label_set = lxml.etree.Element('LabelSet') for table_value, table_name in sorted(signal.values.items(), key=lambda x: int(x[0])): - label = etree.Element( + label = lxml.etree.Element( 'Label', name=table_name.replace('"', ''), value=str(table_value)) @@ -135,15 +134,15 @@ def dump(dbs, f, **_options): signal_type_enums[typename] = enum_literals # create XML - root = etree.Element('NetworkDefinition') # type: _Element + root = lxml.etree.Element('NetworkDefinition') # type: _Element root.set("xmlns", "http://kayak.2codeornot2code.org/1.0") ns_xsi = "{http://www.w3.org/2001/XMLSchema-instance}" root.set(ns_xsi + "schemaLocation", "Definition.xsd") - # root.append(etree.Element('Document')) + # root.append(lxml.etree.Element('Document')) # another child with text - child = etree.Element('Document') + child = lxml.etree.Element('Document') child.set("name", "Some Document Name") child.text = 'some text' root.append(child) @@ -152,7 +151,7 @@ def dump(dbs, f, **_options): element_id = 1 node_list = {} # type: typing.MutableMapping[str, int] for ecu in cluster.ecus: - node = etree.Element('Node', name=ecu.name, id="%d" % element_id) + node = lxml.etree.Element('Node', name=ecu.name, id="%d" % element_id) root.append(node) node_list[ecu.name] = element_id element_id += 1 @@ -160,9 +159,9 @@ def dump(dbs, f, **_options): db = cluster[name] # Bus if 'Baudrate' in db.attributes: - bus = etree.Element('Bus', baudrate=db.attributes['Baudrate']) + bus = lxml.etree.Element('Bus', baudrate=db.attributes['Baudrate']) else: - bus = etree.Element('Bus') + bus = lxml.etree.Element('Bus') if not name: (path, ext) = os.path.splitext(f.name) @@ -172,7 +171,7 @@ def dump(dbs, f, **_options): bus.set("name", name) for frame in db.frames: - message = etree.Element( + message = lxml.etree.Element( 'Message', id="0x%03X" % frame.arbitration_id.id, name=frame.name, @@ -186,16 +185,16 @@ def dump(dbs, f, **_options): message.set("triggered", "true") message.set("interval", "%d" % int(cycle_time)) - comment_elem = etree.Element('Notes') + comment_elem = lxml.etree.Element('Notes') if frame.comment is not None: comment_elem.text = frame.comment message.append(comment_elem) - producer = etree.Element('Producer') + producer = lxml.etree.Element('Producer') for transmitter in frame.transmitters: if transmitter in node_list and len(transmitter) > 1: - node_ref = etree.Element( + node_ref = lxml.etree.Element( 'NodeRef', id=str(node_list[transmitter])) producer.append(node_ref) @@ -208,19 +207,19 @@ def dump(dbs, f, **_options): multiplexor_elem = None for signal in frame.signals: if signal.multiplex is not None and signal.multiplex == 'Multiplexor': - multiplexor_elem = etree.Element( + multiplexor_elem = lxml.etree.Element( 'Multiplex', name=signal.name, offset=str(signal.get_startbit()), length=str(int(signal.size))) - value = etree.Element('Value') + value = lxml.etree.Element('Value') if float(signal.min) != 0: value.set('min', "%g" % signal.min) # type: ignore if float(signal.max) != 1: value.set('max', "%g" % signal.max) - label_set = etree.Element('LabelSet') + label_set = lxml.etree.Element('LabelSet') for valueVal, valName in sorted(signal.values.items(), key=lambda x: int(x[0])): - label = etree.Element( + label = lxml.etree.Element( 'Label', name=valName.replace('"', ''), value=str(valueVal)) @@ -230,7 +229,7 @@ def dump(dbs, f, **_options): # ticker all potential muxgroups for i in range(0, 1 << int(multiplexor_elem.get('length'))): empty = 0 - muxgroup = etree.Element('MuxGroup', count=str(i)) + muxgroup = lxml.etree.Element('MuxGroup', count=str(i)) for signal in frame.signals: if signal.multiplex is not None and signal.multiplex == i: sig = create_signal(signal, node_list, signal_type_enums) @@ -251,7 +250,7 @@ def dump(dbs, f, **_options): bus.append(message) root.append(bus) - f.write(etree.tostring(root, pretty_print=True)) + f.write(lxml.etree.tostring(root, pretty_print=True)) def parse_signal(signal, mux, namespace, nodelist, float_factory): @@ -347,7 +346,7 @@ def load(f, **options): # type: (typing.IO, **typing.Any) -> typing.Dict[str, canmatrix.CanMatrix] float_factory = options.get("float_factory", default_float_factory) # type: typing.Callable dbs = {} # type: typing.Dict[str, canmatrix.CanMatrix] - tree = etree.parse(f) + tree = lxml.etree.parse(f) root = tree.getroot() namespace = "{" + tree.xpath('namespace-uri(.)') + "}" diff --git a/src/canmatrix/formats/scapy.py b/src/canmatrix/formats/scapy.py index a504fdf1..3124abad 100644 --- a/src/canmatrix/formats/scapy.py +++ b/src/canmatrix/formats/scapy.py @@ -22,8 +22,11 @@ # this script exports scapy python files # https://scapy.readthedocs.io/en/latest/advanced_usage.html#automotive-usage +from __future__ import absolute_import, division, print_function + import textwrap import typing +from builtins import * import canmatrix diff --git a/src/canmatrix/formats/sym.py b/src/canmatrix/formats/sym.py index 37c8d8ba..9e058dd5 100644 --- a/src/canmatrix/formats/sym.py +++ b/src/canmatrix/formats/sym.py @@ -23,8 +23,7 @@ # this script exports sym-files from a canmatrix-object # sym-files are the can-matrix-definitions of the Peak Systems Tools -from __future__ import absolute_import -from __future__ import division +from __future__ import absolute_import, division, print_function import collections import decimal diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index 9b23b6de..485d73c6 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -23,13 +23,12 @@ # this script exports xls-files from a canmatrix-object # xls-files are the can-matrix-definitions displayed in Excel -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +from __future__ import absolute_import, division, print_function import decimal import logging import typing +from builtins import * import past.builtins import xlrd diff --git a/src/canmatrix/formats/xls_common.py b/src/canmatrix/formats/xls_common.py index 1430151a..56da44dc 100644 --- a/src/canmatrix/formats/xls_common.py +++ b/src/canmatrix/formats/xls_common.py @@ -19,7 +19,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. +from __future__ import absolute_import, division, print_function + import typing +from builtins import * + import canmatrix diff --git a/src/canmatrix/formats/xlsx.py b/src/canmatrix/formats/xlsx.py index db47eea2..f5061bb0 100644 --- a/src/canmatrix/formats/xlsx.py +++ b/src/canmatrix/formats/xlsx.py @@ -23,12 +23,11 @@ # this script exports xls-files from a canmatrix-object # xls-files are the can-matrix-definitions displayed in Excel - -from __future__ import absolute_import -from __future__ import division +from __future__ import absolute_import, division, print_function import logging import typing +from builtins import * import xlsxwriter diff --git a/src/canmatrix/formats/yaml.py b/src/canmatrix/formats/yaml.py index 261d81a7..c62b005b 100644 --- a/src/canmatrix/formats/yaml.py +++ b/src/canmatrix/formats/yaml.py @@ -23,8 +23,7 @@ # yaml-files are just object-dumps human readable. # This export is complete, no information lost - -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function import copy import typing diff --git a/src/canmatrix/j1939_decoder.py b/src/canmatrix/j1939_decoder.py index 9976a016..9653d340 100644 --- a/src/canmatrix/j1939_decoder.py +++ b/src/canmatrix/j1939_decoder.py @@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function + +from builtins import * -import canmatrix.formats -import pathlib2 import attr +import pathlib2 + +import canmatrix.formats + @attr.s class j1939_decoder(object): diff --git a/src/canmatrix/join.py b/src/canmatrix/join.py index 138bb0f8..a2b921ab 100644 --- a/src/canmatrix/join.py +++ b/src/canmatrix/join.py @@ -1,5 +1,8 @@ # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, print_function + import typing +from builtins import * import canmatrix import canmatrix.formats diff --git a/src/canmatrix/log.py b/src/canmatrix/log.py index 5378fdaf..bbecd5d7 100644 --- a/src/canmatrix/log.py +++ b/src/canmatrix/log.py @@ -22,7 +22,7 @@ # Configurable logging # Author: Martin Hoffmann (m8ddin@gmail.com) -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function import logging diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index 5da1ff9a..8476b5f7 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- -import pytest import decimal +import pytest +from builtins import * + import canmatrix.canmatrix diff --git a/src/canmatrix/tests/test_cli_convert.py b/src/canmatrix/tests/test_cli_convert.py index 4484e9bf..a8fa16c4 100644 --- a/src/canmatrix/tests/test_cli_convert.py +++ b/src/canmatrix/tests/test_cli_convert.py @@ -1,7 +1,11 @@ -import pytest -import pathlib2 +# -*- coding: utf-8 -*- import sys + +import pathlib2 +import pytest + import canmatrix.formats + pytest_plugins = ["pytester"] diff --git a/src/canmatrix/utils.py b/src/canmatrix/utils.py index 13f699e9..f93cbc1e 100644 --- a/src/canmatrix/utils.py +++ b/src/canmatrix/utils.py @@ -1,8 +1,11 @@ # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, print_function + import csv import shlex import sys import typing +from builtins import * def quote_aware_space_split(in_line): # type: (str) -> typing.List[str] diff --git a/test/test.py b/test/test.py index 0fcc159e..07ab6531 100755 --- a/test/test.py +++ b/test/test.py @@ -1,95 +1,100 @@ #!/usr/bin/env python3 -from __future__ import print_function -from __future__ import absolute_import +from __future__ import absolute_import, division, print_function - -import sys -sys.path.append('../src') - -import canmatrix.convert -import canmatrix.formats import copy import os import shutil import subprocess +import sys + +sys.path.append('../src') +import canmatrix.convert +import canmatrix.formats +import canmatrix.log + if sys.version_info > (3, 2): if shutil.which("diff") is None: - print ("ERROR: this test needs the tool 'diff' in your path to work") + print("ERROR: this test needs the tool 'diff' in your path to work") sys.exit() -from canmatrix.log import setup_logger, set_log_level -logger = setup_logger() -set_log_level(logger, -1) - -export_types = [] -import_types = [] - -for canFormat, features in canmatrix.formats.supportedFormats.items(): - if "dump" in features: - export_types.append(canmatrix.formats.extensionMapping[canFormat]) - if "load" in features: - import_types.append(canmatrix.formats.extensionMapping[canFormat]) - -# for f in os.listdir('../canmatrix'): -# m = re.match('^export(.*).py$', f) -# if m is not None and m.group(1) != 'all': -# export_types.append(m.group(1)) -# m = re.match('^import(.*).py$', f) -# if m is not None and m.group(1) != 'all' and m.group(1) != 'any': -# import_types.append(m.group(1)) - -export_types.sort() -# TODO: support testing of xlsx -# export_types.remove('xlsx') -if "fibex" in export_types: - export_types.remove('fibex') - -import_types.sort() - -test_file_base = 'test' -converted_path = 'converted' -try: - shutil.rmtree(converted_path) -except OSError: - # it's already not there... - pass - -for i in import_types: - in_file = test_file_base + '.' + i.lower() - if not os.path.isfile(in_file): - print('Skipping conversion from missing file ' + in_file) - else: - to = copy.copy(export_types) - try: - to.remove(i) - except ValueError: - # TODO: support testing of xlsx - pass - print('{} -> {}'.format(i, to)) - - for t in to: - out_file = os.path.basename(test_file_base) - # out_file = os.path.splitext(out_file)[0] - out_file += '.' + t.lower() - directory = os.path.join(converted_path, 'from_' + i) +logger = canmatrix.log.setup_logger() +canmatrix.log.set_log_level(logger, -1) + + +def run_tests(): + export_types = [] + import_types = [] + + for canFormat, features in canmatrix.formats.supportedFormats.items(): + if "dump" in features: + export_types.append(canmatrix.formats.extensionMapping[canFormat]) + if "load" in features: + import_types.append(canmatrix.formats.extensionMapping[canFormat]) + + # for f in os.listdir('../canmatrix'): + # m = re.match('^export(.*).py$', f) + # if m is not None and m.group(1) != 'all': + # export_types.append(m.group(1)) + # m = re.match('^import(.*).py$', f) + # if m is not None and m.group(1) != 'all' and m.group(1) != 'any': + # import_types.append(m.group(1)) + + export_types.sort() + # TODO: support testing of xlsx + # export_types.remove('xlsx') + if "fibex" in export_types: + export_types.remove('fibex') + + import_types.sort() + + test_file_base = 'test' + converted_path = 'converted' + try: + shutil.rmtree(converted_path) + except OSError: + # it's already not there... + pass + + for i in import_types: + in_file = test_file_base + '.' + i.lower() + if not os.path.isfile(in_file): + print('Skipping conversion from missing file ' + in_file) + else: + to = copy.copy(export_types) try: - os.makedirs(directory) - except OSError: - # TODO: be more specific: OSError: [Errno 17] File exists: - # 'converted/from_arxml' + to.remove(i) + except ValueError: + # TODO: support testing of xlsx pass - out_file = os.path.join(directory, out_file) - canmatrix.convert.convert(in_file, out_file) + print('{} -> {}'.format(i, to)) + + for t in to: + out_file = os.path.basename(test_file_base) + # out_file = os.path.splitext(out_file)[0] + out_file += '.' + t.lower() + directory = os.path.join(converted_path, 'from_' + i) + try: + os.makedirs(directory) + except OSError: + # TODO: be more specific: OSError: [Errno 17] File exists: + # 'converted/from_arxml' + pass + out_file = os.path.join(directory, out_file) + canmatrix.convert.convert(in_file, out_file) + + exit_code = subprocess.call(['diff', '-r', 'reference', 'converted']) + + if exit_code: + # difference found + message = 'difference found' + else: + # no difference found + message = 'no difference' -exit_code = subprocess.call(['diff', '-r', 'reference', 'converted']) + print('\n\n Testing completed: {message}'.format(**locals())) -if exit_code: - # difference found - message = 'difference found' -else: - # no difference found - message = 'no difference' -print('\n\n Testing completed: {message}'.format(**locals())) +if __name__ == "__main__": + run_tests() From b32f64ac79a7eb8ca57416fdcf2d7d2588960ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 14 Oct 2019 21:53:15 +0200 Subject: [PATCH 26/39] [WIP] dump/export wireshark lua can subdissector (#404) * add basic wireshark dissector creator creastes lua script for dissecting can messages * add cannelloni dissector for wireshark * add some doc for scapy and wireshark usage --- docs/formats.rst | 70 +++++++++++-- examples/dissect_cannelloni.lua | 69 +++++++++++++ src/canmatrix/formats/__init__.py | 2 +- src/canmatrix/formats/wireshark.py | 140 ++++++++++++++++++++++++++ src/canmatrix/tests/test_wireshark.py | 49 +++++++++ 5 files changed, 319 insertions(+), 11 deletions(-) create mode 100644 examples/dissect_cannelloni.lua create mode 100644 src/canmatrix/formats/wireshark.py create mode 100644 src/canmatrix/tests/test_wireshark.py diff --git a/docs/formats.rst b/docs/formats.rst index f85ac4ce..f7656473 100644 --- a/docs/formats.rst +++ b/docs/formats.rst @@ -15,16 +15,17 @@ There are several importers (read) and exporters (write) for this object. * .sym [peak](http://www.peak-system.com) pcan can description * supported file formats for export: - - * .dbc - * .dbf - * .kcd - * .xls(x) - * .json [Canard](https://github.com/ericevenchick/CANard) (open source!) - * .arxml (very basic implementation) - * .yaml (dump of the python object) - * .sym - * .xml fibex + * .dbc + * .dbf + * .kcd + * .xls(x) + * .json [Canard](https://github.com/ericevenchick/CANard) (open source!) + * .arxml (very basic implementation) + * .yaml (dump of the python object) + * .sym + * .xml fibex + * .py [scapy] (https://scapy.net/) scapy can message decoder + * .lua [wireshark] wireshark can subdissector Export @@ -73,3 +74,52 @@ ______ |xls(x)|+ |+ |+ |+ |+ | | |+ |p |p | |p | | +------+----+-----+-------------+---------+---------+---------+--------+---------+-------+-------+----------+------------+-------------+ + +Scapy Export +____________ + +Create can frame decoder for some can definition + +Example: + + $ canconvert source.dbc target.py + +in scapy use like this: + +.. code-block:: python + + load_contrib("target") + sock = CANSocket("can0", basecls=DBC) + pkt = sock.recv() + + +Wireshark Dissector +___________________ + + $ canconvert source.dbc target.py + +Example: + + $ canconvert source.sdbc target.lua + +in wireshark use like this: + + $ wireshark -X lua_script:target.lua + + Linux socketcan can directly traced with wireshark. In wireshark select some can frame. + Right-click and select *decode as* and select *SIGNALDECODE* as subdissector + + *dissect_canneloni.lua* in the canmatrix example folder shows an example for decoding can + frames which are packet in UDP frames by cannelone (https://github.com/mguentner/cannelloni, https://github.com/PhilippFux/cannelloni) + + you could use it like: + + .. code-block:: bash + + $ chdir canmatrix/examples + $ canconvert some.dbc can_database.lua + $ wireshark wireshark -X lua_script:dissect_cannelloni.lua + + note: default cannelloni is mapped to UDP port 3333, you have to change it + + note: *can_database* is hard coded in *dissect_cannelloni.lua*, you can customize it there diff --git a/examples/dissect_cannelloni.lua b/examples/dissect_cannelloni.lua new file mode 100644 index 00000000..7dc509fd --- /dev/null +++ b/examples/dissect_cannelloni.lua @@ -0,0 +1,69 @@ +--- dissects cannelloni packages +--- https://github.com/mguentner/cannelloni +--- https://github.com/PhilippFux/cannelloni +--- +--- canneloni frame +cannelloni_protocol = Proto("Cannelloni", "Can over UPD Cannelloni") + +cannelloni_version = ProtoField.int8("canneloni.version", "version", base.DEC) +cannelloni_opcode = ProtoField.int8("canneloni.opcode", "opcode", base.DEC) +cannelloni_seq_no = ProtoField.int8("canneloni.seq_no", "seq_no", base.DEC) +cannelloni_count = ProtoField.int16("canneloni.count", "count", base.DEC) +cannelloni_protocol.fields = {cannelloni_version, cannelloni_opcode, cannelloni_seq_no, cannelloni_count} + +--- Can Frame +can_frame = Proto("MyFrame", "My Can Frame") +can_frame_id = ProtoField.uint32("can.frame.arbitration_id", "can_id", base.HEX) +can_frame_is_extended = ProtoField.string("can.frame.is_extended", "is_extended") +can_frame_dlc = ProtoField.uint8("can.frame.dlc", "dlc", base.DEC) +can_frame_pdu = ProtoField.uint64("can.frame.pdu", "pdu", base.HEX) +can_frame.fields = {can_frame_id, can_frame_is_extended, can_frame_dlc, can_frame_pdu} + +--- select your database - generated with canmatrix here [canconvert some.dbc can_database.lua] +require "can_database" + +debug_example_protocol = false +cannelloni_header_offset = 5 + +function cannelloni_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = cannelloni_protocol.name + + local subtree = tree:add(cannelloni_protocol, buffer(), "Cannelloni Protocol Data") + subtree:add(cannelloni_version, buffer(0,1)) + subtree:add(cannelloni_opcode, buffer(1,1)) + subtree:add(cannelloni_seq_no, buffer(2,1)) + subtree:add(cannelloni_count, buffer(3,2)) + + local count = buffer(3,2):uint() + buffer_offset = cannelloni_header_offset + + --- each frame: + for i=1,count do + local framesubtree = subtree:add(can_frame, buffer(), "Can Frame" .. tostring(i)) + + can_id = buffer(buffer_offset,4) + framesubtree:add(can_frame_id, can_id:bitfield(1,31)) + if can_id:bitfield(0,1) == 1 then + framesubtree:add(can_frame_is_extended, "True") + else + framesubtree:add(can_frame_is_extended, "False") + end + + framesubtree:add(can_frame_dlc, buffer(buffer_offset+4,1)) + local dlc = buffer(buffer_offset+4,1):uint() + + pdu = buffer(buffer_offset+5,dlc) + framesubtree:add(can_frame_pdu, pdu) + add_frame_info(can_id:uint(), pdu, dlc, framesubtree) + + buffer_offset = buffer_offset + 4 + 1 + dlc + end +end + +example_add_tree_info = true + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(3333, cannelloni_protocol) \ No newline at end of file diff --git a/src/canmatrix/formats/__init__.py b/src/canmatrix/formats/__init__.py index 626a1e41..ada5a393 100644 --- a/src/canmatrix/formats/__init__.py +++ b/src/canmatrix/formats/__init__.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) moduleList = ["arxml", "csv", "dbc", "dbf", "json", - "kcd", "fibex", "sym", "xls", "xlsx", "yaml", "scapy"] + "kcd", "fibex", "sym", "xls", "xlsx", "yaml", "scapy", "wireshark"] loadedFormats = [] supportedFormats = {} # type: typing.MutableMapping[str, typing.MutableSequence[str]] extensionMapping = {} diff --git a/src/canmatrix/formats/wireshark.py b/src/canmatrix/formats/wireshark.py new file mode 100644 index 00000000..22b60152 --- /dev/null +++ b/src/canmatrix/formats/wireshark.py @@ -0,0 +1,140 @@ +# Copyright (c) 2019, Eduard Broecker +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that +# the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this list of conditions and the +# following disclaimer. +# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. + +# +# this script exports lua files for use with wireshark as dissector + +import textwrap +import typing + +import canmatrix + +extension = "lua" + + +def get_coorect_bits_for_signal(frame, signal, signal_size = None): + if not signal_size: + signal_size = signal.size + if signal.is_little_endian: + name_of_bitfield = "reversed_pdu" + start_bit = (frame.size*8) - signal.start_bit - signal.size + else: + name_of_bitfield = "pdu" + start_bit = signal.start_bit + return '{}:bitfield({},{})'.format(name_of_bitfield, start_bit , signal_size) + +def create_dissect_signal(frame, signal, indent = 0): + dissector_string = "" + + bits_for_signal = get_coorect_bits_for_signal(frame, signal) + + if signal.is_signed and not signal.is_float: + dissector_string += ' '*indent + ' is_signed = {}\n'.format(get_coorect_bits_for_signal(frame, signal, 1)) + dissector_string += ' '*indent +' if is_signed == 1 then\n' + dissector_string += ' '*indent +' my_frame_tree:add({}_{}, {} - {})\n'.format(frame.name, signal.name, bits_for_signal, 1 << signal.size) + dissector_string += ' '*indent +' else\n' + dissector_string += ' '*indent +' my_frame_tree:add({}_{}, {})\n'.format(frame.name, signal.name, bits_for_signal) + dissector_string += ' '*indent +' end\n' + else: + dissector_string += ' '*indent + " my_frame_tree:add({}_{}, {})\n".format(frame.name, signal.name, bits_for_signal) + return dissector_string + + +def dump(db, f, **options): # type: (canmatrix.CanMatrix, typing.IO, **typing.Any) -> None + wireshark_dissector = textwrap.dedent(""" + --- lua dissector exported by canmatrix + --- may be buggy. currently float decoding is corrupt + --- if you see this and want to improve the lua code please help at github.com/ebroecker/canamtrix + + --- global function for reversing pdu + --- helper is needed to decode little endian + function do_reverse_pdu(pdu, length) + local rev=ByteArray.new() + rev:set_size(length) + + for i=0,length-1 do + rev:set_index(length-i-1, pdu(i,1):uint()) + end + return ByteArray.tvb(rev, "my Tvb"):range(0,length) + + end + """) + + + for frame in db.frames: + wireshark_dissector += "--- Frame: {}\n".format(frame.name) + wireshark_dissector += '{} = Proto("{}", "{}") \n'.format(frame.name, frame.name, frame.name) + + for signal in frame.signals: + if signal.is_float: + wireshark_dissector += u'{}_{} = ProtoField.float("can.{}.{}", "{}")\n'.format(frame.name, + signal.name, + frame.name, + signal.name, + signal.name) + else: + wireshark_dissector += u'{}_{} = ProtoField.int32("can.{}.{}", "{}", base.DEC)\n'.format(frame.name, signal.name, frame.name, signal.name, signal.name) + + wireshark_dissector += "{}.fields = {{".format(frame.name) + wireshark_dissector += ",".join([frame.name + "_" + s.name for s in frame.signals]) + wireshark_dissector += "}\n\n" + + + wireshark_dissector += "function add_frame_info(can_id, pdu, dlc, framesubtree)\n" + wireshark_dissector += " reversed_pdu = do_reverse_pdu(pdu, dlc)\n" + + for frame in db.frames: + wireshark_dissector += " if can_id == {} then\n".format(frame.arbitration_id.id) + wireshark_dissector += " local my_frame_tree = framesubtree:add({}, pdu(0, dlc))\n".format(frame.name) + wireshark_dissector += " local is_signed\n" + if frame.is_multiplexed and not frame.is_complex_multiplexed: + multiplexer = frame.get_multiplexer + wireshark_dissector += u' local muxer = {}\n'.format(get_coorect_bits_for_signal(frame,multiplexer)) + for signal in frame.signals: + if signal != multiplexer and signal.mux_val is not None: + wireshark_dissector += ' if muxer == {} then \n'.format(signal.mux_val) + wireshark_dissector += create_dissect_signal(frame, signal, indent=2) + wireshark_dissector += ' end\n' + elif signal != multiplexer: + wireshark_dissector += create_dissect_signal(frame, signal) + else: + for signal in frame.signals: + wireshark_dissector += create_dissect_signal(frame, signal) + wireshark_dissector += " end\n" + + wireshark_dissector += "end\n" + + wireshark_dissector += textwrap.dedent(""" + local can_database_decoder = Proto.new("CanSignalDecoder", "Can Signal Decoder") + can_database_can_id = ProtoField.uint32("can.frame.arbitration_id", "can_id", base.HEX) + can_database_decoder.fields = {can_database_can_id} + + local f_can_id = Field.new("can.id") + + function can_database_decoder.dissector(buffer, pinfo, tree) + local can_id = f_can_id() + local pktlen = buffer:reported_length_remaining() + add_frame_info(can_id.tvb:le_uint(), buffer(0, pktlen), pktlen, tree) + end + + DissectorTable.get("can.subdissector"):add_for_decode_as(can_database_decoder) + """) + + f.write(wireshark_dissector.encode("utf8")) diff --git a/src/canmatrix/tests/test_wireshark.py b/src/canmatrix/tests/test_wireshark.py new file mode 100644 index 00000000..1a7f9071 --- /dev/null +++ b/src/canmatrix/tests/test_wireshark.py @@ -0,0 +1,49 @@ +import canmatrix.formats.wireshark +import io +import os + +def test_wireshark_frame_exists(): + db = canmatrix.CanMatrix() + db.add_frame(canmatrix.Frame("some_frame")) + outlua = io.BytesIO() + canmatrix.formats.dump(db, outlua, "wireshark") + + assert 'some_frame = Proto("some_frame", "some_frame")' in outlua.getvalue().decode("utf8") + + +def test_wireshark_muliplexed_frame(): + here = os.path.dirname(os.path.realpath(__file__)) + db = canmatrix.formats.loadp_flat(os.path.join(here, "test_frame_decoding.dbc")) + outlua = io.BytesIO() + canmatrix.formats.dump(db, outlua, "wireshark") + assert "if muxer ==" in outlua.getvalue().decode("utf8") + assert "if muxer == 0" in outlua.getvalue().decode("utf8") + assert "if muxer == 1" in outlua.getvalue().decode("utf8") + + +def test_wireshark_signal_exists(): + db = canmatrix.CanMatrix() + + db.add_frame(canmatrix.Frame("some_frame")) + db.frame_by_name("some_frame").add_signal(canmatrix.Signal("some_signal", start_bit=3, size=11, factor=1.5, offset=42, unit="cm" )) + + outlua = io.BytesIO() + canmatrix.formats.dump(db, outlua, "wireshark") + + assert 'my_frame_tree:add(some_frame_some_signal, reversed_pdu:bitfield(-14,11))' in outlua.getvalue().decode("utf8") + assert 'my_frame_tree:add(some_frame_some_signal, reversed_pdu:bitfield(-14,11) - 2048)' in outlua.getvalue().decode("utf8") + +def test_wireshark_get_coorect_bits_for_signal(): + frame = canmatrix.Frame("some_frame") + sig_big_endian = canmatrix.Signal("some_signal", is_little_endian=False, start_bit=3, size=11, factor=1.5, offset=42, unit="cm") + sig_little_endian = canmatrix.Signal("some_signal2", is_little_endian=True, start_bit=3, size=11, factor=1.5, offset=42, unit="cm") + frame.add_signal(sig_big_endian) + frame.add_signal(sig_little_endian) + + assert 'pdu:bitfield(3,11)' == canmatrix.formats.wireshark.get_coorect_bits_for_signal(frame, sig_big_endian) + assert 'reversed_pdu:bitfield(-14,11)' == canmatrix.formats.wireshark.get_coorect_bits_for_signal(frame, sig_little_endian) + assert 'pdu:bitfield(3,3)' == canmatrix.formats.wireshark.get_coorect_bits_for_signal(frame, sig_big_endian, 3) + + + + From 60f09eda414232eac1744a2d91cf0d500144fed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Fri, 18 Oct 2019 13:16:58 +0200 Subject: [PATCH 27/39] [WIP] cycle_time as generic signal and frame attribute (#405) * implement cycle_time as generic signal and frame attribute / remove Gen[Msg/Sig]cycle from attributes #146 * use effective frame cycle time for export use gcd of singnal-cycletimes for calculating effective cycle time This removes one (of many) dbc specific parts from canmatrix and other formats --- docs/cli.rst | 2 ++ examples/BusmasterRestbus.py | 4 +-- examples/createccl.py | 4 +-- src/canmatrix/canmatrix.py | 32 +++++++++++++--------- src/canmatrix/cli/convert.py | 4 +-- src/canmatrix/formats/arxml.py | 5 ++-- src/canmatrix/formats/dbc.py | 22 ++++++++++++++- src/canmatrix/formats/kcd.py | 11 +++----- src/canmatrix/formats/sym.py | 17 ++++-------- src/canmatrix/formats/xls.py | 3 +-- src/canmatrix/formats/xls_common.py | 4 +-- src/canmatrix/formats/xlsx.py | 3 +-- src/canmatrix/tests/test_canmatrix.py | 24 +++++++++++++++++ src/canmatrix/tests/test_cli_convert.py | 2 +- src/canmatrix/tests/test_dbc.py | 36 +++++++++++++++++++++++++ test/createTestMatrix.py | 4 +-- 16 files changed, 126 insertions(+), 51 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index 99241559..e56ca0b9 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -414,6 +414,8 @@ ____________________ * yaml +* scapy +* lua * json: --jsonExportCanard diff --git a/examples/BusmasterRestbus.py b/examples/BusmasterRestbus.py index 8d003c25..96bc2b59 100755 --- a/examples/BusmasterRestbus.py +++ b/examples/BusmasterRestbus.py @@ -171,10 +171,10 @@ def ticker_ecus(db, dbcname): bu._cycles = {} for frame in db.frames: if bu.name in frame.transmitters: - if "GenMsgCycleTime" in frame.attributes and "GenMsgStartValue" in frame.attributes: + if frame.effective_cycle_time != 0 and "GenMsgStartValue" in frame.attributes: data = frame.attributes["GenMsgStartValue"][1:-2] dlc = (math.floor(len(data) / 2)) - cycleTime = int(frame.attributes["GenMsgCycleTime"]) + cycleTime = frame.effective_cycle_time if float(cycleTime) > 0: if cycleTime in bu._cycles: bu._cycles[cycleTime].append(frame.arbitration_id.id) diff --git a/examples/createccl.py b/examples/createccl.py index dfc6814c..b186c416 100755 --- a/examples/createccl.py +++ b/examples/createccl.py @@ -99,9 +99,9 @@ def main(): txDict[frame] = sendIndex sendIndex += 1 # print frame.name -# if "GenMsgCycleTime" in frame.attributes and int(frame.attributes["GenMsgCycleTime"]) != 0: +# if frame.effective_cycletime != 0: # print frame.name, -# print frame.attributes["GenMsgCycleTime"] +# print frame.effective_cycletime # ccl_h += createStoreMacrosForFrame(frame, "_" + frame.name + "_") tempStr = "" diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 3d603756..53e12a15 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -33,6 +33,7 @@ import itertools import logging import math +import fractions import struct import typing from builtins import * @@ -165,6 +166,8 @@ class Signal(object): calc_min_for_none = attr.ib(default=True) # type: bool calc_max_for_none = attr.ib(default=True) # type: bool + cycle_time = attr.ib(default=0) # type: int + min = attr.ib( converter=lambda value, float_factory=float_factory: ( float_factory(value) @@ -754,6 +757,8 @@ class Frame(object): receivers = attr.ib(factory=list) # type: typing.MutableSequence[str] signalGroups = attr.ib(factory=list) # type: typing.MutableSequence[SignalGroup] + cycle_time = attr.ib(default=0) # type: int + is_j1939 = attr.ib(default=False) # type: bool # ('cycleTime', '_cycleTime', int, None), # ('sendType', '_sendType', str, None), @@ -828,27 +833,30 @@ def source(self, value): # type: (int) -> None self.arbitration_id.j1939_source = value - # @property - # def cycleTime(self): - # if self._cycleTime is None: - # self._cycleTime = self.attribute("GenMsgCycleTime") - # return self._cycleTime - # + @property + def effective_cycle_time(self): + """Calculate effective cycle time for frame, depending on singal cycle times""" + min_cycle_time_list = [y for y in [x.cycle_time for x in self.signals] + [self.cycle_time] if y != 0] + if len(min_cycle_time_list) == 0: + return 0 + elif len(min_cycle_time_list) == 1: + return min_cycle_time_list[0] + else: + gcd = fractions.gcd(min_cycle_time_list[0],min_cycle_time_list[1]) + for i in range(2,len(min_cycle_time_list)): + gcd = fractions.gcd(gcd, min_cycle_time_list[i]) + return gcd + # return min(min_cycle_time_list) + # @property # def sendType(self, db = None): # if self._sendType is None: # self._sendType = self.attribute("GenMsgSendType") # return self._sendType # - # @cycleTime.setter - # def cycleTime(self, value): - # self._cycleTime = value - # self.attributes["GenMsgCycleTime"] = value - # # @sendType.setter # def sendType(self, value): # self._sendType = value - # self.attributes["GenMsgCycleTime"] = value def attribute(self, attribute_name, db=None, default=None): # type: (str, typing.Optional[CanMatrix], typing.Any) -> typing.Any diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index 0a5d331a..c8e96216 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -59,7 +59,7 @@ def get_formats(): @click.option('--deleteSignal', 'deleteSignal', help="delete Signal form databases. (comma separated list)\nSyntax: --deleteSignal=mySignal1,mySecondSignal") @click.option('--renameSignal', 'renameSignal', help="rename Signal form databases. (comma separated list)\nSyntax: --renameSignal=myOldSignal:myNewSignal,mySecondSignal:mySecondNewSignal") @click.option('--deleteZeroSignals/--no-deleteZeroSignals', 'deleteZeroSignals', default=False, help="delete zero length signals (signals with 0 bit length) from matrix\ndefault False") -@click.option('--deleteSignalAttributes', 'deleteSignalAttributes', help="delete attributes from all signals\nExample --deleteSignalAttributes GenMsgCycle,CycleTime") +@click.option('--deleteSignalAttributes', 'deleteSignalAttributes', help="delete attributes from all signals\nExample --deleteSignalAttributes GenMsgSomeVar,CycleTime") @click.option('--deleteFrame', 'deleteFrame', help="delete Frame form databases. (comma separated list)\nSyntax: --deleteFrame=myFrame1,mySecondFrame") @click.option('--renameFrame', 'renameFrame', help="increment each frame.id in database by increment\nSyntax: --frameIdIncrement=increment") @click.option('--addFrameReceiver', 'addFrameReceiver', help="add receiver Ecu to frame(s) (comma separated list)\nSyntax: --addFrameReceiver=framename:myNewEcu,mySecondEcu:myNEWEcu") @@ -69,7 +69,7 @@ def get_formats(): @click.option('--recalcDLC', 'recalcDLC', help="recalculate dlc; max: use maximum of stored and calculated dlc; force: force new calculated dlc") @click.option('--skipLongDlc', 'skipLongDlc', help="skip all Frames with dlc bigger than given threshold") @click.option('--cutLongFrames', 'cutLongFrames', help="cut all signals out of Frames with dlc bigger than given threshold") -@click.option('--deleteFrameAttributes', 'deleteFrameAttributes', help="delete attributes from all frames\nExample --deleteFrameAttributes GenMsgCycle,CycleTime") +@click.option('--deleteFrameAttributes', 'deleteFrameAttributes', help="delete attributes from all frames\nExample --deleteFrameAttributes GenMsgSomeVar,CycleTime") @click.option('--ecus', help="Copy only given ECUs (comma separated list) to target matrix") @click.option('--frames', help="Copy only given Frames (comma separated list) to target matrix") @click.option('--signals', help="Copy only given Signals (comma separated list) to target matrix just as 'free' signals without containing frame") diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index cb6343d8..5aaee5ba 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -1316,11 +1316,11 @@ def store_frame_timings(target_frame, cyclic_timing, event_timing, minimum_delay value = get_child(repeating_time, "VALUE", root_or_cache, ns) if value is not None: - target_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) + target_frame.cycle_time = int(float_factory(value.text) * 1000) elif cyclic_timing is not None: value = get_child(time_period, "VALUE", root_or_cache, ns) if value is not None: - target_frame.add_attribute("GenMsgCycleTime", str(int(float_factory(value.text) * 1000))) + target_frame.cycle_time = int(float_factory(value.text) * 1000) def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_factory): @@ -1659,7 +1659,6 @@ def load(file, **options): db.add_ecu_defines("NWM-Stationsadresse", 'HEX 0 63') db.add_ecu_defines("NWM-Knoten", 'ENUM "nein","ja"') db.add_signal_defines("LongName", 'STRING') - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') db.add_frame_defines("GenMsgDelayTime", 'INT 0 65535') db.add_frame_defines("GenMsgNrOfRepetitions", 'INT 0 65535') db.add_frame_defines("GenMsgStartValue", 'STRING') diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index c51884e2..40cc1cbc 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -226,7 +226,12 @@ def dump(in_db, f, **options): numbered_names = collections.OrderedDict() # type: ignore + if frame.cycle_time != 0: + frame.add_attribute("GenMsgCycleTime", frame.cycle_time) + for signal in frame.signals: + if signal.cycle_time != 0: + signal.add_attribute("GenSigCycleTime", signal.cycle_time) name = normalized_names[signal] if compatibility: name = re.sub("[^A-Za-z0-9]", whitespace_replacement, name) @@ -238,6 +243,13 @@ def dump(in_db, f, **options): name += str(duplicate_signal_counter[name] - 1) output_names[frame][signal] = name + if max([x.cycle_time for x in db.frames]) > 0: + db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') + if max([x.cycle_time for y in db.frames for x in y.signals]) > 0: + db.add_signal_defines("GenSigCycleTime", 'INT 0 65535') + + + # Frames for frame in db.frames: multiplex_written = False @@ -905,6 +917,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None ecu.name = ecu.attributes.get("SystemNodeLongSymbol")[1:-1] ecu.del_attribute("SystemNodeLongSymbol") for frame in db.frames: + frame.cycle_time = int(frame.attributes.get("GenMsgCycleTime", 0)) if frame.attributes.get("SystemMessageLongSymbol", None) is not None: frame.name = frame.attributes.get("SystemMessageLongSymbol")[1:-1] frame.del_attribute("SystemMessageLongSymbol") @@ -917,6 +930,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None # frame.extended = 1 for signal in frame.signals: + signal.cycle_time = int(signal.attributes.get("GenSigCycleTime", 0)) if signal.attribute("SystemSignalLongSymbol") is not None: signal.name = signal.attribute("SystemSignalLongSymbol")[1:-1] signal.del_attribute("SystemSignalLongSymbol") @@ -947,9 +961,15 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None frame.is_fd = True if "J1939PG" in frame.attributes.get("VFrameFormat", ""): frame.is_j1939 = True - db.update_ecu_list() db.del_ecu("Vector__XXX") + db.del_frame_attributes(["GenMsgCycleTime"]) + db.del_signal_attributes(["GenSigCycleTime"]) + if "GenMsgCycleTime" in db.frame_defines: + del (db.frame_defines["GenMsgCycleTime"]) + if "GenSigCycleTime" in db.signal_defines: + del (db.signal_defines["GenSigCycleTime"]) + free_signals_dummy_frame = db.frame_by_name("VECTOR__INDEPENDENT_SIG_MSG") if free_signals_dummy_frame is not None and free_signals_dummy_frame.arbitration_id.id == 0x40000000: db.signals = free_signals_dummy_frame.signals diff --git a/src/canmatrix/formats/kcd.py b/src/canmatrix/formats/kcd.py index 051796c6..929f5b35 100644 --- a/src/canmatrix/formats/kcd.py +++ b/src/canmatrix/formats/kcd.py @@ -179,11 +179,9 @@ def dump(dbs, f, **_options): if frame.arbitration_id.extended == 1: message.set("format", "extended") - if "GenMsgCycleTime" in db.frame_defines: - cycle_time = frame.attribute("GenMsgCycleTime", db=db) - if cycle_time is not None and int(cycle_time) > 0: - message.set("triggered", "true") - message.set("interval", "%d" % int(cycle_time)) + if frame.effective_cycle_time != 0: + message.set("triggered", "true") + message.set("interval", "%d" % int(frame.effective_cycle_time)) comment_elem = lxml.etree.Element('Notes') if frame.comment is not None: @@ -357,7 +355,6 @@ def load(f, **options): counter = 0 for bus in buses: db = canmatrix.CanMatrix() - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') for node in nodes: db.ecus.append(canmatrix.Ecu(node.get('name'))) node_list[node.get('id')] = node.get('name') @@ -370,7 +367,7 @@ def load(f, **options): new_frame = canmatrix.Frame(message.get('name')) if 'triggered' in message.attrib: - new_frame.add_attribute("GenMsgCycleTime", message.get('interval')) + new_frame.cycle_time = int(message.get('interval')) if 'length' in message.attrib: dlc = int(message.get('length')) diff --git a/src/canmatrix/formats/sym.py b/src/canmatrix/formats/sym.py index 9e058dd5..d625cef1 100644 --- a/src/canmatrix/formats/sym.py +++ b/src/canmatrix/formats/sym.py @@ -258,10 +258,8 @@ def send_receive(for_frame): mux_out += id_type first = 1 mux_out += "DLC=%d\n" % frame.size - if "GenMsgCycleTime" in db.frame_defines: - cycle_time = frame.attribute("GenMsgCycleTime", db=db) - if cycle_time is not None: - mux_out += "CycleTime=" + str(cycle_time) + "\n" + if frame.cycle_time != 0: + mux_out += "CycleTime=" + str(frame.effective_cycle_time) + "\n" mux_name = frame.mux_names.get(i, mux_signal.name + "%d" % i) @@ -299,10 +297,8 @@ def send_receive(for_frame): output += name output += id_type output += "DLC=%d\n" % frame.size - if "GenMsgCycleTime" in db.frame_defines: - cycle_time = frame.attribute("GenMsgCycleTime", db=db) - if cycle_time is not None: - output += "CycleTime=" + str(cycle_time) + "\n" + if frame.cycle_time != 0: + output += "CycleTime=" + str(frame.effective_cycle_time) + "\n" for signal in frame.signals: output += create_signal(db, signal) output += "\n" @@ -330,7 +326,6 @@ class Mode(object): frame = None db = canmatrix.CanMatrix() - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') db.add_frame_defines("Receivable", 'BOOL False True') db.add_frame_defines("Sendable", 'BOOL False True') db.add_signal_defines("GenSigStartValue", 'FLOAT -3.4E+038 3.4E+038') @@ -605,9 +600,7 @@ class Mode(object): frame.size = int(line.split('=')[1]) elif line.startswith('CycleTime'): - frame.add_attribute( - "GenMsgCycleTime", - line.split('=')[1].strip()) + frame.cycle_time = int(line.split('=')[1].strip()) # else: # print line # else: diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index 485d73c6..4fb54527 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -351,7 +351,6 @@ def load(file, **options): # Defines not imported... # db.add_ecu_defines("NWM-Stationsadresse", 'HEX 0 63') # db.add_ecu_defines("NWM-Knoten", 'ENUM "nein","ja"') - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') db.add_frame_defines("GenMsgDelayTime", 'INT 0 65535') db.add_frame_defines("GenMsgCycleTimeActive", 'INT 0 65535') db.add_frame_defines("GenMsgNrOfRepetitions", 'INT 0 65535') @@ -452,7 +451,7 @@ def load(file, **options): cycle_time = int(cycle_time) except: cycle_time = 0 - new_frame.add_attribute("GenMsgCycleTime", str(int(cycle_time))) + new_frame.cycle_time = cycle_time for additional_index in additional_inputs: if "frame" in additional_inputs[additional_index]: diff --git a/src/canmatrix/formats/xls_common.py b/src/canmatrix/formats/xls_common.py index 56da44dc..19965e3f 100644 --- a/src/canmatrix/formats/xls_common.py +++ b/src/canmatrix/formats/xls_common.py @@ -38,9 +38,7 @@ def get_frame_info(db, frame): # frame-Name ret_array.append(frame.name) - if "GenMsgCycleTime" in db.frame_defines: - # determine cycle-time - ret_array.append(frame.attribute("GenMsgCycleTime", db=db)) + ret_array.append(frame.effective_cycle_time) # determine send-type if "GenMsgSendType" in db.frame_defines: diff --git a/src/canmatrix/formats/xlsx.py b/src/canmatrix/formats/xlsx.py index f5061bb0..4803655c 100644 --- a/src/canmatrix/formats/xlsx.py +++ b/src/canmatrix/formats/xlsx.py @@ -402,7 +402,6 @@ def load(filename, **options): letter_index += ["%s%s" % (a, b) for a in all_letters for b in all_letters] # Defines not imported... - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') db.add_frame_defines("GenMsgDelayTime", 'INT 0 65535') db.add_frame_defines("GenMsgCycleTimeActive", 'INT 0 65535') db.add_frame_defines("GenMsgNrOfRepetitions", 'INT 0 65535') @@ -465,7 +464,7 @@ def load(filename, **options): if launch_type not in launch_types: launch_types.append(launch_type) - new_frame.add_attribute("GenMsgCycleTime", cycle_time) + new_frame.cycle_time = cycle_time # new signal detected if 'Signal Name' in row and row['Signal Name'] != signal_name: diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index 8476b5f7..92acf8af 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -985,3 +985,27 @@ def test_canmatrix_del_frame_by_instance(empty_matrix): empty_matrix.del_frame(f1) assert empty_matrix.frames == [f2] +def test_effective_cycle_time(): + frame = canmatrix.Frame() + sig1 = canmatrix.Signal(name = "s1", cycle_time=1) + sig2 = canmatrix.Signal(name = "s2", cycle_time=0) + frame.add_signal(sig1) + frame.add_signal(sig2) + assert frame.effective_cycle_time == 1 + + sig2.cycle_time = 2 + assert frame.effective_cycle_time == 1 + + sig1.cycle_time = 4 + assert frame.effective_cycle_time == 2 + + sig1.cycle_time = 3 + assert frame.effective_cycle_time == 1 + + frame.cycle_time = 1 + assert frame.effective_cycle_time == 1 + + frame.cycle_time = 0 + sig1.cycle_time = 0 + sig2.cycle_time = 0 + assert frame.effective_cycle_time == 0 diff --git a/src/canmatrix/tests/test_cli_convert.py b/src/canmatrix/tests/test_cli_convert.py index a8fa16c4..dff08268 100644 --- a/src/canmatrix/tests/test_cli_convert.py +++ b/src/canmatrix/tests/test_cli_convert.py @@ -64,7 +64,7 @@ def create_dbc_with_special_char(): db = canmatrix.CanMatrix() db.add_frame(myFrame) - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') + db.add_frame_defines("SomeUnneededDefine", 'INT 0 65535') canmatrix.formats.dumpp({"": db}, outFile, dbcExportEncoding='iso-8859-1', dbcExportCommentEncoding='iso-8859-1') return outFile diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index 3d7414dd..60da071f 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -319,3 +319,39 @@ def test_signal_definition_with_spaces_iss358(): SG_ AccSts : 62|3@0+ (1.0, 0.0) [0.0|0.0] "" VDDM ''').encode('utf-8')) matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") + + +def test_cycle_time_handling(): + dbc = io.BytesIO(textwrap.dedent(u'''\ + BO_ 17 Frame_1: 8 Vector__XXX + SG_ sig2 : 8|8@1- (1,0) [0|0] "" Vector__XXX + SG_ sig1 : 0|8@1- (1,0) [0|0] "" Vector__XXX + + + BA_DEF_ BO_ "GenMsgCycleTime" INT 0 3600000; + BA_DEF_ SG_ "GenSigCycleTime" INT 0 3600000; + BA_DEF_DEF_ "GenMsgCycleTime" 0; + BA_DEF_DEF_ "GenSigCycleTime" 0; + BA_ "GenMsgCycleTime" BO_ 17 100; + BA_ "GenSigCycleTime" SG_ 17 sig2 20; + BA_ "GenSigCycleTime" SG_ 17 sig1 10; + ''').encode('utf-8')) + matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") + + assert matrix.frames[0].cycle_time == 100 + assert matrix.frames[0].signal_by_name("sig1").cycle_time == 10 + assert matrix.frames[0].signal_by_name("sig2").cycle_time == 20 + + assert "GenMsgCycleTime" not in matrix.frame_defines + + outdbc = io.BytesIO() + canmatrix.formats.dump(matrix, outdbc, "dbc") + + assert 'BA_ "GenMsgCycleTime" BO_ 17 100;' in outdbc.getvalue().decode('utf8') + assert 'BA_ "GenSigCycleTime" SG_ 17 sig2 20;' in outdbc.getvalue().decode('utf8') + assert 'BA_ "GenSigCycleTime" SG_ 17 sig1 10;' in outdbc.getvalue().decode('utf8') + + outdbc = io.BytesIO() + canmatrix.formats.dump({"aa":matrix}, outdbc, "kcd") + + print("BEEP") \ No newline at end of file diff --git a/test/createTestMatrix.py b/test/createTestMatrix.py index 88656bb0..1645e963 100755 --- a/test/createTestMatrix.py +++ b/test/createTestMatrix.py @@ -67,9 +67,9 @@ db.ecu_by_name("testBU").add_attribute("NetworkNode", 0x111) db.ecu_by_name("recBU").add_comment("receiver ECU") -db.frame_by_name("testFrame1").add_attribute("GenMsgCycleTime", 100) +db.frame_by_name("testFrame1").cycle_time = 100 + -db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') db.add_ecu_defines("NetworkNode", 'INT 0 65535') From ac6111a5850e19164c38ccfeeac8dc3280e19d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 21 Oct 2019 12:34:48 +0200 Subject: [PATCH 28/39] Iss407: [dbc] Signal Comments with space bevore semicolon broken import (#409) * fix for issue #407 [dbc] Signal Comments with space bevore semicolon broken import --- src/canmatrix/formats/dbc.py | 30 +++++++++++++++--------------- src/canmatrix/tests/test_dbc.py | 11 +++++++++++ 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 40cc1cbc..990f1e56 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -623,13 +623,13 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None frame.is_complex_multiplexed = True elif decoded.startswith("BO_TX_BU_ "): - regexp = re.compile(r"^BO_TX_BU_ ([0-9]+) *: *(.+);") + regexp = re.compile(r"^BO_TX_BU_ ([0-9]+) *: *(.+) *;") temp = regexp.match(decoded) frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) for ecu_name in temp.group(2).split(','): frame.add_transmitter(ecu_name) elif decoded.startswith("CM_ SG_ "): - pattern = r"^CM_ +SG_ +(\w+) +(\w+) +\"(.*)\";" + pattern = r"^CM_ +SG_ +(\w+) +(\w+) +\"(.*)\" *;" regexp = re.compile(pattern) regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) @@ -664,7 +664,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None follow_up = _FollowUps.SIGNAL_COMMENT elif decoded.startswith("CM_ BO_ "): - pattern = r"^CM_ +BO_ +(\w+) +\"(.*)\";" + pattern = r"^CM_ +BO_ +(\w+) +\"(.*)\" *;" regexp = re.compile(pattern) regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) @@ -696,7 +696,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None (i, line)) follow_up = _FollowUps.FRAME_COMMENT elif decoded.startswith("CM_ BU_ "): - pattern = r"^CM_ +BU_ +(\w+) +\"(.*)\";" + pattern = r"^CM_ +BU_ +(\w+) +\"(.*)\" *;" regexp = re.compile(pattern) regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) @@ -738,7 +738,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None db.ecus.append(canmatrix.Ecu(ele)) elif decoded.startswith("VAL_ "): - regexp = re.compile(r"^VAL_ +(\w+) +(\w+) +(.*);") + regexp = re.compile(r"^VAL_ +(\w+) +(\w+) +(.*) *;") temp = regexp.match(decoded) if temp: frame_id = temp.group(1) @@ -758,7 +758,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None logger.info("Warning: environment variables currently not supported") elif decoded.startswith("VAL_TABLE_ "): - regexp = re.compile(r"^VAL_TABLE_ +(\w+) +(.*);") + regexp = re.compile(r"^VAL_TABLE_ +(\w+) +(.*) *;") temp = regexp.match(decoded) if temp: table_name = temp.group(1) @@ -795,7 +795,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None db.add_env_defines(temp.group(1), temp_raw.group(2).decode(dbc_import_encoding)) elif decoded.startswith("BA_DEF_ "): - pattern = r"^BA_DEF_ +\"(.+?)\" +(.+);" + pattern = r"^BA_DEF_ +\"(.+?)\" +(.+) *;" regexp = re.compile(pattern) regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) @@ -809,23 +809,23 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None tempba = regexp.match(decoded) if tempba.group(1).strip().startswith("BO_ "): - regexp = re.compile(r"^BA_ +\"(.+?)\" +BO_ +(\d+) +(.+);") + regexp = re.compile(r"^BA_ +\"(.+?)\" +BO_ +(\d+) +(.+) *;") temp = regexp.match(decoded) get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(2)))).add_attribute( temp.group(1), temp.group(3)) elif tempba.group(1).strip().startswith("SG_ "): - regexp = re.compile(r"^BA_ +\"(.+?)\" +SG_ +(\d+) +(\w+) +(.+);") + regexp = re.compile(r"^BA_ +\"(.+?)\" +SG_ +(\d+) +(\w+) +(.+) *;") temp = regexp.match(decoded) if temp is not None: get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(2)))).signal_by_name( temp.group(3)).add_attribute(temp.group(1), temp.group(4)) elif tempba.group(1).strip().startswith("EV_ "): - regexp = re.compile(r"^BA_ +\"(.+?)\" +EV_ +(\w+) +(.*);") + regexp = re.compile(r"^BA_ +\"(.+?)\" +EV_ +(\w+) +(.*) *;") temp = regexp.match(decoded) if temp is not None: db.add_env_attribute(temp.group(2), temp.group(1), temp.group(3)) elif tempba.group(1).strip().startswith("BU_ "): - regexp = re.compile(r"^BA_ +\"(.*?)\" +BU_ +(\w+) +(.+);") + regexp = re.compile(r"^BA_ +\"(.*?)\" +BU_ +(\w+) +(.+) *;") temp = regexp.match(decoded) db.ecu_by_name( temp.group(2)).add_attribute( @@ -833,13 +833,13 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None temp.group(3)) else: regexp = re.compile( - r"^BA_ +\"([A-Za-z0-9\-_]+)\" +([\"\w\-\.]+);") + r"^BA_ +\"([A-Za-z0-9\-_]+)\" +([\"\w\-\.]+) *;") temp = regexp.match(decoded) if temp: db.add_attribute(temp.group(1), temp.group(2)) elif decoded.startswith("SIG_GROUP_ "): - regexp = re.compile(r"^SIG_GROUP_ +(\w+) +(\w+) +(\w+) +\:(.*);") + regexp = re.compile(r"^SIG_GROUP_ +(\w+) +(\w+) +(\w+) +\:(.*) *;") temp = regexp.match(decoded) frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) if frame is not None: @@ -847,7 +847,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None frame.add_signal_group(temp.group(2), temp.group(3), signal_array) # todo wrong annotation in canmatrix? Id is a string? elif decoded.startswith("SIG_VALTYPE_ "): - regexp = re.compile(r"^SIG_VALTYPE_ +(\w+) +(\w+)\s*\:(.*);") + regexp = re.compile(r"^SIG_VALTYPE_ +(\w+) +(\w+)\s*\:(.*) *;") temp = regexp.match(decoded) frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) if frame: @@ -856,7 +856,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None # SIG_VALTYPE_ 0 float : 1; elif decoded.startswith("BA_DEF_DEF_ "): - pattern = r"^BA_DEF_DEF_ +\"(.+?)\" +(.+?)\;" + pattern = r"^BA_DEF_DEF_ +\"(.+?)\" +(.+?) *;" regexp = re.compile(pattern) regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(decoded) diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index 60da071f..a38be19b 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -53,6 +53,17 @@ def test_create_comment_string(): test_string = canmatrix.formats.dbc.create_comment_string("BO_", "ident", "some comment", "utf8", "utf8", "") assert test_string == b'CM_ BO_ ident "some comment";\n' +def test_parse_comment_from_dbc(): + dbc = io.BytesIO(textwrap.dedent(u'''\ + BO_ 1 someFrame: 1 someEcu + SG_ someSignal: 1|2@0+ (1,0) [0|0] "" CCL_TEST + + CM_ SG_ 1 someSignal "resistance setting (0-100%)" ; + ''').encode('utf-8')) + + matrix = canmatrix.formats.dbc.load(dbc) + assert matrix.frames[0].signals[0].comment == "resistance setting (0-100%)" + print("BEEP") def test_long_frame_name_imports(): long_frame_name = u'A_VERY_LONG_FRAME_NAME_WHICH_SHOULD_BE_SPLIT_SOMEHOW' From 7e431bde62e1d6e84fd0e4812322a0331f54a934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Wed, 23 Oct 2019 21:45:06 +0200 Subject: [PATCH 29/39] make initial value to a native attribute of Signal class (#408) * make initial value to a native attribute of Signal class --- src/canmatrix/canmatrix.py | 8 ++++---- src/canmatrix/formats/arxml.py | 10 +++------- src/canmatrix/formats/dbc.py | 10 ++++++++++ src/canmatrix/formats/sym.py | 22 ++++++---------------- src/canmatrix/formats/xls.py | 6 ------ src/canmatrix/formats/xls_common.py | 11 +---------- src/canmatrix/tests/test_canmatrix.py | 12 +++++------- src/canmatrix/tests/test_dbc.py | 21 +++++++++++++++++++-- src/canmatrix/tests/test_sym.py | 4 +--- src/canmatrix/utils.py | 21 +++++++++++++++++++++ 10 files changed, 70 insertions(+), 55 deletions(-) diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 53e12a15..fb4b4aff 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -33,7 +33,6 @@ import itertools import logging import math -import fractions import struct import typing from builtins import * @@ -167,6 +166,7 @@ class Signal(object): calc_max_for_none = attr.ib(default=True) # type: bool cycle_time = attr.ib(default=0) # type: int + initial_value = attr.ib(converter=float_factory, default=float_factory(0.0)) # type: canmatrix.types.PhysicalValue min = attr.ib( converter=lambda value, float_factory=float_factory: ( @@ -396,7 +396,7 @@ def phys2raw(self, value=None): :rtype: int or decimal.Decimal """ if value is None: - return int(self.attributes.get('GenSigStartValue', 0)) + value = self.initial_value if isinstance(value, basestring): for value_key, value_string in self.values.items(): @@ -842,9 +842,9 @@ def effective_cycle_time(self): elif len(min_cycle_time_list) == 1: return min_cycle_time_list[0] else: - gcd = fractions.gcd(min_cycle_time_list[0],min_cycle_time_list[1]) + gcd = canmatrix.utils.get_gcd(min_cycle_time_list[0],min_cycle_time_list[1]) for i in range(2,len(min_cycle_time_list)): - gcd = fractions.gcd(gcd, min_cycle_time_list[i]) + gcd = canmatrix.utils.get_gcd(gcd, min_cycle_time_list[i]) return gcd # return min(min_cycle_time_list) diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 5aaee5ba..3447bcff 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -1179,10 +1179,7 @@ def get_signals(signal_array, frame, root_or_cache, ns, multiplex_id, float_fact if initvalue is not None and initvalue.text is not None: initvalue.text = canmatrix.utils.guess_value(initvalue.text) - new_signal._initValue = float_factory(initvalue.text) - new_signal.add_attribute("GenSigStartValue", str(new_signal._initValue)) - else: - new_signal._initValue = 0 + new_signal.initial_value = float_factory(initvalue.text) for key, value in list(values.items()): new_signal.add_values(key, value) @@ -1206,7 +1203,7 @@ def get_frame_from_multiplexed_ipdu(pdu, target_frame, multiplex_translation, ro is_little_endian=is_little_endian, multiplex="Multiplexor") - multiplexor._initValue = 0 + multiplexor.initial_value = 0 target_frame.add_signal(multiplexor) static_part = get_child(pdu, "STATIC-PART", root_or_cache, ns) ipdu = get_child(static_part, "I-PDU", root_or_cache, ns) @@ -1666,7 +1663,6 @@ def load(file, **options): db.add_frame_defines( "GenMsgSendType", 'ENUM "cyclicX","spontanX","cyclicIfActiveX","spontanWithDelay","cyclicAndSpontanX","cyclicAndSpontanWithDelay","spontanWithRepitition","cyclicIfActiveAndSpontanWD","cyclicIfActiveFast","cyclicWithRepeatOnDemand","none"') - db.add_signal_defines("GenSigStartValue", 'HEX 0 4294967295') if ignore_cluster_info is True: can_frame_trig = root.findall('.//' + ns + 'CAN-FRAME-TRIGGERING') @@ -1742,7 +1738,7 @@ def load(file, **options): sig_value_hash = dict() for sig in frame.signals: try: - sig_value_hash[sig.name] = sig._initValue + sig_value_hash[sig.name] = sig.phys2raw() except AttributeError: sig_value_hash[sig.name] = 0 frame_data = frame.encode(sig_value_hash) diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 990f1e56..11940e79 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -232,6 +232,9 @@ def dump(in_db, f, **options): for signal in frame.signals: if signal.cycle_time != 0: signal.add_attribute("GenSigCycleTime", signal.cycle_time) + if signal.initial_value != 0: + signal.add_attribute("GenSigStartValue", signal.initial_value) + name = normalized_names[signal] if compatibility: name = re.sub("[^A-Za-z0-9]", whitespace_replacement, name) @@ -248,6 +251,9 @@ def dump(in_db, f, **options): if max([x.cycle_time for y in db.frames for x in y.signals]) > 0: db.add_signal_defines("GenSigCycleTime", 'INT 0 65535') + if max([x.initial_value for y in db.frames for x in y.signals]) > 0 or min([x.initial_value for y in db.frames for x in y.signals]) < 0: + db.add_signal_defines("GenSigStartValue", 'FLOAT 0 100000000000') + # Frames @@ -930,6 +936,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None # frame.extended = 1 for signal in frame.signals: + signal.initial_value = float_factory(signal.attributes.get("GenSigStartValue", "0")) signal.cycle_time = int(signal.attributes.get("GenSigCycleTime", 0)) if signal.attribute("SystemSignalLongSymbol") is not None: signal.name = signal.attribute("SystemSignalLongSymbol")[1:-1] @@ -965,10 +972,13 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None db.del_ecu("Vector__XXX") db.del_frame_attributes(["GenMsgCycleTime"]) db.del_signal_attributes(["GenSigCycleTime"]) + db.del_signal_attributes(["GenSigStartValue"]) if "GenMsgCycleTime" in db.frame_defines: del (db.frame_defines["GenMsgCycleTime"]) if "GenSigCycleTime" in db.signal_defines: del (db.signal_defines["GenSigCycleTime"]) + if "GenSigStartValue" in db.signal_defines: + del (db.signal_defines["GenSigStartValue"]) free_signals_dummy_frame = db.frame_by_name("VECTOR__INDEPENDENT_SIG_MSG") if free_signals_dummy_frame is not None and free_signals_dummy_frame.arbitration_id.id == 0x40000000: diff --git a/src/canmatrix/formats/sym.py b/src/canmatrix/formats/sym.py index d625cef1..f3758ae1 100644 --- a/src/canmatrix/formats/sym.py +++ b/src/canmatrix/formats/sym.py @@ -152,19 +152,11 @@ def create_signal(db, signal): # type: (canmatrix.CanMatrix, canmatrix.Signal) key, val) in sorted( signal.values.items())) + ")" - if "GenSigStartValue" in db.signal_defines: - gen_sig_start_val = signal.attribute("GenSigStartValue", db=db) - if gen_sig_start_val is not None: - factory = ( - signal.float_factory - if signal.is_float - else int - ) - default = factory(gen_sig_start_val) * signal.factor # type: ignore - min_ok = signal.min is None or default >= signal.min - max_ok = signal.max is None or default <= signal.max - if min_ok and max_ok: - output += "/d:{} ".format(default) + default = signal.initial_value # type: ignore + min_ok = signal.min is None or default >= signal.min + max_ok = signal.max is None or default <= signal.max + if min_ok and max_ok: + output += "/d:{} ".format(default) long_name = signal.attributes.get('LongName') if long_name is not None: @@ -328,7 +320,6 @@ class Mode(object): db = canmatrix.CanMatrix() db.add_frame_defines("Receivable", 'BOOL False True') db.add_frame_defines("Sendable", 'BOOL False True') - db.add_signal_defines("GenSigStartValue", 'FLOAT -3.4E+038 3.4E+038') db.add_signal_defines("HexadecimalOutput", 'BOOL False True') db.add_signal_defines("DisplayDecimalPlaces", 'INT 0 65535') db.add_signal_defines("LongName", 'STR') @@ -575,8 +566,7 @@ class Mode(object): # signal.add_comment(comment) # ... (1 / ...) because this somehow made 59.8/0.1 be 598.0 rather than 597.9999999999999 if start_value is not None: - start_value = float_factory(start_value) * (1 / float_factory(factor)) - signal.add_attribute("GenSigStartValue", str(start_value)) + signal.initial_value = float_factory(start_value) frame.add_signal(signal) if long_name is not None: signal.add_attribute("LongName", long_name) diff --git a/src/canmatrix/formats/xls.py b/src/canmatrix/formats/xls.py index 4fb54527..d0870580 100644 --- a/src/canmatrix/formats/xls.py +++ b/src/canmatrix/formats/xls.py @@ -322,7 +322,6 @@ def parse_value_name_column(value_name, value_str, signal_size, float_factory): def read_additional_signal_attributes(signal, attribute_name, attribute_value): - attribute_mapping = {"initial_value": "GenSigStartValue"} if not attribute_name.startswith("signal"): return if attribute_name.replace("signal.", "") in vars(signal): @@ -330,10 +329,6 @@ def read_additional_signal_attributes(signal, attribute_name, attribute_value): command_str += str(attribute_value) if len(str(attribute_value)) > 0: exec(command_str) - elif attribute_name.replace("signal.", "") in attribute_mapping: - signal_attribute = attribute_mapping[attribute_name.replace("signal.", "")] - if len(str(attribute_value)) > 0: - signal.add_attribute(signal_attribute, attribute_value) else: pass @@ -356,7 +351,6 @@ def load(file, **options): db.add_frame_defines("GenMsgNrOfRepetitions", 'INT 0 65535') # db.addFrameDefines("GenMsgStartValue", 'STRING') launch_types = [] # type: typing.List[str] - db.add_signal_defines("GenSigStartValue", 'HEX 0 4294967295') db.add_signal_defines("GenSigSNA", 'STRING') # eval search for correct columns: diff --git a/src/canmatrix/formats/xls_common.py b/src/canmatrix/formats/xls_common.py index 19965e3f..273eb4fe 100644 --- a/src/canmatrix/formats/xls_common.py +++ b/src/canmatrix/formats/xls_common.py @@ -85,16 +85,7 @@ def get_signal(db, sig, motorola_bit_format): front_array.append(sig.size) # start-value of signal available - if "GenSigStartValue" in db.signal_defines: - if db.signal_defines["GenSigStartValue"].definition == "STRING": - front_array.append(sig.attribute("GenSigStartValue", db=db)) - elif db.signal_defines["GenSigStartValue"].definition == "INT" \ - or db.signal_defines["GenSigStartValue"].definition == "HEX": - front_array.append("%Xh" % sig.attribute("GenSigStartValue", db=db)) - else: - front_array.append(" ") - else: - front_array.append(" ") + front_array.append(sig.initial_value) # SNA-value of signal available if "GenSigSNA" in db.signal_defines: diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index 92acf8af..b3551a64 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -43,24 +43,22 @@ def test_encode_signal(): assert s4.phys2raw(s4.min) == 0 s5 = canmatrix.canmatrix.Signal('signal', size=8, offset=2) - assert s5.phys2raw() == 0 + assert s5.phys2raw() == -2 assert s5.phys2raw(10) == 8 assert s5.phys2raw(s5.max) == 127 assert s5.phys2raw(s5.min) == -128 s6 = canmatrix.canmatrix.Signal('signal', size=8, is_signed=False, offset=5) - assert s6.phys2raw() == 0 + assert s6.phys2raw() == -5 assert s6.phys2raw(10) == 5 assert s6.phys2raw(s6.max) == 255 assert s6.phys2raw(s6.min) == 0 - s7 = canmatrix.canmatrix.Signal('signal', size=8) - s7.add_attribute('GenSigStartValue', '5') + s7 = canmatrix.canmatrix.Signal('signal', size=8, initial_value=5) assert s7.phys2raw() == 5 - s8 = canmatrix.canmatrix.Signal('signal', size=8, is_signed=False, offset=5) - s8.add_attribute('GenSigStartValue', '5') - assert s8.phys2raw() == 5 + s8 = canmatrix.canmatrix.Signal('signal', size=8, is_signed=False, offset=5, initial_value=5) + assert s8.phys2raw() == 0 s9 = canmatrix.canmatrix.Signal('signal', size=16, is_signed=False, factor='0.001') assert s9.phys2raw() == 0 diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index a38be19b..17663194 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -3,7 +3,7 @@ import textwrap import string import pytest - +import decimal import canmatrix.formats.dbc @@ -354,6 +354,7 @@ def test_cycle_time_handling(): assert matrix.frames[0].signal_by_name("sig2").cycle_time == 20 assert "GenMsgCycleTime" not in matrix.frame_defines + assert "GenSigCycleTime" not in matrix.signal_defines outdbc = io.BytesIO() canmatrix.formats.dump(matrix, outdbc, "dbc") @@ -365,4 +366,20 @@ def test_cycle_time_handling(): outdbc = io.BytesIO() canmatrix.formats.dump({"aa":matrix}, outdbc, "kcd") - print("BEEP") \ No newline at end of file +def test_signal_inital_value(): + dbc = io.BytesIO(textwrap.dedent(u'''\ + BO_ 17 Frame_1: 8 Vector__XXX + SG_ sig1 : 0|8@1- (1,0) [0|0] "" Vector__XXX + + + BA_DEF_ SG_ "GenSigStartValue" FLOAT 0 100000000000; + BA_ "GenSigStartValue" SG_ 17 sig1 2.7; + ''').encode('utf-8')) + matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") + assert matrix.frames[0].signal_by_name("sig1").initial_value == decimal.Decimal("2.7") + assert "GenSigStartValue" not in matrix.signal_defines + + outdbc = io.BytesIO() + canmatrix.formats.dump(matrix, outdbc, "dbc") + assert 'BA_ "GenSigStartValue" SG_ 17 sig1 2.7;' in outdbc.getvalue().decode('utf8') + diff --git a/src/canmatrix/tests/test_sym.py b/src/canmatrix/tests/test_sym.py index 38438aa6..80b1d4fa 100644 --- a/src/canmatrix/tests/test_sym.py +++ b/src/canmatrix/tests/test_sym.py @@ -83,8 +83,6 @@ def test_parse_longname_with_colon(): ) def test_export_default_decimal_places(is_float, value, expected): matrix = canmatrix.canmatrix.CanMatrix() - # the `FLOAT` type here is irrelevant at the moment... at least for this - matrix.add_signal_defines('GenSigStartValue', 'FLOAT -3.4E+038 3.4E+038') frame = canmatrix.canmatrix.Frame() matrix.add_frame(frame) @@ -93,8 +91,8 @@ def test_export_default_decimal_places(is_float, value, expected): size=32, is_float=is_float, is_signed=False, + initial_value=value, ) - signal.add_attribute('GenSigStartValue', value) frame.add_signal(signal) s = canmatrix.formats.sym.create_signal(db=matrix, signal=signal) diff --git a/src/canmatrix/utils.py b/src/canmatrix/utils.py index f93cbc1e..7df50dd3 100644 --- a/src/canmatrix/utils.py +++ b/src/canmatrix/utils.py @@ -7,6 +7,12 @@ import typing from builtins import * +if sys.version_info >= (3, 5): + import math +else: + import fractions + + def quote_aware_space_split(in_line): # type: (str) -> typing.List[str] if sys.version_info >= (3, 0): # is there a clean way to to it? @@ -39,3 +45,18 @@ def guess_value(text_value): # type: (str) -> str elif text_value in ["true", "on"]: return "1" return text_value + + +def get_gcd(value1, value2): # type (int,int) -> (int) + """ + Get greatest common divisor of value1 and value2 + + :param value1: int value 1 + :param value2: int value 2 + :return: cvt of value 1 and value 2 + """ + + if sys.version_info >= (3, 5): + return math.gcd(value1, value2) + else: + return fractions.gcd(value1, value2) From cf63b07ce57fabab2585d9e75cc9fb068f71fdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=B6cker?= Date: Fri, 25 Oct 2019 14:55:11 +0200 Subject: [PATCH 30/39] [dbf] exended ids corrected --- src/canmatrix/formats/dbf.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/canmatrix/formats/dbf.py b/src/canmatrix/formats/dbf.py index 3c47c545..82c95b79 100644 --- a/src/canmatrix/formats/dbf.py +++ b/src/canmatrix/formats/dbf.py @@ -329,6 +329,14 @@ def dump(mydb, f, **options): out_str += str(len(db.frames)) + "\n" + if max([x.cycle_time for x in db.frames]) > 0: + db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') + if max([x.cycle_time for y in db.frames for x in y.signals]) > 0: + db.add_signal_defines("GenSigCycleTime", 'INT 0 65535') + + if max([x.initial_value for y in db.frames for x in y.signals]) > 0 or min([x.initial_value for y in db.frames for x in y.signals]) < 0: + db.add_signal_defines("GenSigStartValue", 'FLOAT 0 100000000000') + # Frames for frame in db.frames: if frame.is_complex_multiplexed: @@ -338,7 +346,7 @@ def dump(mydb, f, **options): # Name unMsgId m_ucLength m_ucNumOfSignals m_cDataFormat m_cFrameFormat? m_txNode # m_cDataFormat Data format: 1-Intel, 0-Motorola -- always 1 original converter decides based on signal count. # cFrameFormat Standard 'S' Extended 'X' - extended = 'x' if frame.arbitration_id.extended == 1 else 'S' + extended = 'X' if frame.arbitration_id.extended == 1 else 'S' out_str += "[START_MSG] " + frame.name + \ ",%d,%d,%d,1,%c," % (frame.arbitration_id.id, frame.size, len(frame.signals), extended) if not frame.transmitters: @@ -467,7 +475,7 @@ def dump(mydb, f, **options): default_val = define.defaultValue if default_val is None: default_val = "0" - out_str += '"' + data_type + '",' + define.definition.replace(' ', ',') + ',' + default_val + '\n' + out_str += '"' + data_type + '",' + define.definition.replace(' ', ',') + '\n' # + ',' + default_val + '\n' out_str += "[END_PARAM_MSG]\n" From 69647af0612ca0625f350f5800b859bf2513565e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 28 Oct 2019 09:23:42 +0100 Subject: [PATCH 31/39] optionally allow multiple singals with same name in frame #411 (#412) --- src/canmatrix/cli/convert.py | 1 + src/canmatrix/formats/dbc.py | 5 +++-- src/canmatrix/tests/test_dbc.py | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index c8e96216..a5c67d5c 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -83,6 +83,7 @@ def get_formats(): @click.option('--dbcImportCommentEncoding', 'dbcImportCommentEncoding', default="iso-8859-1", help="Import charset of Comments in dbc\ndefault iso-8859-1") @click.option('--dbcExportEncoding', 'dbcExportEncoding', default="iso-8859-1", help="Export charset of dbc (relevant for units), maybe utf-8\ndefault iso-8859-1") @click.option('--dbcExportCommentEncoding', 'dbcExportCommentEncoding', default="iso-8859-1", help="Export charset of comments in dbc\ndefault iso-8859-1") +@click.option('--dbcUniqueSignalNames/--no-dbcUniqueSignalNames', 'dbcUniqueSignalNames', default=True, help="Check if signal names are unique per frame") # dbf switches @click.option('--dbfImportEncoding', 'dbfImportEncoding', default="iso-8859-1", help="Import charset of dbf, maybe utf-8\ndefault iso-8859-1") @click.option('--dbfExportEncoding', 'dbfExportEncoding', default="iso-8859-1", help="Export charset of dbf, maybe utf-8\ndefault iso-8859-1") diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 11940e79..cd769713 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -115,9 +115,10 @@ def dump(in_db, f, **options): dbc_export_encoding = options.get("dbcExportEncoding", 'iso-8859-1') dbc_export_comment_encoding = options.get("dbcExportCommentEncoding", dbc_export_encoding) + compatibility = options.get('compatibility', True) + dbc_unique_signal_names_per_frame = options.get("dbcUniqueSignalNames", compatibility) ignore_encoding_errors= options.get("ignoreEncodingErrors", "") write_val_table = options.get("writeValTable", True) - compatibility = options.get('compatibility', True) whitespace_replacement = options.get("whitespaceReplacement", '_') if whitespace_replacement in ['', None] or {' ', '\t'}.intersection(whitespace_replacement): @@ -241,7 +242,7 @@ def dump(in_db, f, **options): if name[0].isdigit(): name = whitespace_replacement + name duplicate_signal_counter[name] += 1 - if duplicate_signal_totals[name] > 1: + if dbc_unique_signal_names_per_frame and duplicate_signal_totals[name] > 1: # TODO: pad to 01 in case of 10+ instances, for example? name += str(duplicate_signal_counter[name] - 1) output_names[frame][signal] = name diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index 17663194..0f9772bf 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -366,6 +366,23 @@ def test_cycle_time_handling(): outdbc = io.BytesIO() canmatrix.formats.dump({"aa":matrix}, outdbc, "kcd") +def test_unique_signal_names(): + db = canmatrix.CanMatrix() + frame = canmatrix.Frame("some Frame") + frame.add_signal(canmatrix.Signal("signal_name", size=1, start_bit=1)) + frame.add_signal(canmatrix.Signal("signal_name", size=2, start_bit=9)) + db.add_frame(frame) + outdbc = io.BytesIO() + canmatrix.formats.dump(db, outdbc, "dbc") + assert "signal_name0" in outdbc.getvalue().decode('utf8') + assert "signal_name1" in outdbc.getvalue().decode('utf8') + + outdbc = io.BytesIO() + canmatrix.formats.dump(db, outdbc, "dbc", dbcUniqueSignalNames=False) + assert "signal_name0" not in outdbc.getvalue().decode('utf8') + assert "signal_name1" not in outdbc.getvalue().decode('utf8') + assert "signal_name" in outdbc.getvalue().decode('utf8') + def test_signal_inital_value(): dbc = io.BytesIO(textwrap.dedent(u'''\ BO_ 17 Frame_1: 8 Vector__XXX From 2533b6872d16332e4053c33fb08178bce80ce952 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 29 Oct 2019 15:25:28 -0400 Subject: [PATCH 32/39] Fix setup.py for console_scripts (#417) --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 664db9d4..e386c9da 100644 --- a/setup.py +++ b/setup.py @@ -76,6 +76,7 @@ install_requires = [ "attrs>=18.1.0", "bitstruct", + "click", "future", "pathlib2", "typing; python_version < '3.5'", @@ -97,7 +98,7 @@ packages = find_packages("src"), package_dir = {"": "src"}, package_data = {"canmatrix" : ["tests/*.dbc", "tests/*.arxml", "j1939.dbc"]}, - entry_points={'console_scripts': ['cancompare = canmatrix.cli.compare:main', - 'canconvert = canmatrix.cli.convert:main']} + entry_points={'console_scripts': ['cancompare = canmatrix.cli.compare:cli_compare', + 'canconvert = canmatrix.cli.convert:cli_convert']} ) From a182e95d11b03aae31318a18cfe3b41e074f7f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 29 Oct 2019 21:08:30 +0100 Subject: [PATCH 33/39] [WIP] [dbc] Iss413: fix comment reading with whitespaces in front of ; (#416) * optionally allow multiple singals with same name in frame #411 * fixes #413 (space before semicolon mulit line comment) * fix for iss #414, keeps defines in dbc: this keeps defines from dbc in matrix object, even if native attribute exists. --- src/canmatrix/formats/dbc.py | 31 ++++++++++++++-------------- src/canmatrix/tests/test_dbc.py | 36 ++++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index cd769713..78c0a0d8 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -507,20 +507,20 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None comment += "\n" + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) - if l.endswith(b'";'): + if re.match('.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: follow_up = _FollowUps.NOTHING if signal is not None: - signal.add_comment(comment[0:-2]) + signal.add_comment(comment[:-1].strip()[:-1]) continue elif follow_up == _FollowUps.FRAME_COMMENT: try: comment += "\n" + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) - if l.endswith(b'";'): + if re.match('.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: follow_up = _FollowUps.NOTHING if frame is not None: - frame.add_comment(comment[0:-2]) + frame.add_comment(comment[:-1].strip()[:-1]) continue elif follow_up == _FollowUps.BOARD_UNIT_COMMENT: try: @@ -528,10 +528,10 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) - if l.endswith(b'";'): + if re.match('.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: follow_up = _FollowUps.NOTHING if board_unit is not None: - board_unit.add_comment(comment[0:-2]) + board_unit.add_comment(comment[:-1].strip()[:-1]) continue decoded = l.decode(dbc_import_encoding).strip() if decoded.startswith("BO_ "): @@ -971,15 +971,16 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None frame.is_j1939 = True db.update_ecu_list() db.del_ecu("Vector__XXX") - db.del_frame_attributes(["GenMsgCycleTime"]) - db.del_signal_attributes(["GenSigCycleTime"]) - db.del_signal_attributes(["GenSigStartValue"]) - if "GenMsgCycleTime" in db.frame_defines: - del (db.frame_defines["GenMsgCycleTime"]) - if "GenSigCycleTime" in db.signal_defines: - del (db.signal_defines["GenSigCycleTime"]) - if "GenSigStartValue" in db.signal_defines: - del (db.signal_defines["GenSigStartValue"]) + +# db.del_frame_attributes(["GenMsgCycleTime"]) +# db.del_signal_attributes(["GenSigCycleTime"]) +# db.del_signal_attributes(["GenSigStartValue"]) +# if "GenMsgCycleTime" in db.frame_defines: +# del (db.frame_defines["GenMsgCycleTime"]) +# if "GenSigCycleTime" in db.signal_defines: +# del (db.signal_defines["GenSigCycleTime"]) +# if "GenSigStartValue" in db.signal_defines: +# del (db.signal_defines["GenSigStartValue"]) free_signals_dummy_frame = db.frame_by_name("VECTOR__INDEPENDENT_SIG_MSG") if free_signals_dummy_frame is not None and free_signals_dummy_frame.arbitration_id.id == 0x40000000: diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index 0f9772bf..beb3e728 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -63,7 +63,18 @@ def test_parse_comment_from_dbc(): matrix = canmatrix.formats.dbc.load(dbc) assert matrix.frames[0].signals[0].comment == "resistance setting (0-100%)" - print("BEEP") + +def test_parse_multi_line_comment(): + dbc = io.BytesIO(textwrap.dedent(u'''\ + BO_ 1 someFrame: 1 someEcu + SG_ someSignal: 1|2@0+ (1,0) [0|0] "" CCL_TEST + + CM_ SG_ 1 someSignal "Debug request message from the ECU to the BMS. +** ignore for now, more definition to be provided in Rev 14 regarding which messages to change if we have this debug flag implemented. " ; + ''').encode('utf-8')) + matrix = canmatrix.formats.dbc.load(dbc) + assert matrix.frames[0].signals[0].comment == 'Debug request message from the ECU to the BMS.\n** ignore for now, more definition to be provided in Rev 14 regarding which messages to change if we have this debug flag implemented. ' + def test_long_frame_name_imports(): long_frame_name = u'A_VERY_LONG_FRAME_NAME_WHICH_SHOULD_BE_SPLIT_SOMEHOW' @@ -353,8 +364,9 @@ def test_cycle_time_handling(): assert matrix.frames[0].signal_by_name("sig1").cycle_time == 10 assert matrix.frames[0].signal_by_name("sig2").cycle_time == 20 - assert "GenMsgCycleTime" not in matrix.frame_defines - assert "GenSigCycleTime" not in matrix.signal_defines + +# assert "GenMsgCycleTime" not in matrix.frame_defines +# assert "GenSigCycleTime" not in matrix.signal_defines outdbc = io.BytesIO() canmatrix.formats.dump(matrix, outdbc, "dbc") @@ -366,6 +378,21 @@ def test_cycle_time_handling(): outdbc = io.BytesIO() canmatrix.formats.dump({"aa":matrix}, outdbc, "kcd") +def test_keep_cycle_time_defines(): + dbc = io.BytesIO(textwrap.dedent(u'''\ + BO_ 17 Frame_1: 8 Vector__XXX + SG_ sig1 : 0|8@1- (1,0) [0|0] "" Vector__XXX + + BA_DEF_ BO_ "GenMsgCycleTime" INT 0 50000 ; + BA_DEF_DEF_ "GenMsgCycleTime" 0 ; + ''').encode('utf-8')) + matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") + + outdbc = io.BytesIO() + canmatrix.formats.dump(matrix, outdbc, "dbc") + assert 'BA_DEF_ BO_ "GenMsgCycleTime" INT 0 50000' in outdbc.getvalue().decode('utf8') + assert 'BA_DEF_DEF_ "GenMsgCycleTime" 0' in outdbc.getvalue().decode('utf8') + def test_unique_signal_names(): db = canmatrix.CanMatrix() frame = canmatrix.Frame("some Frame") @@ -394,9 +421,8 @@ def test_signal_inital_value(): ''').encode('utf-8')) matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") assert matrix.frames[0].signal_by_name("sig1").initial_value == decimal.Decimal("2.7") - assert "GenSigStartValue" not in matrix.signal_defines +# assert "GenSigStartValue" not in matrix.signal_defines outdbc = io.BytesIO() canmatrix.formats.dump(matrix, outdbc, "dbc") assert 'BA_ "GenSigStartValue" SG_ 17 sig1 2.7;' in outdbc.getvalue().decode('utf8') - From 35893aa281bce19c89eb52e8ead064544ecef6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Sun, 3 Nov 2019 12:07:49 +0100 Subject: [PATCH 34/39] convert: selective rx/tx ecu extraction issue #421 (#422) --- docs/cli.rst | 9 +++++++++ src/canmatrix/cli/convert.py | 2 +- src/canmatrix/convert.py | 13 ++++++++----- src/canmatrix/copy.py | 20 +++++++++++--------- src/canmatrix/tests/test_cli_convert.py | 20 ++++++++++++++++++-- 5 files changed, 47 insertions(+), 17 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index e56ca0b9..8db917ca 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -242,6 +242,15 @@ This is some *lite* ECU-Extract. $ canconvert --ecus=FRONT_ECU,REAR_ECU source.dbc target.dbc +**extract matrix with frames which FRONT_ECU receives and with frames REAR_ECUS transmits:** + +:: + + $ canconvert --ecus=FRONT_ECU:rx,REAR_ECU:tx source.dbc target.dbc + + + + **extract frame[s] out of matrix:** :: diff --git a/src/canmatrix/cli/convert.py b/src/canmatrix/cli/convert.py index a5c67d5c..d6e3e2c3 100644 --- a/src/canmatrix/cli/convert.py +++ b/src/canmatrix/cli/convert.py @@ -70,7 +70,7 @@ def get_formats(): @click.option('--skipLongDlc', 'skipLongDlc', help="skip all Frames with dlc bigger than given threshold") @click.option('--cutLongFrames', 'cutLongFrames', help="cut all signals out of Frames with dlc bigger than given threshold") @click.option('--deleteFrameAttributes', 'deleteFrameAttributes', help="delete attributes from all frames\nExample --deleteFrameAttributes GenMsgSomeVar,CycleTime") -@click.option('--ecus', help="Copy only given ECUs (comma separated list) to target matrix") +@click.option('--ecus', help="Copy only given ECUs (comma separated list) to target matrix; suffix 'rx' or 'tx' for selection: Example: --ecus FirstEcu:rx,SecondEcu:tx,ThirdEcu") @click.option('--frames', help="Copy only given Frames (comma separated list) to target matrix") @click.option('--signals', help="Copy only given Signals (comma separated list) to target matrix just as 'free' signals without containing frame") @click.option('--merge', help="merge additional can databases.\nSyntax: --merge filename[:ecu=SOMEECU][:frame=FRAME1][:frame=FRAME2],filename2") diff --git a/src/canmatrix/convert.py b/src/canmatrix/convert.py index b8cd9c6f..4141e082 100644 --- a/src/canmatrix/convert.py +++ b/src/canmatrix/convert.py @@ -46,20 +46,23 @@ def convert(infile, out_file_name, **options): # type: (str, str, **str) -> Non for name in dbs: db = None - if 'ecus' in options and options['ecus'] is not None: + if options.get('ecus', False): ecu_list = options['ecus'].split(',') db = canmatrix.CanMatrix() + direction = None for ecu in ecu_list: - canmatrix.copy.copy_ecu_with_frames(ecu, dbs[name], db) - if 'frames' in options and options['frames'] is not None: + if ":" in ecu: + ecu, direction = ecu.split(":") + canmatrix.copy.copy_ecu_with_frames(ecu, dbs[name], db, rx=(direction != "tx"), tx=(direction != "rx")) + if options.get('frames', False): frame_list = options['frames'].split(',') - db = canmatrix.CanMatrix() + db = canmatrix.CanMatrix() if db is None else db for frame_name in frame_list: frame_to_copy = dbs[name].frame_by_name(frame_name) canmatrix.copy.copy_frame(frame_to_copy.arbitration_id, dbs[name], db) if options.get('signals', False): signal_list = options['signals'].split(',') - db = canmatrix.CanMatrix() + db = canmatrix.CanMatrix() if db is None else db for signal_name in signal_list: canmatrix.copy.copy_signal(signal_name, dbs[name], db) diff --git a/src/canmatrix/copy.py b/src/canmatrix/copy.py index e0e013dc..5c728b93 100644 --- a/src/canmatrix/copy.py +++ b/src/canmatrix/copy.py @@ -65,7 +65,7 @@ def copy_ecu(ecu_or_glob, source_db, target_db): target_db.ecu_defines[attribute].update() -def copy_ecu_with_frames(ecu_or_glob, source_db, target_db): +def copy_ecu_with_frames(ecu_or_glob, source_db, target_db, rx=True, tx=True): # type: (typing.Union[canmatrix.Ecu, str], canmatrix.CanMatrix, canmatrix.CanMatrix) -> None """ Copy ECU(s) identified by Name or as Object from source CAN matrix to target CAN matrix. @@ -87,16 +87,18 @@ def copy_ecu_with_frames(ecu_or_glob, source_db, target_db): target_db.add_ecu(copy.deepcopy(ecu)) # copy tx-frames - for frame in source_db.frames: - if ecu.name in frame.transmitters: - copy_frame(frame.arbitration_id, source_db, target_db) + if tx is True: + for frame in source_db.frames: + if ecu.name in frame.transmitters: + copy_frame(frame.arbitration_id, source_db, target_db) # copy rx-frames - for frame in source_db.frames: - for signal in frame.signals: - if ecu.name in signal.receivers: - copy_frame(frame.arbitration_id, source_db, target_db) - break + if rx is True: + for frame in source_db.frames: + for signal in frame.signals: + if ecu.name in signal.receivers: + copy_frame(frame.arbitration_id, source_db, target_db) + break # copy all ECU defines for attribute in ecu.attributes: diff --git a/src/canmatrix/tests/test_cli_convert.py b/src/canmatrix/tests/test_cli_convert.py index dff08268..fcda0145 100644 --- a/src/canmatrix/tests/test_cli_convert.py +++ b/src/canmatrix/tests/test_cli_convert.py @@ -194,7 +194,7 @@ def test_copy_signals(tmpdir, run): assert b"VECTOR__INDEPENDENT_SIG_MSG" in content -def create_dbc(): +def create_dbc(additionalReceiver = []): outFile = str(here / "tmpb.dbc") myFrame = canmatrix.Frame("testFrame3", arbitration_id=canmatrix.arbitration_id_converter(0x124), size=8, transmitters=["testBU"]) mySignal = canmatrix.Signal("someTestSignal", @@ -218,7 +218,7 @@ def create_dbc(): offset=1.0, min=0, max=500, - receivers=["recBU2"]) + receivers=["recBU2"] + additionalReceiver) myFrame2.add_signal(mySignal2) mySignal3 = canmatrix.Signal("zeroSignal", start_bit=20, @@ -250,6 +250,22 @@ def test_copy_ecus(tmpdir, run): assert "testBU2" not in content assert "testBU" in content +def test_copy_ecus_rx(tmpdir, run): + inputFile = create_dbc() + result = run("--ecus", "recBU:rx", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert "recBU2" not in content + assert "recBU" in content + +def test_copy_ecus_tx(tmpdir, run): + inputFile = create_dbc(additionalReceiver = ["testBU"]) + result = run("--ecus", "testBU:tx", inputFile, "tmp2.dbc") + with open("tmp2.dbc","r") as fd: + content = fd.read() + assert "testFrame2" not in content + assert "testFrame3" in content + def test_copy_frames(tmpdir, run): inputFile = create_dbc() result = run("--frames", "testFrame3", inputFile, "tmp2.dbc") From 9aa5db7c25b00cb5cfd244361f5eb0e440601f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Mon, 4 Nov 2019 21:58:39 +0100 Subject: [PATCH 35/39] [WIP] [ARXML] can_fd info (potentional fix for #410) (#418) * potentional fix for #410 * [ARXML] can-fd recogintion * add baudrate attributes --- src/canmatrix/canmatrix.py | 3 +++ src/canmatrix/formats/arxml.py | 26 ++++++++++++++++++++++++++ src/canmatrix/tests/test_canmatrix.py | 7 +++++++ 3 files changed, 36 insertions(+) diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index fb4b4aff..5c08b5a0 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -1439,6 +1439,9 @@ class CanMatrix(object): env_vars = attr.ib(factory=dict) # type: typing.MutableMapping[str, typing.MutableMapping] signals = attr.ib(factory=list) # type: typing.MutableSequence[Signal] + baudrate = attr.ib(default=0) # type:int + fd_baudrate = attr.ib(default=0) # type:int + load_errors = attr.ib(factory=list) # type: typing.MutableSequence[Exception] def __iter__(self): # type: () -> typing.Iterator[Frame] diff --git a/src/canmatrix/formats/arxml.py b/src/canmatrix/formats/arxml.py index 3447bcff..ca7754e8 100644 --- a/src/canmatrix/formats/arxml.py +++ b/src/canmatrix/formats/arxml.py @@ -215,10 +215,15 @@ def dump(dbs, f, **options): pdu_triggering_ref = create_sub_element(pdu_triggering_ref_conditional, 'PDU-TRIGGERING-REF') pdu_triggering_ref.set('DEST', 'PDU-TRIGGERING') + if frame.arbitration_id.extended is False: create_sub_element(can_frame_triggering, 'CAN-ADDRESSING-MODE', 'STANDARD') else: create_sub_element(can_frame_triggering, 'CAN-ADDRESSING-MODE', 'EXTENDED') + + if frame.is_fd: + create_sub_element(can_frame_triggering, 'CAN-FRAME-RX-BEHAVIOR', "CAN-FD") + create_sub_element(can_frame_triggering, 'CAN-FRAME-RX-BEHAVIOR', "CAN-FD") create_sub_element(can_frame_triggering, 'IDENTIFIER', str(frame.arbitration_id.id)) pdu_triggering_ref.text = "/Cluster/CAN/IPDUTRIGG_{0}".format(frame.name) @@ -1324,6 +1329,10 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ # type: (_Element, _DocRoot, dict, str, typing.Callable) -> typing.Union[canmatrix.Frame, None] global pdu_frame_mapping address_mode = get_child(frame_triggering, "CAN-ADDRESSING-MODE", root_or_cache, ns) + frame_rx_behaviour_elem = get_child(frame_triggering, "CAN-FRAME-RX-BEHAVIOR", root_or_cache, ns) + frame_tx_behaviour_elem = get_child(frame_triggering, "CAN-FRAME-TX-BEHAVIOR", root_or_cache, ns) + is_fd_elem = get_child(frame_triggering, "CAN-FD-FRAME-SUPPORT", root_or_cache, ns) + arb_id = get_child(frame_triggering, "IDENTIFIER", root_or_cache, ns) frame_elem = get_child(frame_triggering, "FRAME", root_or_cache, ns) @@ -1378,6 +1387,13 @@ def get_frame(frame_triggering, root_or_cache, multiplex_translation, ns, float_ else: new_frame.arbitration_id = canmatrix.ArbitrationId(arbitration_id, extended=False) + if (frame_rx_behaviour_elem is not None and frame_rx_behaviour_elem.text == 'CAN-FD') or \ + (frame_tx_behaviour_elem is not None and frame_tx_behaviour_elem.text == 'CAN-FD') or \ + (is_fd_elem is not None and is_fd_elem.text == 'TRUE'): + new_frame.is_fd = True + else: + new_frame.is_fd = False + timing_spec = get_child(pdu, "I-PDU-TIMING-SPECIFICATION", root_or_cache, ns) if timing_spec is None: timing_spec = get_child(pdu, "I-PDU-TIMING-SPECIFICATIONS", root_or_cache, ns) @@ -1669,10 +1685,19 @@ def load(file, **options): bus_name = "" else: speed = get_child(cc, "SPEED", search_point, ns) + baudrate_elem = cc.find(".//" + ns + "BAUDRATE") + fd_baudrate_elem = cc.find(".//" + ns + "CAN-FD-BAUDRATE") + + speed = baudrate_elem is speed is None + logger.debug("Busname: " + get_element_name(cc, ns)) bus_name = get_element_name(cc, ns) if speed is not None: + db.baudrate = speed + if fd_baudrate_elem is not None: + db.fd_baudrate = fd_baudrate_elem.text + logger.debug(" Speed: " + speed.text) physical_channels = cc.find('.//' + ns + "PHYSICAL-CHANNELS") # type: _Element @@ -1681,6 +1706,7 @@ def load(file, **options): nm_lower_id = get_child(cc, "NM-LOWER-CAN-ID", search_point, ns) + physical_channel = get_child(physical_channels, "PHYSICAL-CHANNEL", search_point, ns) if physical_channel is None: physical_channel = get_child(physical_channels, "CAN-PHYSICAL-CHANNEL", search_point, ns) diff --git a/src/canmatrix/tests/test_canmatrix.py b/src/canmatrix/tests/test_canmatrix.py index b3551a64..050e95f2 100644 --- a/src/canmatrix/tests/test_canmatrix.py +++ b/src/canmatrix/tests/test_canmatrix.py @@ -1007,3 +1007,10 @@ def test_effective_cycle_time(): sig1.cycle_time = 0 sig2.cycle_time = 0 assert frame.effective_cycle_time == 0 + +def test_baudrate(): + cm = canmatrix.CanMatrix() + cm.baudrate = 500000 + assert cm.baudrate == 500000 + cm.fd_baudrate = 1000000 + assert cm.fd_baudrate == 1000000 From 04609a941ffa0e8e4ada2cdf5f8d84837be12c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Thu, 7 Nov 2019 21:41:11 +0100 Subject: [PATCH 36/39] [WIP] Auto deploy (#420) * add auto deploy for tags on master --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index ff3b9403..dfeac330 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,3 +35,11 @@ install: script: - tox - tox -e codecov + +deploy: + provider: pypi + user: ebroecker + skip_existing: true + on: + tags: true + branch: master From 974333233691b77601f786215f85a30cebec9919 Mon Sep 17 00:00:00 2001 From: ebroecker Date: Fri, 8 Nov 2019 15:35:06 +0100 Subject: [PATCH 37/39] add submodules doc --- docs/api.rst | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/api.rst b/docs/api.rst index f20d315d..8b22e734 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -6,7 +6,37 @@ ____________ .. automodule:: canmatrix.canmatrix :members: - + +.. automodule:: canmatrix.canmatrix + :members: + +.. automodule:: canmatrix.Ecu + :members: + +.. automodule:: canmatrix.Signal + :members: + +.. automodule:: canmatrix.SignalGroup + :members: + +.. automodule:: canmatrix.DecodedSignal + :members: + +.. automodule:: canmatrix.unpack_bitstring + :members: + +.. automodule:: canmatrix.pack_bitstring + :members: + +.. automodule:: canmatrix.ArbitrationId + :members: + +.. automodule:: canmatrix.Frame + :members: + +.. automodule:: canmatrix.Define + :members: + cancluster.py _____________ From 6e4000d767297596c0e042d3e91bd70e86762d98 Mon Sep 17 00:00:00 2001 From: ebroecker Date: Fri, 8 Nov 2019 20:02:08 +0100 Subject: [PATCH 38/39] update doc to make start_bit more clear in documentation #424 --- docs/api.rst | 7 ++----- src/canmatrix/canmatrix.py | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 8b22e734..21fb88d0 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -7,10 +7,10 @@ ____________ .. automodule:: canmatrix.canmatrix :members: -.. automodule:: canmatrix.canmatrix +.. automodule:: canmatrix.Ecu :members: -.. automodule:: canmatrix.Ecu +.. automodule:: canmatrix.Frame :members: .. automodule:: canmatrix.Signal @@ -31,9 +31,6 @@ ____________ .. automodule:: canmatrix.ArbitrationId :members: -.. automodule:: canmatrix.Frame - :members: - .. automodule:: canmatrix.Define :members: diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 5c08b5a0..06323459 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -128,7 +128,8 @@ class Signal(object): Signal has following attributes: * name - * start_bit, size (in Bits) + * start_bit (internal start_bit, see get/set_startbit also) + * size (in Bits) * is_little_endian (1: Intel, 0: Motorola) * is_signed (bool) * factor, offset, min, max From f16196561f5ede8bdfb2cb2a69f1c7e2346b7a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Br=C3=B6cker?= Date: Tue, 12 Nov 2019 21:09:40 +0100 Subject: [PATCH 39/39] [dbc] fix dbc issues (#431) * fix dbc export for empty matrix * copy_frame handles default values now (fix #430) --- src/canmatrix/canmatrix.py | 2 ++ src/canmatrix/copy.py | 13 ++++++++--- src/canmatrix/formats/dbc.py | 40 +++++++++++++++++--------------- src/canmatrix/formats/xlsx.py | 3 +-- src/canmatrix/tests/test_copy.py | 28 ++++++++++++++++++++++ src/canmatrix/tests/test_dbc.py | 15 +++++++----- 6 files changed, 71 insertions(+), 30 deletions(-) diff --git a/src/canmatrix/canmatrix.py b/src/canmatrix/canmatrix.py index 06323459..ed643b96 100644 --- a/src/canmatrix/canmatrix.py +++ b/src/canmatrix/canmatrix.py @@ -988,6 +988,8 @@ def add_attribute(self, attribute, value): self.attributes[attribute] = str(value) except UnicodeDecodeError: self.attributes[attribute] = value + if type(self.attributes[attribute]) == str: + self.attributes[attribute] = self.attributes[attribute].strip() def del_attribute(self, attribute): # type: (str) -> typing.Any diff --git a/src/canmatrix/copy.py b/src/canmatrix/copy.py index 5c728b93..c551981a 100644 --- a/src/canmatrix/copy.py +++ b/src/canmatrix/copy.py @@ -170,13 +170,16 @@ def copy_frame(frame_id, source_db, target_db): copy_ecu(source_ecu, source_db, target_db) # copy all frame-defines - attributes = frame.attributes - for attribute in attributes: + for attribute in source_db.frame_defines: if attribute not in target_db.frame_defines: target_db.add_frame_defines( copy.deepcopy(attribute), copy.deepcopy(source_db.frame_defines[attribute].definition)) target_db.add_define_default( copy.deepcopy(attribute), copy.deepcopy(source_db.frame_defines[attribute].defaultValue)) + # only default value exists in source but is different to default value in target + if attribute not in frame.attributes and \ + frame.attribute(attribute, source_db) != frame.attribute(attribute, target_db): + target_db.frame_by_id(frame.arbitration_id).add_attribute(attribute, frame.attribute(attribute, source_db)) # update enum data types if needed: if source_db.frame_defines[attribute].type == 'ENUM': temp_attr = frame.attribute(attribute, db=source_db) @@ -187,7 +190,7 @@ def copy_frame(frame_id, source_db, target_db): # trigger all signals of Frame for sig in frame.signals: # delete all 'unknown' attributes - for attribute in sig.attributes: + for attribute in source_db.signal_defines: target_db.add_signal_defines( copy.deepcopy(attribute), copy.deepcopy(source_db.signal_defines[attribute].definition)) target_db.add_define_default( @@ -198,5 +201,9 @@ def copy_frame(frame_id, source_db, target_db): if temp_attr not in target_db.signal_defines[attribute].values: target_db.signal_defines[attribute].values.append(copy.deepcopy(temp_attr)) target_db.signal_defines[attribute].update() + # only default value exists in source but is different to default value in target + if attribute not in sig.attributes and \ + sig.attribute(attribute, source_db) != sig.attribute(attribute, target_db): + target_db.frame_by_id(frame.arbitration_id).signal_by_name(sig.name).add_attribute(attribute, sig.attribute(attribute, source_db)) return True diff --git a/src/canmatrix/formats/dbc.py b/src/canmatrix/formats/dbc.py index 78c0a0d8..08bc953e 100644 --- a/src/canmatrix/formats/dbc.py +++ b/src/canmatrix/formats/dbc.py @@ -247,13 +247,15 @@ def dump(in_db, f, **options): name += str(duplicate_signal_counter[name] - 1) output_names[frame][signal] = name - if max([x.cycle_time for x in db.frames]) > 0: - db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') - if max([x.cycle_time for y in db.frames for x in y.signals]) > 0: - db.add_signal_defines("GenSigCycleTime", 'INT 0 65535') + if len(db.frames) > 0: + if max([x.cycle_time for x in db.frames]) > 0: + db.add_frame_defines("GenMsgCycleTime", 'INT 0 65535') + if len([s for fr in db.frames for s in fr.signals]) > 0: + if max([x.cycle_time for y in db.frames for x in y.signals]) > 0: + db.add_signal_defines("GenSigCycleTime", 'INT 0 65535') - if max([x.initial_value for y in db.frames for x in y.signals]) > 0 or min([x.initial_value for y in db.frames for x in y.signals]) < 0: - db.add_signal_defines("GenSigStartValue", 'FLOAT 0 100000000000') + if max([x.initial_value for y in db.frames for x in y.signals]) > 0 or min([x.initial_value for y in db.frames for x in y.signals]) < 0: + db.add_signal_defines("GenSigStartValue", 'FLOAT 0 100000000000') @@ -507,7 +509,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None comment += "\n" + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) - if re.match('.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: + if re.match(r'.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: follow_up = _FollowUps.NOTHING if signal is not None: signal.add_comment(comment[:-1].strip()[:-1]) @@ -517,7 +519,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None comment += "\n" + l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) - if re.match('.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: + if re.match(r'.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: follow_up = _FollowUps.NOTHING if frame is not None: frame.add_comment(comment[:-1].strip()[:-1]) @@ -528,7 +530,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None l.decode(dbc_comment_encoding).replace('\\"', '"') except: logger.error("Error decoding line: %d (%s)" % (i, line)) - if re.match('.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: + if re.match(r'.*" *;\Z',l.decode(dbc_import_encoding).strip()) is not None: follow_up = _FollowUps.NOTHING if board_unit is not None: board_unit.add_comment(comment[:-1].strip()[:-1]) @@ -785,7 +787,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None substring = decoded[7:].strip() define_type = substring[:3] substring = substring[3:].strip() - pattern = r"^\"(.+?)\" +(.+);" + pattern = r"^\"(.+?)\" +(.+); *" regexp = re.compile(pattern) regexp_raw = re.compile(pattern.encode(dbc_import_encoding)) temp = regexp.match(substring) @@ -816,23 +818,23 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None tempba = regexp.match(decoded) if tempba.group(1).strip().startswith("BO_ "): - regexp = re.compile(r"^BA_ +\"(.+?)\" +BO_ +(\d+) +(.+) *;") + regexp = re.compile(r"^BA_ +\"(.+?)\" +BO_ +(\d+) +(.+) *; *") temp = regexp.match(decoded) get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(2)))).add_attribute( temp.group(1), temp.group(3)) elif tempba.group(1).strip().startswith("SG_ "): - regexp = re.compile(r"^BA_ +\"(.+?)\" +SG_ +(\d+) +(\w+) +(.+) *;") + regexp = re.compile(r"^BA_ +\"(.+?)\" +SG_ +(\d+) +(\w+) +(.+) *; *") temp = regexp.match(decoded) if temp is not None: get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(2)))).signal_by_name( temp.group(3)).add_attribute(temp.group(1), temp.group(4)) elif tempba.group(1).strip().startswith("EV_ "): - regexp = re.compile(r"^BA_ +\"(.+?)\" +EV_ +(\w+) +(.*) *;") + regexp = re.compile(r"^BA_ +\"(.+?)\" +EV_ +(\w+) +(.*) *; *") temp = regexp.match(decoded) if temp is not None: db.add_env_attribute(temp.group(2), temp.group(1), temp.group(3)) elif tempba.group(1).strip().startswith("BU_ "): - regexp = re.compile(r"^BA_ +\"(.*?)\" +BU_ +(\w+) +(.+) *;") + regexp = re.compile(r"^BA_ +\"(.*?)\" +BU_ +(\w+) +(.+) *; *") temp = regexp.match(decoded) db.ecu_by_name( temp.group(2)).add_attribute( @@ -840,13 +842,13 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None temp.group(3)) else: regexp = re.compile( - r"^BA_ +\"([A-Za-z0-9\-_]+)\" +([\"\w\-\.]+) *;") + r"^BA_ +\"([A-Za-z0-9\-_]+)\" +([\"\w\-\.]+) *; *") temp = regexp.match(decoded) if temp: db.add_attribute(temp.group(1), temp.group(2)) elif decoded.startswith("SIG_GROUP_ "): - regexp = re.compile(r"^SIG_GROUP_ +(\w+) +(\w+) +(\w+) +\:(.*) *;") + regexp = re.compile(r"^SIG_GROUP_ +(\w+) +(\w+) +(\w+) +\:(.*) *; *") temp = regexp.match(decoded) frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) if frame is not None: @@ -854,7 +856,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None frame.add_signal_group(temp.group(2), temp.group(3), signal_array) # todo wrong annotation in canmatrix? Id is a string? elif decoded.startswith("SIG_VALTYPE_ "): - regexp = re.compile(r"^SIG_VALTYPE_ +(\w+) +(\w+)\s*\:(.*) *;") + regexp = re.compile(r"^SIG_VALTYPE_ +(\w+) +(\w+)\s*\:(.*) *; *") temp = regexp.match(decoded) frame = get_frame_by_id(canmatrix.ArbitrationId.from_compound_integer(int(temp.group(1)))) if frame: @@ -872,7 +874,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None db.add_define_default(temp.group(1), temp_raw.group(2).decode(dbc_import_encoding)) elif decoded.startswith("SG_MUL_VAL_ "): - pattern = r"^SG_MUL_VAL_ +([0-9]+) +([\w\-]+) +([\w\-]+) +(.*) *;" + pattern = r"^SG_MUL_VAL_ +([0-9]+) +([\w\-]+) +([\w\-]+) +(.*) *; *" regexp = re.compile(pattern) temp = regexp.match(decoded) if temp: @@ -891,7 +893,7 @@ def add_frame_by_id(new_frame): # type: (canmatrix.Frame) -> None mux_val_max_number = int(mux_val_max) signal.mux_val_grp.append([mux_val_min_number, mux_val_max_number]) elif decoded.startswith("EV_ "): - pattern = r"^EV_ +([\w\-\_]+?) *\: +([0-9]+) +\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] +\"(.*?)\" +([0-9.+\-eE]+) +([0-9.+\-eE]+) +([\w\-]+?) +(.*);" + pattern = r"^EV_ +([\w\-\_]+?) *\: +([0-9]+) +\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\] +\"(.*?)\" +([0-9.+\-eE]+) +([0-9.+\-eE]+) +([\w\-]+?) +(.*); *" regexp = re.compile(pattern) temp = regexp.match(decoded) diff --git a/src/canmatrix/formats/xlsx.py b/src/canmatrix/formats/xlsx.py index 4803655c..39463aec 100644 --- a/src/canmatrix/formats/xlsx.py +++ b/src/canmatrix/formats/xlsx.py @@ -199,8 +199,7 @@ def dump(db, filename, **options): logger.debug("DEBUG: Length of db.frames is %d", len(db.frames)) for frame in db.frames: if frame.is_complex_multiplexed: - logger.error("Export complex multiplexers is not supported - ignoring frame %s", frame.name) - continue + logger.error("Export complex multiplexers is not supported - frame %s might be uncomplete", frame.name) frame_hash[int(frame.arbitration_id.id)] = frame # set row to first Frame (row = 0 is header) diff --git a/src/canmatrix/tests/test_copy.py b/src/canmatrix/tests/test_copy.py index a7a94f29..9ba74a4b 100644 --- a/src/canmatrix/tests/test_copy.py +++ b/src/canmatrix/tests/test_copy.py @@ -75,3 +75,31 @@ def test_copy_ecu_with_attributes(): assert len(matrix1.ecus) == 1 assert matrix1.ecu_by_name("ECU") is not None assert matrix1.ecu_by_name("ECU").attribute("Node Address") == 42 + +def test_copy_frame_default_attributes(): + source = canmatrix.canmatrix.CanMatrix() + frame1 = canmatrix.canmatrix.Frame("Frame1", arbitration_id=1) + signal = canmatrix.canmatrix.Signal("Signal1") + frame1.add_signal(canmatrix.canmatrix.Signal("SomeSignal")) + frame1.add_signal(signal) + source.add_frame(frame1) + source.add_frame_defines("some_attribute", "STRING") + source.add_define_default("some_attribute", "source_frame_default") + source.add_signal_defines("some_signal_attribute", "STRING") + source.add_define_default("some_signal_attribute", "source_sig_default") + + #test if default value only defined in source and copied to target + target = canmatrix.canmatrix.CanMatrix() + canmatrix.copy.copy_frame(frame1.arbitration_id, source, target) + assert target.frames[0].attribute("some_attribute", target) == "source_frame_default" + assert target.frames[0].signals[0].attribute("some_signal_attribute", target) == "source_sig_default" + + # test if define already exists, but has another default value: + target2 = canmatrix.canmatrix.CanMatrix() + target2.add_frame_defines("some_attribute", "STRING") + target2.add_define_default("some_attribute", "target_frame_default") + target2.add_signal_defines("some_signal_attribute", "STRING") + target2.add_define_default("some_signal_attribute", "target_sig_default") + canmatrix.copy.copy_frame(frame1.arbitration_id, source, target2) + assert target2.frames[0].attribute("some_attribute", target2) == "source_frame_default" + assert target2.frames[0].signals[0].attribute("some_signal_attribute", target2) == "source_sig_default" diff --git a/src/canmatrix/tests/test_dbc.py b/src/canmatrix/tests/test_dbc.py index beb3e728..2b005a4a 100644 --- a/src/canmatrix/tests/test_dbc.py +++ b/src/canmatrix/tests/test_dbc.py @@ -333,15 +333,18 @@ def test_j1939_frametype(): matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") assert matrix.frames[0].is_j1939 == False -def test_signal_definition_with_spaces_iss358(): - dbc = io.BytesIO(textwrap.dedent(u'''\ - BU_: someOtherEcu - BO_ 123 someFrame: 1 someOtherEcu - SG_ AccSts : 62|3@0+ (1.0, 0.0) [0.0|0.0] "" VDDM +def test_attributes_with_spaces_before_semicolumn(): + dbc = io.BytesIO(textwrap.dedent(u'''\ + BO_ 8 Frame_1: 8 Vector__XXX + BO_ 9 Frame_2: 8 Vector__XXX + BA_DEF_ BO_ "someAttribute" STRING ; + BA_ "someAttribute" BO_ 8 "str" ; + BA_DEF_DEF_ "someAttribute" "asd" ; ''').encode('utf-8')) matrix = canmatrix.formats.dbc.load(dbc, dbcImportEncoding="utf8") - + assert matrix.frames[0].attributes["someAttribute"] == 'str' + assert matrix.frames[1].attribute("someAttribute", matrix) == 'asd' def test_cycle_time_handling(): dbc = io.BytesIO(textwrap.dedent(u'''\