# Using Replays

# Introduction

Replays allow to

  • try out our software / APIs without devices
  • record important data to re-evaluate it at a later time

# Getting demo replays

To get some demo replays, you will need 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. Downloading Demo Replays

Lastly, download Engine and open it. App management

# Engine replay setup

RTLOC 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

replay

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.

replay_file

Then we need to make sure the engine is running:

  1. Click on 'Eng' to open the engine menu.
  2. Unselect 'Skip Engine' to activate the engine.
  3. Click on 'Floor' in the left side menu.

replay_file

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

The Engine app can send data to the Portal app as follows:

  1. Click on 'API' in the left side menu.
  2. Fill in the forms with the correct information (opens new window).
  3. Click 'Save'. replay_file
  4. Now click on the red 'MQTT' and it should change to a green color, indicating that everything is working. MQTT_button

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: replay_file

More TCP_Binary connection examples (opens new window).

# MQTT

For MQTT data connection, please refer to this guide.

# Recording replays

You can save all the data to a replay and as such analyse it at a later time. There are 2 different kinds of logging:

  • Frame logging - the logged data is already processed and filtered. All the essential information is stored in a minimal format. Use this in most cases.
  • Raw logging - all the data is logged, will consume relatively large amount of storage space. Use this only if you need extensive debug facilities.

You can start logging data at any given time. All you have to to is check the checkbox in front of Frame or Raw and the logging starts immediately. You will notice that the box around frame will turn green. This will indicate that you are actually logging. You can fill in a prefix for the generated file. log log

The logs will appear in the following directory:

c:\cxRTLS\Replay\

They are formatted as follows:

_PREFIX_DATE_TIME_FRX.ctx or PREFIX_DATE_TIME_raw.ctx

Don't worry if you enabled the logging too late. On the moment you press the checkbox, the system will immediately start logging, but will also add the data since you last disabled the logging and up till 5 minutes before the click. This makes that you never loose any valuable information.

Last Updated: 2/27/2022, 7:16:08 PM