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

[HW]: Add Peak Ethernet Gateway DR support #455

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

Conversation

ad3154
Copy link
Member

@ad3154 ad3154 commented Mar 20, 2024

Describe your changes

Added a CAN hardware plugin for the PEAK Ethernet Gateway.

Works both on Linux and Windows so far!

This does require a small bit of config on the gateway itself. You need to create routes to your computer by IP address, and configure this setting:
image

The code is very much based on the C example from Peak, which was a little cursed admittedly/

How has this been tested?

Ran VT example from a PC on my local network, connecting to the gateway. Object pool loaded and behaved normally.

@ad3154 ad3154 added enhancement New feature or request os: windows Related to usage on Windows os: linux Related to usage on Linux labels Mar 20, 2024
@ad3154 ad3154 requested a review from GwnDaan March 20, 2024 01:14
@ad3154 ad3154 self-assigned this Mar 20, 2024
@GwnDaan
Copy link
Member

GwnDaan commented Mar 20, 2024

Cool! Is this some arbitrary protocol to send CAN messages over ethernet or is this in fact also the same as the HSI protocol?

Also have a look at the functions naming, I think we mostly used "snake_case" in this repo

@ad3154
Copy link
Member Author

ad3154 commented Mar 20, 2024

I think we mostly used "snake_case" in this repo

I blame work.... I spend 8 hours a day typing PascalCase 😅

or is this in fact also the same as the HSI protocol?

My understanding is that HSI is still undecided on if they are going to do DDS, SOME/IP, CAN tunneling, or some other thing... so there may not be an official schema yet. I imagine this would be close-ish to whatever they were thinking for CAN tunneling, but I have no idea haha. Seems likely it's some bespoke PEAK schema.

Added a CAN plugin for the PEAK ethernet gateway.
Copy link

sonarcloud bot commented Mar 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@GwnDaan GwnDaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I currently don't have the hardware for testing this myself, but if you found it working I'm all good with it

hardware_integration/CMakeLists.txt Show resolved Hide resolved

if (txOpened)
{
rxBuffer.reset(new std::uint8_t[RX_BUFFER_SIZE_BYTES]());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahah mixing a little old C stuff with C++'s smart pointers, it does it's job I guess 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request os: linux Related to usage on Linux os: windows Related to usage on Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants