Resets one or all Receive Sequence hit counter(s). Also resets the search algorithm which checks the character stream for a matching Receive Sequence (see example code below).
The ResetReceiveCounter method syntax has these parts:
Optional. String containing the Name or Sequence Index of a Receive Sequence. If specified, only the corresponding counter is reset. If nameOrIndex is omitted, all counters are reset.
See WaitForSequence for a basic example.
A second application is demonstrated below - resetting the receive sequence detection each time a new Send Sequence is transmitted. This is especially useful when Docklight is testing a serial device, and the sequence detection should not get confused by incomplete or faulty packets received earlier. See also DL_OnSend().
' Example ResetReceiveCounter
' Reset sequence detection each time a new sequence is sent
' Endless loop to prevent the script from terminating immediately
DL.Pause 1 ' (the pause reduces CPU load while idle)