T Clancy Posted December 2, 2010 Report Share Posted December 2, 2010 Hi, Just wondering if anyone knows anything about capturing events so that they can be replayed in the correct sequence and time order. So that it will replay the application in the exact same way the previous user used the application (No text input, just clicks representing touch screen user input). Thanks Tim Quote Link to comment
jgcode Posted December 2, 2010 Report Share Posted December 2, 2010 Just wondering if anyone knows anything about capturing events so that they can be replayed in the correct sequence and time order. So that it will replay the application in the exact same way the previous user used the application (No text input, just clicks representing touch screen user input). One example way to approach it could be: If you have a UI and a Controller And the UI sends messages to the Controller for each button press And for each button press, the action was also logged to disk Then you could read the file back and and send the messages directly to the Controller Quote Link to comment
ShaunR Posted December 2, 2010 Report Share Posted December 2, 2010 (edited) Queues are good for this sort of thing. they give you inherent FIFO sequencing. You can use the "Event" structure to place the controls' refnum on the queue then replicate the changes by emptying the queue. Edited December 2, 2010 by ShaunR Quote Link to comment
swenp Posted December 2, 2010 Report Share Posted December 2, 2010 You could register dynamic events for the controls you want to watch or record. That way you just have to write a "recorder" VI, no need to change anything in the VIs you want to watch. Put the events received in a queue or save them to a file and you have anything you need to replay the events. Quote Link to comment
PaulL Posted December 2, 2010 Report Share Posted December 2, 2010 There is a well-established design pattern to do exactly what you want. See the Memento Pattern in GoF Design Patterns. Also look at how you can combine this with the Command Pattern. You can support undo operations; the different commands and their parameters can be of arbitrary complexity, and can each have its own parameters. I highly recommend you take a look at this proven approach. Quote Link to comment
T Clancy Posted December 2, 2010 Author Report Share Posted December 2, 2010 Thank you all for the very speedy replies, most appreciative and helpful! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.