Deeko
Lifer
Ok, here's my situation...
I have a .NET/C# application that acts as a "middleman" between a flash user interface and a hardware device. The flash communicates with .NET using the external API(the old version uses FS commands but I get the same result either way), and the device communicates through serial.
At the end of a transaction, the flash requests the transaction to end. I send this command to the device, it clears out its message queue and eventually(takes less than a second but there is a delay) reports back to me a value. The flash requests this value from me...problem is, the flash can request this at any time after 'end transaction' is pressed, and sometimes the device hasn't communicated it back to the app yet. How can I make the application wait until its ready? I can't tell the flash to ask again...it will ask once, and expect a value to be returned. I somehow need a way for it to just wait until the device returns the value, and then return it to the flash.
I've tried using Thread.Sleep, and a timer, neither worked because that pauses the entire application, not just that specific function...
Any ideas?
I have a .NET/C# application that acts as a "middleman" between a flash user interface and a hardware device. The flash communicates with .NET using the external API(the old version uses FS commands but I get the same result either way), and the device communicates through serial.
At the end of a transaction, the flash requests the transaction to end. I send this command to the device, it clears out its message queue and eventually(takes less than a second but there is a delay) reports back to me a value. The flash requests this value from me...problem is, the flash can request this at any time after 'end transaction' is pressed, and sometimes the device hasn't communicated it back to the app yet. How can I make the application wait until its ready? I can't tell the flash to ask again...it will ask once, and expect a value to be returned. I somehow need a way for it to just wait until the device returns the value, and then return it to the flash.
I've tried using Thread.Sleep, and a timer, neither worked because that pauses the entire application, not just that specific function...
Any ideas?