mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3834
This commit is contained in:
parent
61ee3dea57
commit
ec680380e9
|
@ -14910,9 +14910,9 @@ Daniel 2004-07-08
|
|||
|
||||
Brian 8 July 2004
|
||||
- Fixed a small bug in allowed_disk_usage where the
|
||||
global_prefs.disk_max_used_pct was directly multiplied with the total
|
||||
disk, creating a disk value that was a factor of 100 off, effectively
|
||||
never becoming the min value returned by the function.
|
||||
global_prefs.disk_max_used_pct was directly multiplied
|
||||
by the total disk, creating a disk value that was a factor of 100 off,
|
||||
effectively never becoming the min value returned by the function.
|
||||
|
||||
client/
|
||||
cs_prefs.C
|
||||
|
@ -14963,3 +14963,13 @@ Daniel 2004-07-09
|
|||
client/
|
||||
app.C
|
||||
|
||||
David 9 July 2004
|
||||
- Implemented GUI RPCs for
|
||||
- showing graphics (one result or all, window or fullscreen)
|
||||
- project reset, attach, detach
|
||||
- Added cmdline options to gui_test to exercise the above
|
||||
|
||||
client/
|
||||
gui_rpc_client.C,h
|
||||
gui_rpc_server.C
|
||||
gui_test.C
|
||||
|
|
|
@ -98,7 +98,7 @@ int RPC_CLIENT::get_reply(char*& mbuf) {
|
|||
int RPC_CLIENT::get_state() {
|
||||
char buf[256];
|
||||
PROJECT* project;
|
||||
char* mbuf;
|
||||
char* mbuf=0;
|
||||
|
||||
send_request("<get_state/>\n");
|
||||
get_reply(mbuf);
|
||||
|
@ -165,29 +165,90 @@ int RPC_CLIENT::get_state() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int RPC_CLIENT::result_show_graphics(RESULT& result) {
|
||||
int RPC_CLIENT::show_graphics(char* result_name, bool full_screen) {
|
||||
char buf[256];
|
||||
char* mbuf=0;
|
||||
if (result_name) {
|
||||
sprintf(buf, "<result_show_graphics>\n"
|
||||
"<result_name>%s</result_name>\n"
|
||||
"%s"
|
||||
"</result_show_graphics>\n",
|
||||
result_name,
|
||||
full_screen?"<full_screen/>\n":""
|
||||
);
|
||||
} else {
|
||||
strcpy(buf, "<result_show_graphics>\n</result_show_graphics>\n");
|
||||
}
|
||||
send_request(buf);
|
||||
get_reply(mbuf);
|
||||
if (mbuf) free(mbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RPC_CLIENT::project_reset(PROJECT& project) {
|
||||
int RPC_CLIENT::project_reset(char* url) {
|
||||
char buf[256];
|
||||
char* mbuf=0;
|
||||
sprintf(buf,
|
||||
"<project_reset>\n"
|
||||
" <project_url>%s</project_url>\n"
|
||||
"</project_reset>\n",
|
||||
url
|
||||
);
|
||||
send_request(buf);
|
||||
get_reply(mbuf);
|
||||
if (mbuf) free(mbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RPC_CLIENT::project_attach(char* url, char* auth) {
|
||||
char buf[256];
|
||||
char* mbuf=0;
|
||||
sprintf(buf,
|
||||
"<project_attach>\n"
|
||||
" <project_url>%s</project_url>\n"
|
||||
" <authenticator>%s</authenticator>\n"
|
||||
"</project_attach>\n",
|
||||
url, auth
|
||||
);
|
||||
send_request(buf);
|
||||
get_reply(mbuf);
|
||||
if (mbuf) free(mbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RPC_CLIENT::project_detach(PROJECT&) {
|
||||
int RPC_CLIENT::project_detach(char* url) {
|
||||
char buf[256];
|
||||
char* mbuf=0;
|
||||
sprintf(buf,
|
||||
"<project_detach>\n"
|
||||
" <project_url>%s</project_url>\n"
|
||||
"</project_detach>\n",
|
||||
url
|
||||
);
|
||||
send_request(buf);
|
||||
get_reply(mbuf);
|
||||
if (mbuf) free(mbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RPC_CLIENT::project_update(PROJECT&) {
|
||||
int RPC_CLIENT::project_update(char* url) {
|
||||
char buf[256];
|
||||
char* mbuf=0;
|
||||
sprintf(buf,
|
||||
"<project_update>\n"
|
||||
" <project_url>%s</project_url>\n"
|
||||
"</project_update>\n",
|
||||
url
|
||||
);
|
||||
send_request(buf);
|
||||
get_reply(mbuf);
|
||||
if (mbuf) free(mbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RPC_CLIENT::set_run_mode(int mode) {
|
||||
char *p, buf[256];
|
||||
char* mbuf;
|
||||
char* mbuf=0;
|
||||
switch (mode) {
|
||||
case RUN_MODE_ALWAYS: p="<always/>"; break;
|
||||
case RUN_MODE_NEVER: p="<never/>"; break;
|
||||
|
@ -250,7 +311,7 @@ int RPC_CLIENT::get_messages(
|
|||
return 0;
|
||||
}
|
||||
|
||||
void RPC_CLIENT::print() {
|
||||
void RPC_CLIENT::print_state() {
|
||||
unsigned int i;
|
||||
|
||||
printf("======== Projects ========\n");
|
||||
|
|
|
@ -185,15 +185,15 @@ public:
|
|||
~RPC_CLIENT();
|
||||
int init();
|
||||
int get_state();
|
||||
int result_show_graphics(RESULT&);
|
||||
int project_reset(PROJECT&);
|
||||
int show_graphics(char* result_name, bool full_screen);
|
||||
int project_reset(char*);
|
||||
int project_attach(char* url, char* auth);
|
||||
int project_detach(PROJECT&);
|
||||
int project_update(PROJECT&);
|
||||
int project_detach(char*);
|
||||
int project_update(char*);
|
||||
int set_run_mode(int mode);
|
||||
int run_benchmarks();
|
||||
int set_proxy_settings(PROXY_INFO&);
|
||||
int get_messages(int nmessages, int seqno, std::vector<MESSAGE_DESC>&);
|
||||
void print();
|
||||
void print_state();
|
||||
};
|
||||
|
||||
|
|
|
@ -71,24 +71,34 @@ static PROJECT* get_project(char* buf, MIOFILE& fout) {
|
|||
|
||||
static void handle_result_show_graphics(char* buf, MIOFILE& fout) {
|
||||
string result_name;
|
||||
ACTIVE_TASK* atp;
|
||||
|
||||
PROJECT* p = get_project(buf, fout);
|
||||
if (!p) return;
|
||||
|
||||
if (!parse_str(buf, "<result_name>", result_name)) {
|
||||
fout.printf("<error>Missing result name</error>\n");
|
||||
return;
|
||||
}
|
||||
RESULT* rp = gstate.lookup_result(p, result_name.c_str());
|
||||
if (!rp) {
|
||||
fout.printf("<error>No such result</error>\n");
|
||||
return;
|
||||
}
|
||||
ACTIVE_TASK* atp = gstate.lookup_active_task_by_result(rp);
|
||||
if (!atp) {
|
||||
fout.printf("<error>Result not active</error>\n");
|
||||
return;
|
||||
}
|
||||
atp->request_graphics_mode(MODE_WINDOW);
|
||||
if (parse_str(buf, "<result_name>", result_name)) {
|
||||
RESULT* rp = gstate.lookup_result(p, result_name.c_str());
|
||||
if (!rp) {
|
||||
fout.printf("<error>No such result</error>\n");
|
||||
return;
|
||||
}
|
||||
atp = gstate.lookup_active_task_by_result(rp);
|
||||
if (!atp || atp->scheduler_state != CPU_SCHED_RUNNING) {
|
||||
fout.printf("<error>Result not active</error>\n");
|
||||
return;
|
||||
}
|
||||
if (match_tag(buf, "<full_screen/>")) {
|
||||
atp->request_graphics_mode(MODE_FULLSCREEN);
|
||||
} else {
|
||||
atp->request_graphics_mode(MODE_WINDOW);
|
||||
}
|
||||
} else {
|
||||
for (unsigned int i=0; i<gstate.active_tasks.active_tasks.size(); i++) {
|
||||
atp = gstate.active_tasks.active_tasks[i];
|
||||
if (atp->scheduler_state != CPU_SCHED_RUNNING) continue;
|
||||
atp->request_graphics_mode(MODE_WINDOW);
|
||||
}
|
||||
}
|
||||
fout.printf("<success/>\n");
|
||||
}
|
||||
|
||||
|
@ -103,7 +113,7 @@ static void handle_project_reset(char* buf, MIOFILE& fout) {
|
|||
|
||||
static void handle_project_attach(char* buf, MIOFILE& fout) {
|
||||
string url, authenticator;
|
||||
if (!parse_str(buf, "<url>", url)) {
|
||||
if (!parse_str(buf, "<project_url>", url)) {
|
||||
fout.printf("<error>Missing URL</error>\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,13 @@
|
|||
//
|
||||
|
||||
// gui_test: test program for BOINC GUI RPCs.
|
||||
// Does a single RPC and shows results
|
||||
// usages:
|
||||
// -state show state
|
||||
// -msgs show messages
|
||||
// -show_graphics_window result_name show graphics for result in a window
|
||||
// -show_graphics_window show graphics for all results
|
||||
// -show_graphics_full result_name show full-screen graphics for result
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
|
@ -72,7 +78,8 @@ int main(int argc, char** argv) {
|
|||
|
||||
if (!strcmp(argv[1], "-state")) {
|
||||
rpc.get_state();
|
||||
rpc.print();
|
||||
rpc.print_state();
|
||||
} else if (!strcmp(argv[1], "-msgs")) {
|
||||
rpc.get_messages(20, 0, message_descs);
|
||||
for (i=0; i<message_descs.size(); i++) {
|
||||
MESSAGE_DESC& md = message_descs[i];
|
||||
|
@ -84,6 +91,14 @@ int main(int argc, char** argv) {
|
|||
rpc.set_run_mode(RUN_MODE_NEVER);
|
||||
} else if (!strcmp(argv[1], "-resume")) {
|
||||
rpc.set_run_mode(RUN_MODE_ALWAYS);
|
||||
} else if (!strcmp(argv[1], "-show_graphics_window")) {
|
||||
if (argc == 3) {
|
||||
rpc.show_graphics(argv[2], false);
|
||||
} else {
|
||||
rpc.show_graphics(0, false);
|
||||
}
|
||||
} else if (!strcmp(argv[1], "-show_graphics_full")) {
|
||||
rpc.show_graphics(argv[2], true);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -64,7 +64,11 @@ and from several BOINC-based projects:
|
|||
<li> BOINC beta test: http://setiboinc.ssl.berkeley.edu/ap/rss_main.php
|
||||
</ul>
|
||||
<h2>Other</h2>
|
||||
For other information, contact Dr. David P. Anderson,
|
||||
A good summary of distributed computing projects,
|
||||
including those based on BOINC, is at
|
||||
<a href=http://www.aspenleaf.com/distributed/>www.aspenleaf.com</a>.
|
||||
<p>
|
||||
For inquiries about BOINC, contact Dr. David P. Anderson,
|
||||
the director of the BOINC project, at davea at ssl.berkeley.edu.
|
||||
If you have problems with the BOINC software for Windows please email
|
||||
Rom Walton: rwalton at ssl.berkeley.edu.
|
||||
|
|
|
@ -66,13 +66,11 @@ through award SCI/0221529.
|
|||
<h2>Status</h2>
|
||||
</center>
|
||||
<p>
|
||||
BOINC is under development.
|
||||
We are conducting a
|
||||
<a href=http://setiboinc.ssl.berkeley.edu/ap/>beta test of BOINC</a>
|
||||
using the <a href=http://setiathome.berkeley.edu>SETI@home</a> and
|
||||
Astropulse applications.
|
||||
The public release will be announced on the SETI@home web site.
|
||||
Several other distributed computing projects are evaluating BOINC.
|
||||
BOINC is being used by
|
||||
<a href=http://setiweb.ssl.berkeley.edu/>SETI@home</a>
|
||||
and <a href=http://predictor.scripps.edu>Predictor@home</a>.
|
||||
Other distributed computing projects based on BOINC
|
||||
will be launched soon.
|
||||
|
||||
<center>
|
||||
<h2>News</h2>
|
||||
|
|
|
@ -83,6 +83,11 @@ show_link(
|
|||
"translation by Komori Hitoshi",
|
||||
"http://boinc.oocp.org/"
|
||||
);
|
||||
show_link(
|
||||
"Polish",
|
||||
"www.boinc.pl",
|
||||
"http://www.boinc.pl"
|
||||
);
|
||||
show_link(
|
||||
"Russian",
|
||||
"www.boinc.narod.ru",
|
||||
|
|
Loading…
Reference in New Issue