This repository contains a Java language version of SDK for developing an Agent program capable of sending data to the Datonis Cloud Plaform.
It can be used for developing Agents on Android as well. It contains a sample program that simulates Temperature and Humidity parameters for a Living Room modeled on Datonis. You can use this as a starting point and write your own application
On your computer, execute following command:
git clone https://github.com/Altizon/datonis-edge-sdk-java.git
The agent needs to be configured first before you build the package. There are a few things that you need to do:
mvn clean install eclipse:eclipse
The above command should automatically generate classpath and project files for the sdk and examples projects.
You can simply import these two as existing projects into your eclipse workspace
cd examples
java -Dlog4j.properties=src/main/resources/log4j.properties -Ddatonis-edge.properties=src/main/resources/datonis-edge.properties -jar target/datonis-edge-examples-5.0.0-jar-with-dependencies.jar
Parameter | Description | Possible Values | Default Value |
---|---|---|---|
protocol | Protocol to use for connecting to Datonis | http, https, mqtt, mqtts | https |
bulk_transmit | Whether to batch and bulk transmit packets | true, false | true |
bulk_transmit_interval | Interval between two successive bulk requests in milliseconds | > 5000 | 60000 (1 minute) |
bulk_max_elements | Maximum number of elements to put into a bulk packet | > 10 | 25 |
concurrency | Number of concurrent requests | >= 1 | 5 |
request_timeout | Timeout for socket connection | > 60000 | 180000 (3 minutes) |
Please feel free to raise a ticket at our Support Portal