Esempio n. 1
0
File: io.cpp Progetto: dschult/sogen
/* read_pipe reads the maximum score and the received score from the given pipe
	parameters:
		fd: the file descriptor of the pipe to write to
		max_score: a pointer to store the maximum score the simulation could have received
		score: a pointer to store the score the simulation actually received
	returns: nothing
	notes:
	todo:
*/
void read_pipe (int fd, double* max_score, double* score) {
	read_pipe_int(fd, max_score);
	read_pipe_int(fd, score);
}
Esempio n. 2
0
/* read_pipe reads the maximum score and the received score from the given pipe
	parameters:
		fd: the file descriptor of the pipe to write to
		max_score: a pointer to store the maximum score the simulation could have received
		score: a pointer to store the score the simulation actually received
	returns: nothing
	notes:
	todo:
*/
void read_pipe (int fd, double** score) {
	for (int i = 0; i < ip.num_sets; i ++){
		read_pipe_int(fd, score[i]);
	}
}
Esempio n. 3
0
/* read_pipe reads the maximum score and the received score from the given pipe
	parameters:
		fd: the file descriptor of the pipe to write to
		max_score: a pointer to store the maximum score the simulation could have received
		score: a pointer to store the score the simulation actually received
	returns: nothing
	notes:
	todo:
*/
void read_pipe (int fd, int* max_score, int scores[], int num_sets) {
	read_pipe_int(fd, max_score);
	for (int i = 0; i < num_sets; i++) {
		read_pipe_int(fd, &(scores[i]));
	}
}
Esempio n. 4
0
/* read_pipe reads the maximum score and the received score from the given pipe
	parameters:
		fd: the file descriptor of the pipe to write to
		max_score: a pointer to store the maximum score the simulation could have received
		score: a pointer to store the score the simulation actually received
	returns: nothing
	notes:
	todo:
*/
void read_pipe (int fd, int* max_score, int* score) {
	read_pipe_int(fd, max_score);
	read_pipe_int(fd, score);
}