Share this page

# lrt_tpgprio

Communication Functions

Returns the priority of the last request sent or received.

int lrt_tpgprio( );

The lrt_tpgprio function returns the priority of the last request sent or received. Priorities range from 1 to 100, with 100 being the highest.

## Return Values

If the function succeeds, it returns the priority. If the function ends with an error, it returns -1 and sets the error code in tperrno.

## Parameterization

Parameterization is not applicable to this function.

## Example

In the following example, lrt_tpgprio retrieves the priority of the last request. If it is less than or equal to 50, the service request priority is doubled.

Copy code

    int prio;
    prio = lrt_tpgprio();
    if (prio <= 50)
    lrt_tpsprio(2 * prio, TPABSOLUTE);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: