Skip to content
Simple Qt5 data generator that streams data to Astarte
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
astarte-device-DEVICE_ID_HERE-conf Handle new pairing endpoint, add REALM env var Jul 6, 2018
interfaces
.gitlab-ci.yml
AstarteStreamQt5Test.cpp Astarte once released will have a different license Feb 11, 2019
AstarteStreamQt5Test.h
CHANGELOG.md
Dockerfile
LICENSE Astarte once released will have a different license Feb 11, 2019
README.md
docker-entrypoint.sh
main.cpp
stream-qt5-test.pro Add application code Feb 7, 2018

README.md

Astarte Stream Qt5 Test

Astarte Qt5 SDK based data stream test.

Requirements

  • Astarte Qt5 SDK and Qt5 devel tools

Getting started

Create a configuration directory using the given template (astarte-device-fbZ1F-TUpH1O7ryuLsGTzw-conf in this example) and customize it.

Build and run the application using following commands:

$ qmake .
$ make
./stream-qt5-test --device gbZ1F-TUpH1O7ryuLsGTzw --function sin --interval 100 --scale 0.0001

Choosing a Device ID

A 128 bits unique ID should be used, the following snippet could be used to generate it:

#!/usr/bin/env python3
import base64
import uuid

def generate_device_id():
    device_id_bytes = uuid.uuid4().bytes
    return base64.urlsafe_b64encode(device_id_bytes).replace(b"=", b"").decode()

print(generate_device_id())
You can’t perform that action at this time.