User Tools

Site Tools


jvs:cigal:manual:chapter6:r_dwait

CIGAL Reference Manual, Chapter 6 (RealTime): r_dwait

r_dwait -- Wait for a digital input value

usage: r_dwait opflg eflag ltime Databuf ChMask [WaitFlag TimeBuf WaitMask]

R_DWAIT is a REALTIME operator that waits for a change in the digital input line. CHMASK specifies which digital input bits to consider in determining the input value.

WAITFLAG is a bitflag specifying waiting options. The flag bits are:

        1 - terminate on a rising pulse (0 to 1 transition) [default]
        2 - terminate on a falling pulse (1 to 0 transition)
        4 - suspend all other operations until the wait is satisfied (or the
            operator presses a key or mouse button).  Normally R_DWAIT only
            suspends operations in its own timer or repeat loop.

TIMEBUF can be used to specify a long array to store the time that the wait terminated. If the DATABUF is an autoincremented array (e.g. buf++) then TIMEBUF will also be incremented after storing the timestamp.

WAITMASK specifies which bits will terminate the wait. This argument is ignored unless OPFLAG has the LOGENTRY bit set and WAITMASK is not equal to CHMASK. In that case, changes in CHMASK bits that aren't in WAITMASK will cause a log entry but will not terminate the R_DWAIT operation.

See Also:
CIGAL Home, CIGAL Manual, RealTime List, Manual Help

jvs/cigal/manual/chapter6/r_dwait.txt · Last modified: 2023/02/23 18:43 (external edit)