Greetings for the day!
I have a digital signal with 3 different states, say Red, Green and Blue.
Now at a given time i need to programatically find out what was the last state before the given time state. To put it in form of example I have TagA with 3 digital state.
The state of signal at Red, Blue and Green as mentioned
|1||Blue||9-May-2016 8:16:31 AM|
|2||Blue||10-May-2016 8:16:31 AM|
|3||Blue||11-May-2016 8:16:31 AM|
|4||Red||12-May-2016 8:16:31 AM|
|5||Red||12-May-2016 8:36:31 AM|
|6||Red||12-May-2016 8:46:31 AM|
|7||Green||12-May-2016 9:16:31 AM|
|8||Green||17-May-2016 9:53:00 AM|
So suppose from the above case I would like to know the last (previous) status at 12-May-2016 8:46:31 AM should give me Blue at time 11-May-2016 8:16:31 AM.
How could I achieve my requirement, I dont want to write a loop simply pass the time and need to know the last status, disregarding the current status at a given time. Please assist.
Thanks & Regards,