Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CANParser: expose MessageState to Cython to eliminate data copying #1382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Oct 16, 2024

This PR greatly simplifies the update logic, resulting in reduced code complexity and eliminating unnecessary data copying.

Main Changes:

  1. Removal of SignalValue Struct and CANParser::query_latest Function: These components, previously used for copying updated values to Cython, have been removed. This change streamlines the data flow between C++ and Cython.
  2. Direct Exposure of MessageState to Cython: MessageState is now directly accessible from Cython, allowing values to be read straight from the C++ object. This eliminates the need for intermediate copying, optimizing performance and simplifying the overall code structure.

Additionally, this PR includes changes from #1381, where value dictionaries are now initialized directly from DBC messages, though it does not include the test_parser_empty_list() function.

@github-actions github-actions bot added the can related to CAN tools, aka opendbc/can/ label Oct 16, 2024
@deanlee deanlee mentioned this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can related to CAN tools, aka opendbc/can/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant