General

Parent Previous Next

VisualSim                                                                                                                                    

General

 

Function & Argument Type(s)

 

Description

 


Example

getDate

(VisualSim.data.LongToken dateLong)

Convert UTC (LongToken) to text Date format Fri Feb 10 09:37:27 PST 2006.


getDate(long)

property

(String propertyName)

Get the specified property from the environment.


getProperty("java.home")

recordTokenToLineWriter

(VisualSim.data.Data structureToken token)

Convert a the visual look of the Data Structure from multiple lines to a single line string format. Used to write the DS to a file for reading back into the model later.







recordTokenToLineWriter(port_token)

sendToCommandLine

(String message)         

Send to Command Line string message.

a = sendToCommandLine("Exception")

throwMyException

(String message)        

Throw My Exception.

throwMyException("User-defined Exception")

within

(VisualSim.data.Token token1,

VisualSim.data.Token token2,

doubl distance)          

Return true if the first argument is close in value to the second, where "close" means that it is within the distance given by the third argument.

a = 1.0

b = 1.5

c = within(a,b,0.6)

  = true

c = within(a,b,0.4)

  = false

setTrace

(String Block or Memory Name, Boolean flag)        

Writes trace data to a standard destination- <User Home>/.VisualSim folder/ VisualSimTraceLog.txt file. The string can be a Script name or a variable name (local and global), or Variable- which includes all the variable. The boolean value turns on and off the trace.

setTrace("Memory1",true)

Start trace on Memory1

setTrace ("VirtualMachine",false)

Stop trace on VirtualMachine.

readAndClearTrace

()        

Reads the data from the file- <User Home>/.VisualSim folder/ VisualSimTraceLog.txt file, write the content to the LHS, and clears the data in the file.

content=readAndClearTrace()


myTrace 

(String trace_Name, String trace)        

Writes trace data to a standard destination- <User Home>/.VisualSim folder/ VisualSimTraceLog.txt file. The first String is the trace name and the second is the trace value.

myTrace("Early Trace","Early Value")


myStats

(String trace_Name, String trace)        

Writes statistics data to a standard destination- <User Home>/.VisualSim folder/ VisualSimStatsLog.txt file. The first String is the trace name and the second is the statistics value.

myStats("Bytes_Used","200")


myWarning

(String message)        

Writes the warning 'message" to a standard destination- <User Home>/.VisualSim folder/ VisualSimConsoleLog.txt file. 

myWarning("Buffer is overflowing")

myQuestion

(String message)        

My Question, pauses simulation with a yes, no window.  The model proceeds after the user select Yes.

myQuestion("Trace File has completed")

 

 

Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files