-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
VT change string value #231
Comments
Hi! I saw this exact behavior recently as well. Back then I thought it was my object pool that was wrong somehow. But since you're also facing it, I think I can do some research probably later today to find the issue behind this, I'll keep you updated 😄 |
Keep in mind too that changing a string value has a lot of mysterious caveats to it in the standard.
|
My results after testing It works fine! However, changing 2 string values at once is not possible right now, due to each command using a TP session. And we don't queue these TP sessions, hence the I tested both combinations of output strings, one is using the value attached to the OutputString object itself, and the other is using a StringVariable in combination with the OutputString. The modified example can be found here: change_string_value_example.zip |
Sweet!
Yeah, we also don't really want to queue TP sessions, as that could rapidly bloat our RAM usage. If you set up a set of flags with this little helper class and service it appropriately, you can easily and statelessly process the desired state of any VT object, and automatically re-try to send messages when the interface is busy. I have been meaning to expand the VT example for some time to include this functionality as an example, so I'll create another issue to demo some more complex VT interactions in the example using this method. |
Hey @ad3154, can you help me out here? I just saw |
According to the standard, you can only have 1 connection mode TP session with a certain PGN active between 2 control functions at a time, and since two |
So I guess what I'm saying is that we restrict it such that only 1 session can exist with identical control functions and PGN to avoid breaking the standard. In theory we could re-purpose some of those sessions to queue identical sessions, but I would advocate instead for making the application side more tolerant of retries and transient issues on the bus, because otherwise it just pushes the underlying problem to be 4 |
Hi! I changed my code a little bit and implemented the flags, but i didn't know if I use it the right way... I am processing my flags in the following function:
|
Hey! This seems essentially correct, just make sure Take a look at the example I'm working on here for an early peek at how I'm doing it if you'd like (though it won't compile until #235 and #237 are merged). You may also want to set all the flags at initialization time to ensure the object pool's state is well defined, as well as consider optionally implementing rudimentary filtering on if an object is shown.
Yes! This is how it re-tries if the stack is busy next time
Correct, a key object as defined in ISO11783-6 doesn't have an enabled attribute or option, unlike a button (and even for buttons it only works for version 4+). Keys only have a background colour, key code, macros, and a set of child objects. If you want to get a similar effect, there are some options, such as:
|
@ad3154 Do we want to document any of these questions in our FAQ? Or can we close this do you think? |
Adding an FAQ entry for "Why do some calls to send_something in the VT client fail sometimes" could be a good thing to add where we could document a workflow for retrying messages as well as why TP causes it. I wonder if we could integrate retries automatically by optionally wrapping the VT client in another class that managed retries automatically so that people wouldn't have to implement their own I also think it would be nice to have a page that describes what you can do with all the different VT objects, such as enable/disable, but I think that might be crossing a line about the ISO documents's copyright 😣 |
Describe the bug
I can't change the value of a string input or string output field
Supporting Documentation
I'm trying to change the value of an string field with
send_change_string_value
it doesn't work. The function to change a number value of an numeric field work.TestVirtualTerminalClient->send_change_string_value(OutputString_11000, static_cast<std::string>("hello"));
the function returns true.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: