Changes between Version 7 and Version 8 of BasicApi


Ignore:
Timestamp:
Jun 11, 2007, 10:01:38 AM (17 years ago)
Author:
Nicolas
Comment:

Clarified explanation for Credit reporting functions. Fixed example for resolving filenames (was using the wrong function name). Some other minor changes.

Legend:

Unmodified
Added
Removed
Modified
  • BasicApi

    v7 v8  
    5151{{{
    5252string resolved_name;
    53 retval = boinc_resolve_filename("my_file", resolved_name);
     53retval = boinc_resolve_filename_s("my_file", resolved_name);
    5454if (retval) fail("can't resolve filename");
    5555f = fopen(resolved_name.c_str(), "r");
     
    122122}}}
    123123
    124 This reports the results of an application-specific benchmark, expressed as number of floating-point and integer operations per CPU second.
     124This lets the application report to the core client the results of an application-specific benchmark, expressed as number of floating-point and integer operations per CPU second.
    125125
    126126{{{
     
    128128}}}
    129129
    130 This reports the total number of floating-point and/or integer operations since the start of the result.
    131 If floating_point_ops is nonzero, it's used to compute credit and integer_ops is ignored.
     130This lets the application report to the core client the total number of floating-point and/or integer operations since the start of the result. If `floating_point_ops` is nonzero, it's used to compute credit and integer_ops is ignored.
    132131`boinc_ops_cumulative()` may be called multiple times, but only the last call makes any difference.
    133132
     
    140139}}}
    141140
    142 The `fraction_done` argument is an estimate of the workunit fraction complete (0 to 1). This function is fast and can be called frequently. The sequence of arguments in successive calls should be non-decreasing. An application should never 'reset' and start over if an error occurs; it should exit with an error code.
     141The `fraction_done` argument is an estimate of the workunit fraction complete (from 0 to 1). This function is fast and can be called frequently. The sequence of arguments in successive calls should be non-decreasing. An application should never 'reset' and start over if an error occurs; it should exit with an error code.
    143142
    144143{{{
     
    236235== Requesting network connection ==
    237236
    238 If your application needs to do network communication and it appears that there is no physical network connection (e.g. gethostbyname() fails for a valid name) then:
    239 
    240     * Call `boinc_need_network()`. This will alert the user that a network connection is needed.
    241     * Periodically call boinc_network_poll() until it returns zero.
    242     * Do whatever communication is needed.
    243     * When done, call `boinc_network_done()`. This enables that hangup of a modem connection, if needed.
     237If your application needs to do network communication and it appears that there is no physical network connection (e.g. `gethostbyname()` fails for a valid name) then:
     238
     239  * Call `boinc_need_network()`. This will alert the user that a network connection is needed.
     240  * Periodically call `boinc_network_poll()` until it returns zero.
     241  * Do whatever communication is needed.
     242  * When done, call `boinc_network_done()`. This enables that hangup of a modem connection, if needed.
    244243
    245244{{{