promptline2 as string promptline3 as string NextIfError as integer NextIfOK as integer
End Type
dim TransactionSequence(10) as TransactionElement
TransactionSequence(1).commandcode = 1 'InputAny TransactionSequence(1).promptline1 = "Go to Location " + GetLocationCode TransactionSequence(1).promptline2 = "Press Enter When Ready "
TransactionSequence(1).NextIfError = 1 TransactionSequence(1).NextIfOK = 2 Etc.
As mentioned above, it is important to keep your event handlers short and efficient. This means that your program should spend as little time as possible "inside" the event handler (running the handler's code). Also, it is important to NOT call WD802Term methods from inside WD802Term event handlers. So a solution is needed that allows your program to respond to events outside of the event handlers.
An easy way to do this is with a polling scheme. Add a timer object to your application and in the timer's event handler check the TermData structure for the state of each terminal and make any appropriate WD802Term method calls from within the timer object's event handler. The timer can be set to fire every 100 milliseconds or every 10 seconds or anything in between that is appropriate for your application.
Another, more advanced way to decouple the WD802Term method calls from the event handlers is using threading techniques where each terminal is "running" in a thread that monitors that terminal's state.
WD802Term/ActiveX
WD802Term is a drop in ActiveX component that allows programmers to easily add the ability to send prompts to and receive data from their R/F Terminal across a wireless 802.11b Ethernet network connection.
The ActiveX component is compatible with Visual Basic, Visual C++, Delphi, and most other
Programming Considerations
Remember, plan for every error that the Server might return including:
Sequence Errors detected
Illegal Command detected
Addressing a Terminal Not Signed In