7526 DCT Reference


Reference&mdash.Timer functions

reference&mdash.timers

TimerSetAlarm

This function sets a user specified number of alarms to trigger at a selected time. Triggering can consist either of simulating the start of a function key transaction program, or a CFR function. This function only will initiate during terminal idle times. This function requires V2.00 microcode or later.

C Format

     #include   "cfrapi26.h"             // For defined values
 
     USHORT     TimerSetAlarm(timerptr, count)
 
     struct     timer_alarms *timerptr   // Pointer to timer_alarms structure
     USHORT     count                    // number of alarms in the structure
 
     Returns:   E_OK                     // If no error occurred
                E_PARAM                  // If parameters are incorrect

Masm Format

     Input:    ah    = 00h
               es:bx = timerptr
               dx    = count
 
     Call:     INT 47h
 
     Returns:  ax = 0       If no error occurred
                    1       If parameters are incorrect

Comments:

 

When setting a timer alarm, an array of memory must be created to the following format. No fields sizes or locations can be changed or skipped. This structure is defined in the file CFRAPI26.H, which is included on the CFR Programming Support Diskette.

All timer intervals desired MUST be declared in the call to SetTimerAlarm. To do this, put a subscript on the timer structure definition, such as

to create five copies of the timer_alarms structure. And, this memory must be global so that it is not de-allocated when the CFR processing completes.

All times are in 24 hour format.

The length of the string must be the first two bytes of the parmstring, i.e. "02ZA".

Example

int far main (int funct,char far *params)

TimerClearAlarm

This function clears all of the defined timer alarms set by the TimerSetAlarm function. This function requires V2.00 microcode or later.

C Format

     #include   "cfrapi26.h"                // For defined values
 
     USHORT     TimerClearAlarm()
 
 
     Returns:   E_OK                        // If no error occurred
                                            // (only value returned)

Masm Format

     Input:    ah = 01h
 
     Call:     INT 47h
 
     Returns:  ax = 0       If no error occurred (only value returned)

Example

int far main (int funct,char far *params)

TimerSetInterval

This function sets a user specified number of alarms to trigger at selected intervals. Triggering can consist either of simulating the start of a function key transaction program, or a CFR function. This function only will initiate during terminal idle times. This function requires V2.00 microcode or later.

C Format

     #include   "cfrapi26.h"             // For defined values
 
     USHORT     TimerSetInterval(timerptr, count)
 
     struct timer_intevals *timerptr     // Pointer to timer_intervals structure
     USHORT     count                    // number of timers in the structure
 
     Returns:   E_OK                     // If no error occurred
                E_PARAM                  // If parameters are incorrect

Masm Format

     Input:    ah    = 02h
               es:bx = timerptr
               dx    = count
 
     Call:     INT 47h
 
     Returns:  ax = 0       If no error occurred
                    1       If parameters are incorrect

Comments:

 

When setting timer intervals, an array of memory must be created to the following format. No fields sizes or locations can be changed or skipped. This structure is defined in the file CFRAPI26.H, which is included on the CFR Programming Support Diskette.

All timer intervals desired MUST be declared in the call to SetTimerInterval. To do this, put a subscript on the timer structure definition, such as

to create five copies of the timer_intervals structure. And, this memory must be global so that it is not de-allocated when the CFR processing completes.

The length of the string must be the first two bytes of the parmstring, i.e. "02ZA".

Example

int far main (int funct,char far *params)

TimerClearInterval

This function clears any defined timer intervals. This function clears all of the defined timer alarms set by the TimerSetInterval function. This function requires V2.00 microcode or later.

C Format

     #include   "cfrapi26.h"             // For defined values
 
     USHORT     TimerClearInterval()
 
     Returns:   E_OK                     // If no error occurred
                                         // (only value returned)

Masm Format

     Input:    ah = 03h
 
     Call:     INT 47h
 
     Returns:  ax = 0       If no error occurred  (only value returned)

Example

int far main (int funct,char far *params)

TimerSetAlarmAsynch

This function creates a user specified number of alarms to trigger at selected times. Triggering consists of turning a DO point on or off for some number of 20 millisecond intervals. This function happens asynchronously, NOT only during terminal idle times.

This function requires V2.00 microcode or later.

Note:

If the duration is set to 0, the DO point or LED is set forever to the state specified in the direction variable.
.

C Format

     #include   "cfrapi26.h"                // For defined values
 
     USHORT     TimerSetAlarmAsynch (timerptr, count)
 
     struct timer_alarms_asynch *timerptr   // Pointer to asynchronous timers
     USHORT     count                       // number of timer structures
 
     Returns:   E_OK                        // If no error occurred
                E_PARAM                     // If parameters are incorrect

Masm Format

     Input:    ah    = 04h
               es:bx = timerptr
 
     Call:     INT 47h
 
     Returns:  ax = 0       If no error occurred
                    1       If parameters are incorrect

Comments:

When setting a timer alarm, an array of memory must be created to the following format. No fields sizes or locations can be changed or skipped.

This structure is defined in the file CFRAPI26.H, which is included on the CFR Programming Support Diskette.

All timer intervals desired MUST be declared in the call to SetTimerAlarmAsynch. To do this, put a subscript on the timer structure definition, such as

to create five copies of the timer_alarms_asynch structure.

All times are in 24 hour format.

Example

int far main (int funct,char far *params)

TimerClearAlarmAsynch

This function clears all asynchronous timers alarms that have been set. This function clears all of the defined timer alarms set by the TimerSetAlarmAsynch function. This function requires V2.00 microcode or later.

C Format

     #include   "cfrapi26.h"               // For defined values
 
     USHORT     TimerClearAlarmAsynch ()
 
     Returns:   E_OK                       // If no error occurred
                                           // (only value returned)

Masm Format

     Input:    ah = 05h
 
     Call:     INT 47h
 
     Returns:  ax = 0       If no error occurred (only value returned)

Example

int far main (int funct,char far *params)