/* 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); }
/* 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]); } }
/* 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])); } }
/* 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); }