Defining production objects  Understanding object flow

Chapter 3: Using MSG-IDE

Defining timer objects

The timer object provides a means for setting an alarm in the application. Use it to execute a set of logic on a periodic basis.

NoteAlthough the function associated with the timer is normally executed at the end of the interval set in the timer, there is an exception. If, at the end of this interval, some other process (such as a loop) is being run from within the AIM, the execution of the function associated with the timer will not occur until that other process has terminated. This is because the timer was designed to not allow its associated function to interrupt another process.

StepsDefining a timer object

  1. Select Timer from the Classes list and click Add. The Timer window appears.

  2. Click in the name Field and type the reference name for the timer object.

  3. Click in the ID field and type an object ID value, which must fall in the range of 1 - 32767.

  4. Click in the Interval field and type the number of milliseconds the timer should wait before performing the function identified in the Function drop-down list.

    This is an initial value. This number is replaced by any value greater than 0 in the timer::set() method that makes the timer active.

  5. Either click the Function drop-down list and select the name of the function the timer should initiate whenever it counts up to the time specified in the Interval box or click Details.

  6. Choose one of the following:

  7. Click OK to complete your entries or modifications and build the timer.

NoteSee the e-Biz Impact ODL Guide for more information about the kill() and set() methods.





Copyright © 2005. Sybase Inc. All rights reserved. Understanding object flow

View this book as PDF