Closed hnguyenHWI closed 2 years ago
Hello @hnguyenHWI,
The get_current_settings()
and set_current_settings()
APIs should do exactly what you want to achieve. In order to understand why it returns NOK, I need to ask you some questions:
Thanks!
Hi @PTMargarido,
Thank you for your response!
I believe the Perception version is 8.30, and the mainframe is the GEN7tA. I know my customer is using various acquisition boards for voltage/current sensing, CAN input/output, and the eDrive but am not sure on all the specifics.
However, this seems to now be an intermittent error. I'm not sure what changed but both APIs seem to be working now. Occasionally I'll get the NOK return value but only rarely now. If you want to dive deeper into this I'm happy to provide any information about the issue, but I'm also happy to close this issue since it seems to be working.
Hey @hnguyenHWI ,
Thanks for the feedback, NOK is returned on various cases (one of them is the settings not being deserialized correctly, which it might be the case, since it seems to be an intermittent error). However there is an occasion that we return NOK which can have multiple reasons (and thus at the client side not really knowing what was the cause). We will add some more error messages on that occasion, so that in the future there is a more specific error code.
For know, I think we can close this issue.
Thanks and have a nice week.
Hello,
I tried doing what the example code does for the getting/setting of the mainframe settings. However, I'm getting a return value of "NOK" from the call to
ghs_set_current_settings()
.I also noticed that the return type of the blob from
ghs_get_current_settings()
wasstr
so I made abytes
object from the string and tried to send that toghs_set_current_settings()
, without success:What I am actually attempting to do with all of this, is configure the mainframe via Python to enable the Real-Time Publishing over CAN of data. I'm attempting to save settings and restore them, so that my users do not have to open Perception and configure the Real-Time Publishing settings nor the CAN output settings every time they wish to use my Python program.
Is there possibly a way I can make use of the
get/set_current_settings()
functions or another way that I can accomplish this goal?Thank you!