BullseyeCoverage Up Contents Search

cov_dumpPart - Save Partial Data With Small Footprint Run-Time

int cov_dumpPart(unsigned limit, int *error_ptr);

Description

Function cov_dumpPart writes the same file as cov_dumpData and can be used to throttle the rate at which the data is written. To write the whole file, call this function repeatedly until it returns zero. Use cov_dumpData rather than this function unless throttling is required.

The limit parameter requests the maximum number of bytes written. However, up to 65 bytes may be written regardless of the value of limit. When limit is 1, cov_dumpPart calls the write function at most once.

If an error occurs, one of the error codes listed in Run-Time Errors is stored in the variable pointed to by error_ptr.

This function is automatically declared in source files compiled by covc. In other source files, declare it by including <BullseyeCoverage.h>.

This function is only available with the embedded system small footprint run-time configuration.

Return Value

The function returns non-zero if more data remains to be written. If an error occurs, the return value is zero.

EXAMPLE

#if _BullseyeCoverage
    int status;
    while (cov_dumpPart(4096, &status)) {
        nanosleep(&ts, NULL);
    }
#endif

Updated: 3 Apr 2023