Rtnl2GetClockRate
Rtnl2GetClockRate gets the rate of a clock.
Syntax
BOOL Rtnl2GetClockRate(
[in] RTNL2_HCLOCK Clock,
[out] LONG *pScaledOffsetPpm
);
Parameters
[in] Clock
A handle to the clock object (see RTNL2_HCLOCK).
[out] pScaledOffsetPpm
The rate currently applied, in ppm relative to the nominal rate (positive or negative).
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
ERROR_NOT_READY |
The calling process has not called Rtnl2Init. |
|
ERROR_INVALID_PARAMETER |
One of the following conditions occurred:
|
|
RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT |
The NL2 process didn’t reply within an acceptable delay. |
|
RTNL2_ERROR_NO_MORE_COMMUNICATION |
Unable to communicate with the NL2 process. This might be because the NL2 process is no longer running, or because an application process thread was terminated during a previous call to an NL2 API function. |
Remarks
The pScaledOffsetPpm return value is in Q16.16 fixed point representation.
This is the actual applied rate, which may be different from the requested rate if the latter was out-of-range for the hardware (see Rtnl2SetClockRate).
Characteristics
| Real-time | ||
|
Deterministic |
No |
|
|
Shutdown-safe |
No |
|
| Local memory usage | ||
|
Process |
External MSpace usage |
Internal MSpace usage |
|
System |
No |
No |
|
NL2 process |
No |
No |
|
Calling process |
No |
No |
| Windows contiguous memory usage | ||
|
Usage |
No |
|
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |
See Also: