diff --git a/README.md b/README.md deleted file mode 100644 index 581b07c..0000000 --- a/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# BachelorThesis - -## About -This repository contains source codes for client-server network application capable to communicate with distance laser sensor DLS-C 15 via RS-232 interface, which was implemented as a part of bachelor thesis. - -## Author -Author: Jozef Simko - -School year: 3., Bachelor study, 2021/22 - -Study program: Computer Networks - -Organization: Technical University of Kosice (TUKE), Faculty of Electrical Engineering and Informatics (FEI) - -## Building -Implemented and tested on: -| Platform | OS | compiler | -|-----------------|---------------------------|-------------------------------------------------| -| Linux | Ubuntu 20.04.1 WLS2 | gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) | -| Windows | Windows 10.0.19043 | gcc version 11.2.0 (MinGW-W64 x86_64-posix-seh) | -| Raspberry Pi | Linux raspberrypi 5.10.17 | gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1) | - -#### LINUX -* CLIENT - - `gcc client.c -Wall -Werror -Wextra -o client` -* SERVER - - `gcc server.c rs232.c -Wall -Werror -Wextra -o server` -#### WINDOWS -* CLIENT - - `gcc client.c -Wall -Wextra -lwsock32 -o client` -* SERVER - - `gcc server.c rs232.c -lwsock32 -Wall -Werror -Wextra -o server` - -## Launch -### Server -Server can be launched with 1 or 2 input parameters. The number of parameters determines what mode will be used - manual or automatic mode. - -**port** - specific number to identify communication processes of server - -**[config_file]** - configuration file with exact name of variables - -#### Manual mode -- server waits for input commands from client, sends them to laser sensor and returns results back to client - - `./server ` - -#### Automatic mode -- server loads variables from configuration file *config.txt*, starts measuring and sends results to client continuously. - - `./server [config_file]` - -### Client -Client has to be lauched with 2 input parameters. - -**IP address** - IP address of server the client tries to connect - -**port** - port number of server -- `./client ` - -### Demo -No input parameters. - -Macros defines multiple variables used in demo program, which demonstrates connection to server in automatic mode and process of resulting data. - -```c -#define IP_ADDRESS "192.168.0.101" // IP address of server -#define PORT 32500 // server port number -#define MAX_VALUE 1265 // upper limit (depends on used units) -#define MIN_VALUE 1200 // lower limit (depends on used units) -``` - -## References -[WinLibs GCC](https://winlibs.com) - -[RS-232 library](https://www.teuniz.net/RS-232/) diff --git a/appendixes/appendixB - Records of measure distance of moving object.txt b/appendixes/appendixB - Records of measure distance of moving object.txt new file mode 100644 index 0000000..a96c102 --- /dev/null +++ b/appendixes/appendixB - Records of measure distance of moving object.txt @@ -0,0 +1,38 @@ +17/05/2022 - 19:47:35: 4.84 +17/05/2022 - 19:47:36: 4.80 +17/05/2022 - 19:47:37: 4.30 +17/05/2022 - 19:47:38: 3.63 +17/05/2022 - 19:47:39: 2.93 +17/05/2022 - 19:47:40: 2.22 +17/05/2022 - 19:47:41: 1.50 +17/05/2022 - 19:47:42: 0.74 +17/05/2022 - 19:47:43: 0.34 +17/05/2022 - 19:47:44: 0.25 +17/05/2022 - 19:47:45: 0.29 +17/05/2022 - 19:47:46: 0.61 +17/05/2022 - 19:47:48: 1.90 +17/05/2022 - 19:47:49: 2.63 +17/05/2022 - 19:47:50: 3.35 +17/05/2022 - 19:47:51: 4.14 +17/05/2022 - 19:47:52: 4.72 +17/05/2022 - 19:47:53: 4.85 +17/05/2022 - 19:47:54: 4.85 + +17/05/2022 - 19:48:05: 4.83 +17/05/2022 - 19:48:06: 4.84 +17/05/2022 - 19:48:07: 4.29 +17/05/2022 - 19:48:08: 3.59 +17/05/2022 - 19:48:09: 2.76 +17/05/2022 - 19:48:10: 2.03 +17/05/2022 - 19:48:11: 1.35 +17/05/2022 - 19:48:12: 0.72 +17/05/2022 - 19:48:13: 0.23 +17/05/2022 - 19:48:14: 0.59 +17/05/2022 - 19:48:15: 1.17 +17/05/2022 - 19:48:16: 1.77 +17/05/2022 - 19:48:17: 2.36 +17/05/2022 - 19:48:18: 3.01 +17/05/2022 - 19:48:19: 3.66 +17/05/2022 - 19:48:20: 4.30 +17/05/2022 - 19:48:21: 4.82 +17/05/2022 - 19:48:22: 4.85 \ No newline at end of file diff --git a/appendixes/appendixC - Records of maximum possible measured distance.txt b/appendixes/appendixC - Records of maximum possible measured distance.txt new file mode 100644 index 0000000..db7826e --- /dev/null +++ b/appendixes/appendixC - Records of maximum possible measured distance.txt @@ -0,0 +1,206 @@ +16/05/2022 - 23:26:00: sNg +16/05/2022 - 23:26:10: g1g+01082529 + +16/05/2022 - 23:26:16: sNg +16/05/2022 - 23:26:26: g1g+01119076 + +16/05/2022 - 23:26:45: sNg +16/05/2022 - 23:26:55: g1@E254 + +16/05/2022 - 23:27:03: sNg +16/05/2022 - 23:27:13: g1g+01116685 + +16/05/2022 - 23:27:48: sNg +16/05/2022 - 23:27:58: g1@E254 + +16/05/2022 - 23:28:16: sNg +16/05/2022 - 23:28:26: g1g+01124158 + +16/05/2022 - 23:28:37: sNg +16/05/2022 - 23:28:47: g1g+01151296 + +16/05/2022 - 23:29:57: sNg +16/05/2022 - 23:30:07: g1g+00261448 + +16/05/2022 - 23:30:07: sNg +16/05/2022 - 23:30:17: g1g+01104322 + +16/05/2022 - 23:31:30: sNg +16/05/2022 - 23:31:40: g1g+01098057 + +16/05/2022 - 23:31:44: sNg +16/05/2022 - 23:31:54: g1g+01110172 + +16/05/2022 - 23:38:52: sNg +16/05/2022 - 23:39:02: g1@E254 + +16/05/2022 - 23:41:42: sNg +16/05/2022 - 23:41:52: g1g+01121986 + +16/05/2022 - 23:46:57: sNg +16/05/2022 - 23:47:07: g1g+01113165 + +16/05/2022 - 23:48:10: sNg +16/05/2022 - 23:48:20: g1g+01129531 + +16/05/2022 - 23:26:24: sNg +16/05/2022 - 23:48:34: g1@E255 + +16/05/2022 - 23:48:58: sNg +16/05/2022 - 23:49:08: g1g+01116728 + +16/05/2022 - 23:49:24: sNg +16/05/2022 - 23:49:34: g1g+01133138 + +16/05/2022 - 23:50:06: sNg +16/05/2022 - 23:50:16: g1@E255 + +16/05/2022 - 23:50:46: sNg +16/05/2022 - 23:50:56: g1@E254 + +16/05/2022 - 23:51:02: sNg +16/05/2022 - 23:51:12: g1g+01058202 + +16/05/2022 - 23:51:55: sNg +16/05/2022 - 23:52:05: g1@E254 + +16/05/2022 - 23:52:25: sNg +16/05/2022 - 23:52:35: g1g+01133108 + +16/05/2022 - 23:55:47: sNg +16/05/2022 - 23:55:57: g1@E255 + +16/05/2022 - 23:56:04: sNg +16/05/2022 - 23:56:14: g1@E255 + +16/05/2022 - 23:56:41: sNg +16/05/2022 - 23:56:51: g1g+01172269 + +16/05/2022 - 23:57:33: sNg +16/05/2022 - 23:57:43: g1@E255 + +16/05/2022 - 23:58:05: sNg +16/05/2022 - 23:58:15: g1g+01054700 + +16/05/2022 - 23:58:29: sNg +16/05/2022 - 23:58:39: g1@E255 + +16/05/2022 - 23:58:47: sNg +16/05/2022 - 23:58:57: g1@E254 + +16/05/2022 - 23:59:11: sNg +16/05/2022 - 23:59:21: g1@E254 + +16/05/2022 - 23:59:29: sNg +16/05/2022 - 23:59:39: g1@E255 + +17/05/2022 - 00:00:00: sNg +17/05/2022 - 00:00:10: g1g+01068676 + +17/05/2022 - 00:00:22: sNg +17/05/2022 - 00:00:32: g1@E255 + +17/05/2022 - 00:00:44: sNg +17/05/2022 - 00:00:54: g1g+01125778 + +17/05/2022 - 11:19:19: sNg +17/05/2022 - 11:19:29: g1g+00019814 + +17/05/2022 - 11:19:57: sNg +17/05/2022 - 11:20:07: g1g+00034287 + +17/05/2022 - 11:20:51: sNg +17/05/2022 - 11:21:01: g1g+00038064 + +17/05/2022 - 11:21:32: sNg +17/05/2022 - 11:21:42: g1@E254 + +17/05/2022 - 11:22:00: sNg +17/05/2022 - 11:22:10: g1@E254 + +17/05/2022 - 11:22:35: sNg +17/05/2022 - 11:22:45: g1@E254 + +17/05/2022 - 11:22:59: sNg +17/05/2022 - 11:23:09: g1g+00035978 + +17/05/2022 - 11:23:33: sNg +17/05/2022 - 11:23:43: g1g+00037551 + +17/05/2022 - 11:24:09: sNg +17/05/2022 - 11:24:19: g1g+00100656 + +17/05/2022 - 11:25:11: sNg +17/05/2022 - 11:25:21: g1g+00112629 + +17/05/2022 - 11:25:34: sNg +17/05/2022 - 11:25:45: g1g+00122649 + +17/05/2022 - 11:26:04: sNg +17/05/2022 - 11:26:14: g1@E254 + +17/05/2022 - 15:25:42: sNg +17/05/2022 - 15:25:52: g1g+00041054 + +17/05/2022 - 15:26:18: sNg +17/05/2022 - 15:26:28: g1@E254 + +17/05/2022 - 15:26:45: sNg +17/05/2022 - 15:26:55: g1g+00035810 + +17/05/2022 - 15:27:10: sNg +17/05/2022 - 15:27:20: g1g+00042493 + +17/05/2022 - 15:27:38: sNg +17/05/2022 - 15:27:48: g1g+00112126 + +17/05/2022 - 15:28:07: sNg +17/05/2022 - 15:28:17: g1g+00122089 + +17/05/2022 - 15:28:33: sNg +17/05/2022 - 15:28:43: g1@E254 + +17/05/2022 - 15:33:09: sNg +17/05/2022 - 15:33:19: g1g+00111804 + +17/05/2022 - 15:33:35: sNg +17/05/2022 - 15:33:45: g1g+00122032 + +17/05/2022 - 15:34:01: sNg +17/05/2022 - 15:34:11: g1@E254 + +17/05/2022 - 15:34:30: sNg +17/05/2022 - 15:34:40: g1@E260 + +17/05/2022 - 15:35:22: sNg +17/05/2022 - 15:35:32: g1@E254 + +17/05/2022 - 15:36:12: sNg +17/05/2022 - 15:36:22: g1g+00050831 + +17/05/2022 - 15:37:21: sNg +17/05/2022 - 15:37:31: g1@E260 + +17/05/2022 - 15:37:34: sNg +17/05/2022 - 15:37:44: g1@E260 + +17/05/2022 - 15:37:54: sNg +17/05/2022 - 15:38:04: g1g+00067446 + +17/05/2022 - 15:38:28: sNg +17/05/2022 - 15:38:38: g1g+00066612 + +17/05/2022 - 15:38:54: sNg +17/05/2022 - 15:39:04: g1g+00073962 + +17/05/2022 - 15:39:38: sNg +17/05/2022 - 15:39:48: g1g+00102266 + +17/05/2022 - 15:40:02: sNg +17/05/2022 - 15:40:12: g1@E254 + +17/05/2022 - 15:40:25: sNg +17/05/2022 - 15:40:35: g1@E254 + +17/05/2022 - 15:40:47: sNg +17/05/2022 - 15:40:57: g1@E254 diff --git a/autostart.sh b/autostart.sh index 4cdda66..1e12648 100644 --- a/autostart.sh +++ b/autostart.sh @@ -1,7 +1,7 @@ #!/bin/bash PORT=32500 -server_path="/home/pi/Desktop/TestBP/server" -cfg_path="/home/pi/Desktop/TestBP/config.txt" +server_path="/home/pi/Desktop/BachelorThesis/server" +cfg_path="/home/pi/Desktop/BachelorThesis/config.txt" $server_path $PORT $cfg_path