INtime SDK Help
hpeSetTargetTimer
INtime SDK v6 > About INtime > Networking and I/O > High-Performance Ethernet > hpeSetTargetTimer

Use a target timer to signal a semaphore when a target time is reached.

HPESTATUS hpeSetTargetTimer(
    HPEHANDLE devhandle, 
    DWORD idx, 
    HPE_1588_TIMESTAMP *time, 
    QWORD ns_delta, 
    KNHANDLE sem
);

Parameters

devhandle
A handle value for the device.
idx
Timer instance, 0 or 1.
time
ns_delta
The time at which to signal the semaphore. This may be a system time obtained via hep1588GetSystemTime with some delta added with hpe1588TimeAdd. May be NULL if sem is NULL, in which case the timer is canceled.
sem
A KNHANDLE for the (low-level) semaphore to signal. A NULL value cancels the timer.

Remarks

Small values of us_delta (< 50us) may result in heavy CPU load (depending on the CPU and other system factors). If “time” is less than the actual system time, the semaphore is never signaled. Canceling a timer may leave outstanding units on a semaphore if they have not been consumed by the application. If the system time is adjusted (by way of hpe1588SetSystemTime, hpe1588AdjustSystemTime) timers may be extended or missed. If a periodic timer is required it may be advantageous to use a “one shot” timer (us_delta = 0). This will allow the application to compensate for propagation delay incurred when configuring the timer.

Return Values

A status value indicating the success or failure of the operation:

E_OK The operation completed successfully.
E_EXIST The handle given is not a handle for an open HPE interface.
E_LIMIT The value of the idx parameter is out of range.
E_PARAM The time parameter is NULL and the semd parameter is non-NULL.
E_CONTEXT The device has not been opened in ALL_INTERRUPTS mode.

Requirements

Versions Defined in Include Link to
INtime 6.0 (HPE3) intime/rt/include/hpeif2.h hpeif2.h hpeif2.lib
See Also