Skip to content

Commit

Permalink
add a suffix containing file name in cluster name (#770)
Browse files Browse the repository at this point in the history
Co-authored-by: Wassim ELBouri <[email protected]>
  • Loading branch information
welbouri and Wassim ELBouri authored Feb 20, 2024
1 parent 0d317f8 commit 1143e89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/canmatrix/formats/fibex.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ def dump(db, f, **options):
clusters = create_sub_element_fx(elements, "CLUSTERS")
cluster = lxml.etree.SubElement(clusters, ns_fx + "CLUSTER")
cluster.set('ID', 'canCluster1')
create_short_name_desc(cluster, "clusterShort", "clusterDesc")
# add the file name as a suffix in the cluster name
cluster_name = f"cluster_{f.name.split('.')[0]}"
create_short_name_desc(cluster, cluster_name, "clusterDesc")
create_sub_element_fx(cluster, "SPEED", "500")
create_sub_element_fx(cluster, "IS-HIGH-LOW-BIT-ORDER", "true")
create_sub_element_fx(cluster, "BIT-COUNTING-POLICY", "MONOTONE")
Expand Down

0 comments on commit 1143e89

Please sign in to comment.