PxToChange()

Change the timeout and events associated with To.

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxToChange (PxTo_t To, PxTicks_t timeout, PxEvents_t events);
ARGUMENTS
To

Timeout object

timeout

New timeout

events

New events

RETURN VALUES
  • PXROS error code

ERROR CODES

PXERR_REQUEST_ILLEGAL

The caller is not the requester of the To object

PXERR_TO_ILLTO

To is not a valid timeout object

DESCRIPTION

PxToChange changes the timeout and events associated with To. It implicitly stops To.

IMPLEMENTATION GUIDELINES
Before call
  • ToId must be a valid PXROS-HR timeout object created with a PxToRequest call (V). The validity of ToId may also be checked by the PxToIsValid macro (F).

  • The timeout parameter must have a plausible value. It should be a constant or the result of a PxTickGetTicksFromMilliSeconds call (V);

  • The parameter events contains an event bit and should not be zero. Typically the event is a constant (V).

After call
  • The function returns PXERR_NOERROR if the timout 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
}