Hi,
I want to implement event trigger when Data change in c code,
I don't want to set a fix trigger_value,
does anyone know that how can I use privious data to compare current data?
or any suggestion?
Thanks.
Hi,
I want to implement event trigger when Data change in c code,
I don't want to set a fix trigger_value,
does anyone know that how can I use privious data to compare current data?
or any suggestion?
Thanks.
Sorry, there is nothing in DDS that does this for you. You will have to write use code to directly compare an old value of data to a new value of data and implement a triggering mechanism.
You can use a listener callback and then store the old value in the callback and then when called compare the new value with the old value and then either callback a different function registered with the callback or signal a semaphore to wake up a processing thread when the value of data changes.
What I describe is general programming and has nothing specific to do with DDS.