Commit e07cf3e5 authored by Andreas Schmidt's avatar Andreas Schmidt

Restructure.

parent f86b8b5d
......@@ -8,8 +8,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
find_package (Threads)
add_subdirectory(prrt)
add_library(PRRT prrt/socket.c prrt/block.c prrt/block.h prrt/packet.c prrt/packet.h prrt/feedback_receiver.c prrt/feedback_receiver.h prrt/data_transmitter.c prrt/data_transmitter.h prrt/coding_params.c prrt/coding_params.h prrt/vdmcode/block_code.c prrt/vdmcode/block_code.h prrt/coding_params.c prrt/coding_params.h)
add_library(UTIL util/common.c util/common.h util/list.c util/list.h)
add_library(PRRT defines.h prrt/socket.c prrt/block.c prrt/block.h prrt/packet.c prrt/packet.h prrt/processes/feedback_receiver.c prrt/processes/feedback_receiver.h prrt/processes/data_transmitter.c prrt/processes/data_transmitter.h prrt/coding_params.c prrt/coding_params.h prrt/vdmcode/block_code.c prrt/vdmcode/block_code.h prrt/coding_params.c prrt/coding_params.h prrt/collections/in_buffer.c prrt/collections/in_buffer.h)
add_library(UTIL defines.h util/common.c util/common.h util/list.c util/list.h)
add_executable(sender sender.c)
add_executable(receiver receiver.c)
......
#include "in_buffer.h"
//
// Created by andreas on 11.02.16.
//
#ifndef PRRT_IN_BUFFER_H
#define PRRT_IN_BUFFER_H
typedef struct {
} PrrtInBuffer;
#endif //PRRT_IN_BUFFER_H
......@@ -3,8 +3,8 @@
#include <string.h>
#include <netdb.h>
#include "data_transmitter.h"
#include "socket.h"
#include "block.h"
#include "../socket.h"
#include "../block.h"
int send_packet(PrrtSocket *sock_ptr, PrrtPacket *data_pkt) {
......
#include <string.h>
#include <unistd.h>
#include "feedback_receiver.h"
#include "../defines.h"
#include "socket.h"
#include "../../defines.h"
#include "../socket.h"
void *receive_feedback_loop(void *ptr) {
char bufin[MAX_PAYLOAD_LENGTH];
......
......@@ -8,8 +8,8 @@
#include <assert.h>
#include "../defines.h"
#include "socket.h"
#include "feedback_receiver.h"
#include "data_transmitter.h"
#include "processes/feedback_receiver.h"
#include "processes/data_transmitter.h"
int PrrtSocket_create(PrrtSocket *sock_ptr, const uint16_t port, const uint8_t is_sender) {
sock_ptr->seqno_source = 1;
......
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "prrt/socket.h"
int main(int argc, char* const argv[]) {
......@@ -13,7 +12,6 @@ int main(int argc, char* const argv[]) {
uint16_t port = (uint16_t) atoi(argv[1]);
PrrtSocket sock;
PrrtPacket *pkt;
printf("PRRT - RECEIVER\n");
if(PrrtSocket_create(&sock, port, 0) < 0) {
......
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