Programming Guide : Inter-Frame Communication Techniques : How You Can Communicate Between OpenROAD Applications Using Database Events : How Communication Using a Database Event Works
 
Share this page          
How Communication Using a Database Event Works
Communication using database events is two-way: any application can either send or receive a database event.
To use a database event, you would perform the following basic steps:
1. Use the SQL create dbevent statement to create the database event.
2. In the receiving application, use the SQL register event statement to register frames to receive the event.
3. In the frames' scripts, write the database event blocks.
4. In the sending application, use the SQL raise dbevent statement to send the event.
When an application executes a raise dbevent statement, the application sends the specified event, and any specified text, to the DBMS. In turn, the DBMS sends it to any application that is registered to receive the event and is connected to the same database as the sending application.
In OpenROAD, applications poll regularly for database events from the DBMS. The DBEventPollrate attribute defined for the SessionObject determines the time interval between each polling.
When an OpenROAD application polls and finds a waiting database event, it places the event on the native event queue and initializes a separate DBEventObject for each frame registered to receive the event. When the event reaches the top of the native event queue, OpenROAD dispatches it to the appropriate frame queues.