Skip to content

Commit

Permalink
Correct misidentification of Container PDUs.
Browse files Browse the repository at this point in the history
Co-authored-by: Rule Timothy <[email protected]>
Signed-off-by: Rule Timothy (VM/EMT3) <[email protected]>
  • Loading branch information
Kiran Gowda Kempanna and timrulebosch committed May 17, 2024
1 parent 4ec7823 commit b3ff013
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions extra/tools/network/build/package/gencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ def scan_messages(dbc_file, out_path, filter, cycle_time):
for message in db.messages:
if filter is not None and str(message.frame_id) in filter:
continue
isContainer = False
if len(message.signal_groups) > 0 :
isContainer = True
isContainer = message.is_multiplexed()
messageName = camel_to_snake_case(message.name)
frames[messageName] = {
'frame_id': int(message.frame_id),
Expand All @@ -52,7 +50,7 @@ def scan_messages(dbc_file, out_path, filter, cycle_time):
}
if str(message.frame_id) in cycle_time.keys():
frames[messageName]['cycle_time_ms'] = int(cycle_time[str(message.frame_id)])
if isContainer :
if isContainer:
for mux_id, signals in message.signal_tree[0]['Header_ID'].items():
frames[messageName + '_' + hex(mux_id)] = {
'container': messageName,
Expand Down
3 changes: 3 additions & 0 deletions extra/tools/network/internal/app/generate/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func (c *GenNetworkCommand) Run() error {
annotations["cycle_time_ms"] = frameInfo.CycleTime
}
}
if frameInfo == nil {
continue
}
annotations["struct_name"] = structName
// Signals (field/member names of the struct).
signals := []kind.NetworkSignal{}
Expand Down

0 comments on commit b3ff013

Please sign in to comment.