Question about client progress callback

RCF support and general discussion.
Post Reply
bladewhistle
Posts: 5
Joined: Wed Sep 19, 2012 5:54 am

Question about client progress callback

Post by bladewhistle »

In my application, some times client call the server with a complex mission will cost several seconds. It is necessary to provide a callback function mechanism to display a progress UI at client side.

In the manual, I see there are some description about the client progress callback.

But there are no description about how to update the progress from the server side.

Any code or example?

Thanks.

john06
Posts: 11
Joined: Thu Sep 20, 2012 2:10 pm

Re: Question about client progress callback

Post by john06 »

This is not really related to RCF, RCF is supporting callback, and this is up to you to define what your callback(s) is giving you !
In your case you should define something like:
"typedef void (* _ProgressProc)( float percent );" which is defined on client side (for example to display a progress bar), where percent argument is the % calculated on server and sent back to client.
and _ProgressProc is an argument of the function defined on server side that you call from client.

bladewhistle
Posts: 5
Joined: Wed Sep 19, 2012 5:54 am

Re: Question about client progress callback

Post by bladewhistle »

Hi, Thanks for your reply.

Are you sure the RCF really support the C++ native callback?? Since I don't see any description in the documentation.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Question about client progress callback

Post by jarl »

Currently the purpose of the RCF client side progress callback is to periodically return control to the application, while a synchronous call is in progress. From the progress callback you can do things like cancel the call (for example if the app wants to shut down), repaint UI's , show progress bars, or anything else you might want to do.

What bladewhistle is asking for, IIUC, is the ability to send progress indicators back from the server, during a remote call, and utilize that in the client side progress callback. This is currently not supported, but IMO that's a a great feature - I will make it a priority for upcoming releases.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

bladewhistle
Posts: 5
Joined: Wed Sep 19, 2012 5:54 am

Re: Question about client progress callback

Post by bladewhistle »

Thanks Jarl.

My current workaround is using another connection call server for interval progress retrieving(1 or 2 seconds) during a long time call.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Question about client progress callback

Post by jarl »

Yep, I thought about suggesting that - glad you got it working.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Post Reply