vtk_event

vtk_event_control

Usage         
vtk_event_control flag

Description
This procedure controls the asynchronous channel of communication with the VOV server (the "Channel"). 
This procedure normally is used to START and STOP the Channel, but it can also be used to temporarily SUSPEND the Channel and then to RESUME it.
The procedure also controls whether events are passed to the TCL interpreter (on the client side) by means of the two commands START_TCL_HANDLER and STOP_TCL_HANDLER.
'flag' is one of:

* INFO get info about local event buffer (current event count, hi-water mark)
* STATUS get status of connection
* START to open the channel
* STOP to close the channel
* SUSPEND to temporarily close the channel
* IGNORE to temporarily ignore events
* HANDLE to handle events again (opposite of IGNORE)
* RESUME to reopen a suspended channel
* START_TCL_HANDLER to start dispatching events to the Tcl handler (expensive)
* STOP_TCL_HANDLER to stop dispatching events to the Tcl handler.
* DISCONNECT_HANDLER_NONE if disconnected, do nothing
* DISCONNECT_HANDLER_TCL if disconnected, call tcl handler vovDroppedAsyncConnectionCallBack
* DISCONNECT_HANDLER_RECONNECT if disconnected, simply reconnect
* UPDATE_ALL to update all graph objects in the console

Example
vtk_event_control START
vtk_event_control START  2000;    # Start with a max buf size of 2000MB
vtk_event_control SUSPEND
vtk_event_control RESUME
vtk_event_control STATUS
vtk_event_control INFO
vtk_event_control DISCONNECT_HANDLER_TCL
   
Returns       
Nothing.

vtk_event_generate

Usage         
vtk_event_generate numberOfEvents "...subjectList..." "...verbList..."

Description   
Generate the specified number of events with all the combinations of subjects and verbs. 
This procedure is used only in Flowtracer testing. 

Examples 
vtk_event_generate 100 JOB INFORM generate 100 events (job, inform). 
vtk_event_generate 10 NODE {CHANGE MOVE} generate 10 events (node, change) and 10 events (node, move). 
vtk_event_generate 1 ALL INFORM generate 1 event (subject, inform) for each possible subject: (annotation, inform), (block, inform), (slave, inform) etc. 
vtk_event_generate 2 {NODE BLOCK FLOW} {CHANGE MOVE} generate 2 events for each possible couple. 
vtk_event_generate 1 ALL ALL generate every possible event.

Note          
If you generate random events (like in the last example) it could happen that most of them does not have any sense (for example:
(JOURNAL, MOVE)).

vtk_event_get

Usage:         
vtk_event_get [timeout (default 60)] [resultArray]

Description:
When called with up to 1 argument, this procedure returns a list corresponding to an event. 
When called with 2 arguments, the procedure fills the resultArray with information about an event.
If no event is available, the procedure waits for up to 'timeout' seconds and then returns with value "TIMEOUT".

Example:
set ev [vtk_event_get 5]

Set the variable 'ev' with the next event. 
If no events are available in the next 5 seconds then it returns "TIMEOUT"

Example:
set ev [vtk_event_get 30 resArray]

if an event is available it is loaded into the array 'resArray'. In case of timeout the variable ev is set to the value "TIMEOUT"   

Returns:       
A list corresponding to an event in either of the following two formats.
subject verb id aux
subject verb id timestamp message

Or the string  WOULDBLOCK or the string TIMEOUT.
This list is loaded on the array 'resultArray' if it is present.

vtk_event_hurl

Usage
vtk_event_hurl eventId subject verb "description"

Description
Generate the specified event.
This procedure is used mostly in VOV testing.

Examples
vtk_event_hurl 4721 JOB STOP ""
vtk_event_hurl 6354 NODE MOVE "23 6"
vtk_event_hurl 6354 NODE GUIUPDATE

Note: 
With this vtk you could generate events that do not
make any sense (for example: (JOURNAL, MOVE)).

vtk_event_subjects_map

Usage:         
vtk_event_subjects_map arrayname

Description:   
Fills the array with subject's character and the meaning for all events. 

Example:
vtk_event_subjects_map myarray
parray mymap
mymap(a) = ANNOTATATION
mymap(d) = ALVE
...


vtk_event_verbs_map

Usage:         
vtk_event_verbs_map arrayname

Description:   
Fills the array with verb's character and the meaning for all events.

Example:
vtk_event_verbs_map myarray
parray mymap
mymap(a) = ATTACH
mymap(b) = BARRIER
...