mpiControlNearestValidSampleRate
Definition
MPI_RESULT mpiControlNearestValidSampleRate(MPIControl control, double desiredRate, double *nearestRate);
Required Header: stdmpi.h
Change History: Added in 04.00.
Description
mpiControlNearestValidSampleRate determines the closest possible valid sample rate to the specified desiredRate for the controller/SynqNet and writes it into address pointed to be nearestRate.
control | A handle to a control object. |
---|---|
*desiredRate | The specified target sample rate. |
*nearestRate | A pointer to the closest valid sample rate value. |
Return Values |
---|
MPIMessageOK |
MPIControlMessageOBJECT_INVALID |
Sample Code
double nearestRate; returnValue = mpiControlNearestValidSampleRate(control, 5200.0, &nearestRate); if (returnValue == MPIMessageOK) { mpiPlatformConsole("Nearest Rate: %lf\n", nearestRate); }
See Also
mpiControlValidSampleRates | mpiControlTimingConfigGet | mpiControlTimingConfigSet | Valid Network Sample Rates