OpenDOF Project
void DOSOperation_SetHeuristic ( DOSOperation  op,
uint16  heuristic 
)

Enable randomized acceptance of the operation.

Rather than being exact, this parameter causes a heuristic algorithm on the responder where each picks a random number and compares it to the percentage. If their number is less than or equal to the percentage then they will take action and respond.

Since each responder determines whether to take action based solely on the percentage and the random number, this method does not cause any network synchronization of responders. It has an effect on both the total number of responders that take action and on the total response count.

Parameters
opThe operation. This must not be NULL.
heuristicA heuristic, representing a percentage of receivers that should take action based on the request. The must be in the valid range, from 0 (or DOSOPERATION_HEURISTIC_NONE), representing 0% (or none, a way to prevent execution of the operation), to 32767 (or DOSOPERATION_HEURISTIC_ALL), representing 100% (or all). The default is 32767 (all).
core-c-cos Version 7.0.1 Build 0
2018-02-08