Converts a UDP Stream To a HTTP Server to Json
This project a simple python server that receives a UDP stream and converts it to Json using a HTTP server. The main usage of this is to use with IoT and high level systems like Unity.
- Python 2.7 or 3.5
- httpsrv
- argparse
- PySerial
We use pip to install our libraries, but you can use easy_install instead.
pip install httpsrv
pip install argparse
pip install pyserial
The command line output with -h is:
JSON Protocol Converter
positional arguments:
host UDP data stream hostname or IP (default: localhost)
optional arguments:
-h, --help show this help message and exit
-p P UDP data stream Server Port (default: 14654)
-ph PH HTTP JSON Server Port (default: 8000)
-l L Log (default: True)
-s S Serial Enable (default: True)
-cp CP Serial (default: COM3)
-b B Serial Baudrate (default: 9300)
-t Run Test Server
-nt
A simple command line for test is: python server.py localhost -p 14654 -ph 8000 -t
To receive the HTTP data you must request htttp://localhost:8000/.
The project has a DataLoader for Unity You just need to attach the script with a GameObject and update the URL parameter and the pooling interval. Also, the Wrapper has a OnUpdate event.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We are using SourceTree or GitHub desktop
- Rodrigo Marques - rodrigomas
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- None Yet