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

Add infrastructure for VT identify message handling in AgIsoVt #548

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

martonmiklos
Copy link
Contributor

Describe your changes

Added infrastructure for VT number handling and VT number identification. This includes:

  • Adding setter API for the J1939 NAME field of the control funcitons
  • Add virtual callback for handling the Identify VT command

Fixes Open-Agriculture/AgIsoVirtualTerminal/#81

How has this been tested?

Built AgIsoVT supporting the setting of the VT number using this stack

@martonmiklos martonmiklos marked this pull request as draft February 17, 2025 20:34
@martonmiklos martonmiklos marked this pull request as ready for review February 17, 2025 20:46
@martonmiklos martonmiklos requested a review from ad3154 February 17, 2025 20:46
@@ -46,6 +46,11 @@ namespace isobus
return controlFunctionNAME;
}

void ControlFunction::set_NAME(const NAME &newNAME)
{
controlFunctionNAME = newNAME;
Copy link
Member

Choose a reason for hiding this comment

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

What's the intent of this setter? IDK if we would want it exposed to everything, because if it's called on an internal control function it will not restart address claiming or anything....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used this to alter the NAME of the CF here, right after it's initialization:
https://github.com/martonmiklos/AgIsoVirtualTerminal/blob/support_setting_vt_number/src/ServerMainComponent.cpp#L51

What do you think if I move all the settings handling in AgIsoVT to a separate class what I can initialize before the creation of the ServerMainComponent handle the CF Name change before the CF initialization. This way we can get rid from this change in the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants