update
This commit is contained in:
parent
3fc37a23b7
commit
ba6bc69c40
29
README.md
29
README.md
@ -28,28 +28,39 @@ Implemented and tested on:
|
||||
* SERVER - `gcc server.c rs232.c -lwsock32 -Wall -Werror -Wextra -o client`
|
||||
|
||||
## Launch
|
||||
#### Server
|
||||
### 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** -
|
||||
**port** - specific number to identify communication processes of server
|
||||
|
||||
**config_file** -
|
||||
**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 <port>`
|
||||
- `./server <port>`
|
||||
|
||||
* Automatic mode - server loads variables from configuration file *config.txt*, starts measuring and sends results to client continuously.
|
||||
`./server <port> [config_file]`
|
||||
- `./server <port> [config_file]`
|
||||
|
||||
#### Client
|
||||
### Client
|
||||
Client has to be lauched with 2 input parameters.
|
||||
|
||||
**IP address** -
|
||||
**IP address** - IP address of server the client tries to connect
|
||||
|
||||
**port** -
|
||||
**port** - port number of server
|
||||
|
||||
#### Demo
|
||||
### 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/)
|
||||
|
Loading…
Reference in New Issue
Block a user