requestValue always results in a timeout

Added by Torgny Johansson about 4 years ago

Hi!

I started testing AGA a bit yesterday and after a bit of help I got the connection to the simulator working. Now, I can register for signals and get callbacks whenever I change those signals in the simulator.

However, I can't get the requestValue method of the AutomotiveManager to work. It always results in a timeout callback.

This is what I do:
- implement the AutomitiveListener callbacks
- register as a listener with the AutomotiveManager
- register for signal changes (e.g. for signal FMS_WHEEL_BASED_SPEED)

After doing that, I do get the receive callback whenever I change the value of FMS_WHEEL_BASED_SPEED in the simulator.

But if I also do:
- request signal value with requestValue for signal FMS_WHEEL_BASED_SPEED

I only get the timeout callback after a few seconds.

Any ideas what I might be doing wrong?

Thanks!

Replies (8)

RE: requestValue always results in a timeout - Added by Joakim Lundvall about 4 years ago

Hello Torgny,

Sorry to hear that you are experiencing problems with the SDK. I took a look at it today and was able to reproduce the issue. I have made a fix for requests and the timeout issue. If you use JAR files you can download new versions in the repo. ROMs will be built by the nightly crontab task tonight so you can find new ROM and SDK tomorrow morning.

// Joakim Lundvall
 

RE: requestValue always results in a timeout - Added by Torgny Johansson about 4 years ago

Excellent, that solved my issues with requestValues!

Thanks!

RE: requestValue always results in a timeout - Added by Torgny Johansson about 4 years ago

I just tested the same thing when developing with JAR-files instead of using the custom AGA SDK and then I still get the problem.

requestValues just times out. I'm using the 1.1-SNAPSHOT version of the JAR files.
 

RE: requestValue always results in a timeout - Added by Peter Kembro about 4 years ago

Sorry about that!

We will look into this and re-build needed artifacts. It will not happen over night, but will keep you posted.

RE: requestValue always results in a timeout - Added by Joakim Lundvall about 4 years ago

The AGA SDK is built with the 1.1-SNAPSHOT files so the fix should have been there since I looked at it. I did verify the fix with JAR-files. Must be another issue in that case. Do you get the exact same behavior now?

// Joakim Lundvall

RE: requestValue always results in a timeout - Added by Torgny Johansson about 4 years ago

It seemed to be the same behavior. I'll have another look and get back with some more details. 

Is there any dependency on the order in which I do stuff? E.g. does it matter when I connect the simulator and when I start the app etc etc?

RE: requestValue always results in a timeout - Added by Torgny Johansson about 4 years ago

Ok, there seem to be a few different scenarios for me when using JAR-files. The reason I thought I saw the same behavior was that I only did a "requestValues" when the app started. Now I've added so that I can do it whenever I want. I'll try to explain the behavior I'm seeing.

If I start the app when the simulator is disconnected, of course nothing works. However, if I click "connect" in the simulator and then "play" after starting the app, still it won't work. Neither requestValue or the callbacks work.

Now, if I restart the app, leaving the simulator in "connected" state, a few seconds after the app is started the "play" button in the simulator becomes active and the "pause" button becomes inactive. The signals still looks like they are being sent though since the timers are incrementing. RequestValues and callbacks still doesn't work though. If I click the "play" button now, then both callbacks and requestValue start working ok. If I restart the app, the same behavior is repeated (unless I also disconnect the simulator).

So in order for me to get things to work when using JAR-files I need to do the following:
Start app - Connect/play simulator - Restart app - Play simulator        - now both requestValue and callbacks are working (if I restart the app I have to press "play" again to get things to work)

If I just do:
Start app - Connect/play simulator       - neither requestValue or callbacks are working, I have to restart app and hit "play" again for it to work.


I get that the connection between the simulator and the app is lost when I restart the app since the automotive service is now embedded in the app I suppose. But that means that requestValue will never work for me when the app starts until I hit "play" in the simulator? And I can't hit play in the simulator until the app is already started...

I hope my description above isn't too confused...

/Torgny

(1-8/8)