int i,count;
t_job job;
+ t_client client;
char data;
char string[MAX_CONTENT];
return -1;
}
+ display_new_line(display,input,"jobs:");
network_receive_chan(net,0,(unsigned char *)&count,sizeof(int));
for(i=0;i<count;i++) {
network_receive_chan(net,0,(unsigned char *)&job,sizeof(t_job));
job.info.diff_rate,job.info.dr_ac,job.progress);
display_new_line(display,input,string);
}
+
+ display_new_line(display,input,"clients:");
+ network_receive_chan(net,0,(unsigned char *)&count,sizeof(int));
+ for(i=0;i<count;i++) {
+ network_receive_chan(net,0,(unsigned char *)&client,sizeof(t_client));
+ if(client.status&WORK) snprintf(string,MAX_CONTENT,
+ "channel %d: client is busy",
+ client.channel);
+ else snprintf(string,MAX_CONTENT,"channel %d: client is idle",
+ client.status);
+ display_new_line(display,input,string);
+ }
display_new_line(display,input,"done");
return 1;
}
+int display_help(t_display *display,t_input *input) {
+
+ display_new_line(display,input,"h: show this help");
+ display_new_line(display,input,"i: get job/client info");
+ display_new_line(display,input,"a: add a job");
+ display_new_line(display,input," b: ballistic amorphization influence");
+ display_new_line(display,input," c: carbon induced amorphization influence");
+ display_new_line(display,input," s: stress induced amorphization influence");
+ display_new_line(display,input," d: diffusion interval");
+ display_new_line(display,input," D: diffusion rate");
+ display_new_line(display,input," S: simulation teps / dose");
+ display_new_line(display,input," C: collisions per ion");
+ display_new_line(display,input," r: stress influence range");
+ display_new_line(display,input," R: sputter rate");
+ display_new_line(display,input," x: save interval");
+ display_new_line(display,input," X: # cells in x direction");
+ display_new_line(display,input," Y: # cells in Y direction");
+ display_new_line(display,input," Z: # cells in Z direction");
+
+ return 1;
+}
+
int get_command(t_event *event,void *allineed) {
t_net *net;
/* if there was a new line! */
if(input->c_count==0) {
switch(input->content[0]) {
+ case GUI_HELP:
+ display_help(display,input);
+ break;
case GUI_INFO:
send_and_wait_for_answer(net,display,input);
break;