beautypg.com

Return value, Portability, Usertimergetwaitevent – Rockwell Automation 6182 SDK User Manual

Page 79: Syntax, Remarks

background image

RAC6182-Specific Extensions to the CE API

4–39

Publication 6182-UM002B-EN-P

Parameter

Description

TimerNumber

Number of a previously claimed timer.

Count

Pointer to a DWORD allocated by the caller in which
the current count will be stored.

Return Value
Possible return values are represented by macros defined in usertimers.h:

USER_TIMER_OK - Successfully claimed or released timer

USER_TIMER_INVALID_TIMER - Timer number not present on

system

USER_TIMER_NOT_CLAIMED - Another application already has

claimed the timer so this application could not claim it

USER_TIMER_INVALID_PARAMETER - Invalid value

USER_TIMER_NOT_RUNNING - Timer not running

Portability
This function is specific to the RAC6182 hardware.

UserTimerGetWaitEvent

This function registers to receive notification of timeout event. It is
prototyped in usertimers.h.

Syntax

#include

DWORD UserTimerGetWaitEvent(DWORD TimerNumber,BOOL ManualReset,

HANDLE *WaitEvent)

Remarks
Creates an event handle in *WaitEvent which may be used in a
WaitForSingleObject() or WaitForMultipleObjects() call. This event is
set whenever the timer counts down to zero, allowing interrupt driven
timer handling.

Parameter

Description

TimerNumber

Number of a previously claimed timer.

ManualReset

WaitEvent

Pointer to a caller allocated HANDLE, in which an
event handle will be stored.

This manual is related to the following products: