Commit 2544c8b0 authored by Andreas Schmidt's avatar Andreas Schmidt

Improve project structure.

parent c86c02b2
cmake_minimum_required (VERSION 2.8.11)
project (PRRT)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
enable_testing()
......@@ -11,11 +11,11 @@ find_package (Threads)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(prrt)
add_subdirectory(util)
add_subdirectory(src/prrt)
add_subdirectory(src/util)
add_subdirectory(tests)
add_executable(sender sender.c)
add_executable(receiver receiver.c)
add_executable(sender src/sender.c)
add_executable(receiver src/receiver.c)
target_link_libraries(sender LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(receiver LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT})
\ No newline at end of file
#include <string.h>
#include <defines.h>
#include <prrt/vdmcode/block_code.h>
#include <src/defines.h>
#include <src/prrt/vdmcode/block_code.h>
#include <stdlib.h>
#include <src/util/list.h>
#include "block.h"
void clear_list(gf *const *src, uint8_t k) {
......
#ifndef PRRT_BLOCK_H
#define PRRT_BLOCK_H
#include <prrt/coding_params.h>
#include <prrt/packet.h>
#include <util/list.h>
#include <src/prrt/coding_params.h>
#include <src/prrt/packet.h>
#include <src/util/list.h>
typedef struct {
uint32_t data_count;
......
#include <defines.h>
#include <prrt/coding_params.h>
#include <src/defines.h>
#include <src/prrt/coding_params.h>
void PrrtCodingParams_init(PrrtCodingParams *cpar) {
pthread_mutex_init(&cpar->lock, NULL);
......
......@@ -3,8 +3,8 @@
#include <sys/time.h>
#include <string.h>
#include <netinet/in.h>
#include <prrt/packet.h>
#include <util/dbg.h>
#include <src/util/dbg.h>
#include "packet.h"
void *encode_general_header(void *buf_ptr, const PrrtPacket *packet);
......
......@@ -2,7 +2,7 @@
#define PRRT_FRAME_H
#include <stdint.h>
#include <prrt/coding_params.h>
#include <src/prrt/coding_params.h>
#define PACKET_TYPE_DATA 0
#define PACKET_TYPE_REPETITION 1
......
#include <defines.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netdb.h>
#include <util/dbg.h>
#include <prrt/socket.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <src/defines.h>
#include <src/util/dbg.h>
#include <src/prrt/socket.h>
#include "data_receiver.h"
int send_feedback(const PrrtSocket *sock_ptr, const char *remote_host, const int remote_port) {
......
#include <stdio.h>
#include <netdb.h>
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include <netdb.h>
#include <prrt/socket.h>
#include <prrt/block.h>
#include <defines.h>
#include <stdio.h>
#include <src/defines.h>
#include <src/prrt/socket.h>
#include <src/prrt/block.h>
#include "data_transmitter.h"
......
#include <string.h>
#include <unistd.h>
#include <defines.h>
#include <prrt/packet.h>
#include <prrt/socket.h>
#include <src/defines.h>
#include <src/prrt/packet.h>
#include <src/prrt/socket.h>
#include "feedback_receiver.h"
void *receive_feedback_loop(void *ptr) {
......
......@@ -4,13 +4,13 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <defines.h>
#include <prrt/packet.h>
#include <prrt/socket.h>
#include <prrt/processes/feedback_receiver.h>
#include <prrt/processes/data_transmitter.h>
#include <prrt/processes/data_receiver.h>
#include <util/dbg.h>
#include <src/defines.h>
#include <src/prrt/packet.h>
#include <src/prrt/socket.h>
#include <src/prrt/processes/feedback_receiver.h>
#include <src/prrt/processes/data_transmitter.h>
#include <src/prrt/processes/data_receiver.h>
#include <src/util/dbg.h>
int PrrtSocket_create(PrrtSocket *sock_ptr, const uint16_t port, const uint8_t is_sender) {
......
#ifndef PRRT_SOCKET_H
#define PRRT_SOCKET_H
#include <defines.h>
#include <util/list.h>
#include <prrt/packet.h>
#include <prrt/stores/forward_packet_table.h>
#include <src/defines.h>
#include <src/util/list.h>
#include <src/prrt/packet.h>
#include <src/prrt/stores/forward_packet_table.h>
typedef struct {
const char* host_name;
......
#include <stdint.h>
#include <string.h>
#include <defines.h>
#include <prrt/packet.h>
#include <src/defines.h>
#include <src/prrt/packet.h>
#include "forward_packet_table.h"
void move_start(PrrtForwardPacketTable *fpt_ptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment