OnSend / OnReceive - Timing and Program Flow

<< Click to Display Table of Contents >>

Navigation:  Reference (Scripting) > OnSend / OnReceive Event Procedures >

OnSend / OnReceive - Timing and Program Flow

Sub DL_OnSend() Timing

 

While a script is running, the DL_OnSend() event procedure is executed once for each new Send Sequence. This applies to both, sequences sent by clicking the "Send" button, and DL.SendSequence calls.

 

The DL_OnSend() event procedure is only entered after the current line of script code has been executed. "Send" requests are buffered in the meantime.

 

The sequence diagram below shows the resulting timing behavior for an example with one 'manual' send request (sequence1), and a second Send Sequence triggered by script code (DL.SendSequence "sequence2").

 

NOTE: parameter wildcards and checksum fields are processed before the sequence data enters the OnSend() queue.

 

dl_onsend_timing

 

 

 

Sub DL_OnReceive() Timing

 

Similar to DL_OnSend(), the DL_OnReceive() event procedure is not executed immediately after Docklight has detected a new Receive Sequence match. Instead, the events are buffered and executed after the current line of script code has been executed.

 

The sequence diagram below shows the timing for an example where two different Receive Sequences are detected in one go, and the DL_OnReceive() code is executed at a later point.  

 

NOTE: Checksum fields are processed in the Receive Data Handler, before the sequence data enters the OnReceive() queue.

 

dl_onreceive_timing