# Demo Replays
# Introduction
If you don't yet have our devices (opens new window), you can still try out our software and API. In this tutorial we will show you how our products work using replays. This will give you a basic understanding of how to set up our software.
# Desktop App Setup
We will need to download and install RTLOC Desktop app (opens new window). Once installed, login using your account and download the license from account view. License download instructions
After that, download 'Demo Replays'. These replays allow you to replay all the data from positioning devices as if it is happening live.
Lastly, download Engine and open it.
# Engine
Engine is the main application that collects all of the data. Using this app we can view data live, replay it, send it over the internet and more.
First, if we want to replay the data, we need to change the View Mode to Replay. Click on 'REPL' to switch to the Replay View Mode
Now we need to select a file we want to replay. Click on 'Dir' to open a window that shows all the logfiles under:
c:\cxRTLS\Replay\
If you have downloaded Demo Replays, you should see some 'DEMO_' files. Now double click on any of the files to activate it (for this example we are using 'DEMO_FOOTBALL'). When you press 'Start', the file will automatically start to play.
Then we need to make sure the engine is running:
- Click on 'Eng' to open the engine menu.
- Unselect 'Skip Engine' to activate the engine.
- Click on 'Floor' in the left side menu.
If everything is correct you should see a circle moving around on the screen. More info about the manager here.
# API setup
If you want to send the data from the Engine to our cloud server (opens new window) or any other computer there are multiple ways to do it.
# RTLOC cloud
Sending data to RTLOC cloud can be done through the Engine:
- Click on 'API' in the left side menu.
- Fill in the forms with the correct information (opens new window).
- Click 'Save'.
- Now click on the red 'MQTT' and it should change to a green color, indicating that everything is working.
Now all the data is sent to RTLOC cloud and can be viewed from there (opens new window).
# TCP_Binary connection
TCP_Binary connection allows for fast and very compact transmission over TCP/UDP. It is useful for fast data transfers to your own servers.
In this example, we will be using Python example (opens new window) code to create a connection when everything is running on our local machine. Make sure Python is installed (link (opens new window)).
WARNING
Ensure you set the right port inside the code!
- 13100 - For Live data
- 13200 - For Replay data
Since we are using replays we need to use port 13200. Example inside 'tcp_client.py':
loop = asyncio.get_event_loop()
#NOTE: use port 13100 to connect to LIVE server, use 13200 to connect to REPLAY server.
coro = loop.create_connection(lambda: ApiClient(loop), ip_addr_server, 13200)
loop.run_until_complete(coro)
loop.run_forever()
loop.close()
When everything is ready, use this in the command line (or terminal):
python3 tcp_client.py localhost //<-- or IP address of your server
Now you should see something like this:
More TCP_Binary connection examples (opens new window).
# MQTT
For MQTT data connection, please refer to this guide.