Two example files are provided namely serv_main.c and client_main.c. serv_main.c uses the TRABOL server library. While client_main.c, uses the TRABOL client library. The steps for compilation of these programs and the functions called in the TRABOL server and client library is shown in this document. Using TRABOL Server Library in main program ------------------------------------------- 1. Create an object file (serv_main.o) of the main program (serv_main.c) that uses the TRABOL server library gcc -O3 -funroll-all-loops -c serv_main.c 2. Compile the main program while adding the library's name to the list of object file names given to the linker gcc serv_main.o -L. -lTRABOL_serv -lm -lpthread -lnsl -lrt -o serv_main Using TRABOL Client Library in main program ------------------------------------------- 1. Create an object file (client_main.o) of the main program (client_main.c) that uses the TRABOL client library gcc -O3 -funroll-all-loops -c client_main.c 2. Compile the main program while adding the library's name to the list of object file names given to the linker gcc client_main.o -L. -lTRABOL_client -lm -lnsl -lrt -o client_main TRABOL Server Functions ----------------------- The functions that are called by the main program (serv_main.c) from the TRABOL server should be in the following order. 1. Function to input the radar parameters the TRABOL server. void input_radar_parameters(char input_file[], int total_gates, int total_samples, int val_in_one_sample) Arguments: input_file: Input radar file total_gates : Total gates in a ray total_samples : Total samples in a ray val_in_one_sample : Values in one sample 2. Function to input the TRABOL parameters void input_TRABOL_parameters(float target_rate, float min_rate, float loss_tolerance, float data_generation_rate, int gates_to_transfer, int samples_to_transfer, int memory, char output_file[], char quality_output_file[], int port_number, int requested_packet_size, int noofsamples_in_onepkt, int no_of_sweeps, char type_of_losses[]) Arguments: target_rate: Target rate min_rate: Minimum rate loss_tolerance : Loss Tolerance Threshold data_generation_rate : Data generation rate at radar source samples_to_transfer: Number of samples to transfer to the client memory: Number of rays to transfer in memory phase output_file[]: Output file to print throughput and loss rate quality_output_file[]: File to print data for radar quality port_number: Server Port Number requested_packet_size: Packet size requested by user noofsamples_in_onepkt: Sample group (# samples in 1 packet) no_of_sweeps: Number of sweeps to send data type_of_losses: Loss Pattern (chunk / uniform) 3. Function to start the TRABOL server void start_trabol_serv() TRABOL Client Functions ----------------------- The functions that are called by the main program (client_main.c) from the TRABOL client should be in the following order. 1. Function to open the output files void open_output_file(char out_file[], char qual_out_file[]) Arguements: out_file: Output file to print throughput and loss rate qual_out_file: Output file to print data for radar quality 2. Function to start the TRABOL client void start_trabol_client(char server_ip[], int server_port) Arguements: server_ip: Server IP Address server_port: Server Port Number If you have any questions/comments, please send an email to maroo(AT)cs(dot)colostate(dot)edu