This application bundle will demonstrate the capability to collect records (logs) that periodically delivered from a sensor. Note that as the "Your first Kaa application" we chose Data collection demo, so it is basically the same application and they will have same demonstration flow.
In this demo application, we gather temperature measurements from some "virtual" temperature sensor with a sampling rate that defined in a configuration.
So we use two Kaa features: Log collection and Configuration. We will have two schemas:
And configuration schema
Both logging and configuration schemes are simple schemas contains only one value - the result of measurements from a sensor and the configuration schema - sampling period respectively.
The client applications will output the log messages with some sampling period into console (in case of iOS: display on the screen) and to the default log appender (provided by Kaa) that stores logs in MongoDB. The application will use trustful credentials service for simplicity. Neither EP profiling nor grouping will be used in the stock application. Rather, configuration from group "all" will be distributed by default. On startup the client application must output its Endpoint ID to the console (or screen - for iOS).
The client application will be sending log records continuously until a user stops it with some period that will be defined using configuration. Default sampling period is 1 second.
- User runs the client application.
- The client application registers with the Sandbox and outputs the Endpoint ID.
- The client application outputs current configuration.
- The client application starts to generate and send log messages with period defined in latest received configuration (default or from group "All").
- The client application prints in console log record delivery information.
- User explores the collected a by querying the sandbox MongoDB instance.
- User navigates to the endpoint group "All" in "Admin console" and change configuration thus changes sampling period.
- The client application prints message that it's configuration has been changed and prints new sampling period.
- The client application generates new log records with a new period.
- User stops the application.