= Startup and status data = == Getting startup data == The following functions return startup data: {{{ #!c++ int boinc_get_init_data_p(APP_INIT_DATA*); int boinc_get_init_data(APP_INIT_DATA&); struct APP_INIT_DATA { int major_version; // client version number int minor_version; int release; int app_version; // app version number char app_name[256]; // name of this app char symstore[256]; // URL of symbol store (Windows) char acct_mgr_url[256]; // URL of account manager, if any char* project_preferences; // project preferences (XML) int hostid; // ID of this host in project DB char user_name[256]; char team_name[256]; char project_dir[256]; // absolute path of this project's directory char boinc_dir[256]; // absolute path of BOINC data directory char wu_name[256]; // name of this workunit char authenticator[256]; // user's authenticator int slot; // slot # in which we're running double user_total_credit; double user_expavg_credit; double host_total_credit; double host_expavg_credit; double resource_share_fraction; HOST_INFO host_info; // description of host hardware PROXY_INFO proxy_info; // in case app wants to use network GLOBAL_PREFS global_prefs; double starting_elapsed_time; // info about the WU double rsc_fpops_est; double rsc_fpops_bound; double rsc_memory_bound; double rsc_disk_bound; // the following are used for compound apps, // where each stage of the computation is a fixed // fraction of the total. double fraction_done_start; double fraction_done_end; }; }}} == Getting runtime system status == The status of the runtime system is represented by the following structure: {{{ typedef struct BOINC_STATUS { int no_heartbeat; int suspended; int quit_request; int reread_init_data_file; int abort_request; double working_set_size; double max_working_set_size; int network_suspended; } BOINC_STATUS; }}} '''no_heartbeat''':: no heartbeat from client; clean up and exit(0). '''suspended''':: the client has requested that we suspend ourself. '''quit_request''':: the client has requested that we exit (will restart). '''reread_init_data_file''': project preferences have changed; reread them if needed. '''abort_request''': the client has request that we abort (no restart). '''working_set_size''':: our current working-set size '''max_working_set_size''':: the amount of available RAM '''network_suspended''':: set of network activity is not currently allowed You can get the current status using {{{ void boinc_get_status(BOINC_STATUS*); }}}