PxToChange()
Change the timeout and events associated with To.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxToChange (PxTo_t To, PxTicks_t timeout, PxEvents_t events); - ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_REQUEST_ILLEGALThe caller is not the requester of the
ToobjectPXERR_TO_ILLTOTois not a valid timeout object - DESCRIPTION
-
PxToChangechanges the timeout and events associated with To. It implicitly stops To.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
ToIdmust be a valid PXROS-HR timeout object created with aPxToRequestcall (V). The validity ofToIdmay also be checked by thePxToIsValidmacro (F). -
The
timeoutparameter must have a plausible value. It should be a constant or the result of aPxTickGetTicksFromMilliSecondscall (V); -
The parameter
eventscontains an event bit and should not be zero. Typically the event is a constant (V).
-
- After call
-
-
The function returns
PXERR_NOERRORif the timeout could be changed. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" #define MY_EVENT_MASK 0x1l PxError_t Err = PxToChange(To, 5, MY_EVENT_MASK); if (Err != PXERR_NOERROR) { // Report error }