Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
2544c8b0
Commit
2544c8b0
authored
Feb 19, 2016
by
Andreas Schmidt
Browse files
Improve project structure.
parent
c86c02b2
Changes
29
Show whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2544c8b0
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
defines.h
→
src/
defines.h
View file @
2544c8b0
File moved
prrt/CMakeLists.txt
→
src/
prrt/CMakeLists.txt
View file @
2544c8b0
File moved
prrt/block.c
→
src/
prrt/block.c
View file @
2544c8b0
#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
)
{
...
...
prrt/block.h
→
src/
prrt/block.h
View file @
2544c8b0
#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
;
...
...
prrt/coding_params.c
→
src/
prrt/coding_params.c
View file @
2544c8b0
#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
);
...
...
prrt/coding_params.h
→
src/
prrt/coding_params.h
View file @
2544c8b0
File moved
prrt/packet.c
→
src/
prrt/packet.c
View file @
2544c8b0
...
...
@@ -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
);
...
...
prrt/packet.h
→
src/
prrt/packet.h
View file @
2544c8b0
...
...
@@ -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
...
...
prrt/processes/data_receiver.c
→
src/
prrt/processes/data_receiver.c
View file @
2544c8b0
#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
)
{
...
...
prrt/processes/data_receiver.h
→
src/
prrt/processes/data_receiver.h
View file @
2544c8b0
File moved
prrt/processes/data_transmitter.c
→
src/
prrt/processes/data_transmitter.c
View file @
2544c8b0
#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"
...
...
prrt/processes/data_transmitter.h
→
src/
prrt/processes/data_transmitter.h
View file @
2544c8b0
File moved
prrt/processes/feedback_receiver.c
→
src/
prrt/processes/feedback_receiver.c
View file @
2544c8b0
#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
)
{
...
...
prrt/processes/feedback_receiver.h
→
src/
prrt/processes/feedback_receiver.h
View file @
2544c8b0
File moved
prrt/socket.c
→
src/
prrt/socket.c
View file @
2544c8b0
...
...
@@ -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
)
{
...
...
prrt/socket.h
→
src/
prrt/socket.h
View file @
2544c8b0
#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
;
...
...
prrt/stores/forward_packet_table.c
→
src/
prrt/stores/forward_packet_table.c
View file @
2544c8b0
#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
)
{
...
...
prrt/stores/forward_packet_table.h
→
src/
prrt/stores/forward_packet_table.h
View file @
2544c8b0
File moved
prrt/vdmcode/block_code.c
→
src/
prrt/vdmcode/block_code.c
View file @
2544c8b0
File moved
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment