Chapter 22: miscellaneous functions, 1 scriptfordisplayonly(), 2 sleep() – Teledyne LeCroy SAS_SATA Protocol Suite Verification Script Engine Reference Manual User Manual

Page 82: 3 converttohtml(), Chapter 22, Miscellaneous functions, Cript, Isplay, Leep, Onvert

Advertising
background image


82

Chapter 22: Miscellaneous Functions

22.1 ScriptForDisplayOnly()

This function specifies that the script is designed for displaying information only and that its
author does not care about the verification script result. Such a script has a result of DONE
after execution.


Format :

ScriptForDisplayOnly ()


Example

ScriptForDisplayOnly();
#Use this function call anywhere in the OnStartScript() function.

22.2 Sleep()

This function asks VSE not to send any events to a script until the timestamp of the next event
is greater than the timestamp of the current event plus sleeping time.


Format :

Sleep( time )


Parameters
time

VSE time object specifying sleep time


Example

Sleep ( Time(1000) ); # Don’t send any event occurred during 1 ms
# from the current event.

22.3 ConvertToHTML()

This function replaces spaces with "&nbsp" and carriage return symbols with "<br>" in a text
string.


Format :

ConvertToHTML( text_string )


Parameters
text_string

Text string


Example

str = "Hello world !!!\n";
str += "How are you today?";

html_str = ConvertToHTML ( str );
# html_string =
"Hello&nbspworld&nbsp!!!<br>How&nbspare&nbspyou&nbsptoday?"


Note:
Some other useful miscellaneous functions can be found in the file VSTools.inc.

Advertising