From 4b360e36261f4c44215b1227209227c6e7e5410d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20=C5=A0imko?= Date: Thu, 26 May 2022 21:17:54 +0000 Subject: [PATCH 1/4] added appendixB/C --- ...s of measure distance of moving object.txt | 38 ++++ ... of maximum possible measured distance.txt | 206 ++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 appendixes/appendixB - Records of measure distance of moving object.txt create mode 100644 appendixes/appendixC - Records of maximum possible measured distance.txt 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 From 70dc93e44099f16e0d1e7845d16b958b605d4252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20=C5=A0imko?= Date: Thu, 26 May 2022 21:27:22 +0000 Subject: [PATCH 2/4] Update 'README.md' --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 11a96c1..9c2e336 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Server can be launched with 1 or 2 input parameters. The number of parameters de **port** - specific number to identify communication processes of server -**[config_file]** - configuration file with exact name of variables +**[config_file]** - configuration file with exact name of variables - check *config.cfg* file as example #### Manual mode - server waits for input commands from client, sends them to laser sensor and returns results back to client @@ -48,23 +48,30 @@ Server can be launched with 1 or 2 input parameters. The number of parameters de - `./server [config_file]` ### Client -Client has to be lauched with 2 input parameters. +Client has to be lauched with 2 input parameters. If server is in **manual mode**, the client always loads input commands from *commands.txt*. **IP address** - IP address of server the client tries to connect **port** - port number of server - `./client ` -### Demo +## Demo +Demo program demonstrates how to create client-like program, which can connect to server in automatic mode and process resulting data. +#### Building +UNIX - `gcc demo.c -Wall -Werror -Wextra -o demo` + +WINDOWS - `gcc demo.c -Wall -Wextra -lwsock32 -o demo` + +#### Launch No input parameters. -Macros defines multiple variables used in demo program, which demonstrates connection to server in automatic mode and process of resulting data. +Macros defines multiple variables: ```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) +#define MAX_VALUE 1265 // upper limit to compare (depends on used units) +#define MIN_VALUE 1200 // lower limit to compare (depends on used units) ``` ## References From 3106313661df607ca9cf3153eabe8dd63b0d65e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20=C5=A0imko?= Date: Thu, 26 May 2022 21:30:44 +0000 Subject: [PATCH 3/4] fixed path --- autostart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From e5bb662e58bf3a0ede89fd7622c010b452833674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20=C5=A0imko?= Date: Wed, 1 Jun 2022 17:52:57 +0000 Subject: [PATCH 4/4] mistake correction --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c2e336..188a89b 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,12 @@ Implemented and tested on: * CLIENT - `gcc client.c -Wall -Werror -Wextra -o client` * SERVER - - `gcc server.c rs232.c -Wall -Werroe -Wextra -o client` + - `gcc server.c rs232.c -Wall -Werroe -Wextra -o server` #### WINDOWS * CLIENT - `gcc client.c -Wall -Wextra -lwsock32 -o client` * SERVER - - `gcc server.c rs232.c -lwsock32 -Wall -Werror -Wextra -o client` + - `gcc server.c rs232.c -lwsock32 -Wall -Werror -Wextra -o server` ## Launch ### Server