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

update all VT client messages to priority 5 done #379

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

dafiliks
Copy link
Contributor

@dafiliks dafiliks commented Dec 6, 2023

updates all VT client messages to priority 5 as stated in #378

@dafiliks
Copy link
Contributor Author

dafiliks commented Dec 6, 2023

I don't know why it's failing...

@ad3154
Copy link
Member

ad3154 commented Dec 6, 2023

I don't know why it's failing...

It's failing because the unit tests for the VT client are comparing the whole CAN ID of the expected message to the actual message that gets sent.

image

Here you can see that it's checking to see that the ID of this message begins with 0x1C, which is priority 7, but now we're sending it with a leading 0x14, which is priority 5. So, in order to get it to pass, you'd need to update the file test\vt_client_tests.cpp to change the expected ID of the failing messages.

@ad3154
Copy link
Member

ad3154 commented Dec 6, 2023

You can check the output here to see the exact lines you'll have to modify: 919, 936, 952, 968, 979, and 992.

@dafiliks
Copy link
Contributor Author

dafiliks commented Dec 6, 2023

Thanks

hopefully added your wanted changes

put supported_vt_version into the function

error fix and changes

additional error fixes
test/vt_client_tests.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
@dafiliks
Copy link
Contributor Author

dafiliks commented Dec 7, 2023

Sorry, I'll do this when I come back from school.

@dafiliks dafiliks force-pushed the main branch 3 times, most recently from 8e29e64 to 186eb84 Compare December 7, 2023 16:46
@dafiliks
Copy link
Contributor Author

dafiliks commented Dec 7, 2023

Please check if this is what you wanted.

@GwnDaan
Copy link
Member

GwnDaan commented Dec 7, 2023

Good job! It'a almost there I think, only thing still left would be the line:

https://github.com/Open-Agriculture/AgIsoStack-plus-plus/blob/main/isobus%2Finclude%2Fisobus%2Fisobus%2Fisobus_virtual_terminal_client.hpp#L1657

Here again priority is not used anymore, so the std::pair can be removed, and you'd end up with the nested std::vector<std::vector<std::uint8_t>>

Also I saw you managed to squash your commits, nice!

@GwnDaan GwnDaan added the iso: virtual terminal Related to the ISO-11783:7 standard label Dec 7, 2023
@dafiliks
Copy link
Contributor Author

dafiliks commented Dec 7, 2023

Hey, I don't know why you would want to remove this, because we want the priority to still exist but it just to be set to 5? Anyways, I did this and the it->first and it->second statements stopped working. I tried to fix this but its most likely wrong. Check it out. Thanks!

@GwnDaan
Copy link
Member

GwnDaan commented Dec 7, 2023

Hey, I don't know why you would want to remove this, because we want the priority to still exist but it just to be set to 5? Anyways, I did this and the it->first and it->second statements stopped working. I tried to fix this but its most likely wrong. Check it out. Thanks!

Yeah, so basically the commandQueue was the link between the queue_command function and send_command function. When that link first was created, I thought it could have different priorities, but with the current standard there we're no different priorities for VT commands.

However, that doesn't mean that messages (something different than the VT commands) can't have other priorities, it's just that the commandQueue is only for VT commands and not for messages in general. And since you already changed the send_command to have a fixed priority of 5, I figured we can just remove the priority for the VT commands further up the road, since after that fixed priority, they were basically unused.

I hope this explanation makes sense to you hahah. I'm not sure about your knowledge of the CAN/J1939/ISO11783 protocols in general, but I understand it could be a bit hard to gasp otherwise.

isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
isobus/src/isobus_virtual_terminal_client.cpp Outdated Show resolved Hide resolved
removed priority parameter for send_command function

error fixes

error fix v2

revert

additional error fixes

additional additional error fixes

code cleanup

erors fixed

changes

changes requested done

error fix

fixed

changes

it pointer fixes
@GwnDaan
Copy link
Member

GwnDaan commented Dec 8, 2023

Thanks again for taking the time to contribute to the project. Don't take the feedback personally, I like to keep the project up to a high standard haha. Your efforts are greatly appreciated!

@GwnDaan GwnDaan merged commit b385d84 into Open-Agriculture:main Dec 8, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iso: virtual terminal Related to the ISO-11783:7 standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update all VT client messages to priority 5 Update supported version in working set maintenance message
3 participants