ToolTalk User's Guide

Scoping to a File Only

The type TT_FILE scopes to a file only. Example 3-3 shows a static file-scoped pattern; Example 3-4 shows a dynamic file-scoped pattern.


Example 3-3 Static File-Scoped Pattern

Obtain procid 

tt_open();  

Ptype is scoped to file 

tt_ptype_declare(ptype); 

Join file 

tt_file_join(file); 



Example 3-4 Dynamic File-Scoped Pattern

Obtain procid 

tt_open();  

Create pattern 

Tt_pattern pat = tt_create_pattern(); 

Add scope to pattern 

tt_pattern_scope_add(pat, TT_FILE); 

Add file to pattern 

tt_pattern_file_add (pat, file); 

Register pattern 

tt_pattern_register(pat);