Worth Data 802 RF Credit Card Machine User Manual


 
6-3
Pick Item YY qty N
Scan barcode:
Enter Qty Picked:
Of course you can see how you might handle incorrect items or wrong
quantities by having your application generate prompts such as
Incorrect Item
Scan correct item:
Too many items
Pick item YY qty N
Enter Qty picked:
These are just examples and there are other ways to design a transaction of
this sort. The point is that you will need to create a data structure that
defines the transaction and another data structure that keeps track of where
in the transaction each terminal is (state management), independent of any
other terminals that might be active.
You will need to create a data structure or record of some sort that keeps
track of each terminal's state. The structure might keep track of where in a
transaction process a terminal is; any pending data from, or prompt for, the
terminal; and any other information that is relevant to a terminal in the
transaction process you have defined.
An easy way to create a data structure for each terminal is to define an array
of User Defined Type (VB) or Records (Delphi) or Structs (C++). The array
would be large enough to accommodate all of your terminals (one array
element for each terminal) and might look something like this in VB
Type TermData
TermID as integer
TransactionIndex as integer
PendingPrompt as string
PendingData as string
ErrorCode as integer
Transaction as TransactionData
Etc.
End Type
dim Terminals(25) as TermData
You will also need to define a transaction. Typically the transaction is
applied to all terminals so it is a single structure (there is not a copy for each
terminal)
Type TransactionElement
commandcode as integer
promptline1 as string