Register
Submit a solution
The challenge is finished.

Challenge Overview

Our client, General Electric (GE), provides Predix (http://predix.topcoder.com/, https://www.predix.io/) - The platform for Industrial Internet of Things (IIoT), which helps to develop, deploy, and operate industrial apps at the edge and in the cloud. It securely connects machines, data, and analytics to improve operational efficiency.
GE is looking for the Topcoder community to try Predix and to create sample applications that emulate various devices inter-operating with Predix services over the network.
This C or C++ code challenge opens a series of Predix contests with the total prize pool over $10,000. We hope you will take the time to register for Predix, read about the services they provide, and configure your environment. Other challenges in this series may not be in C++, but in Java, Python, C#, or something else, though all of them will utilize the Predix account and different services available from the Predix platform.

Setup

Go to http://predix.topcoder.com/ and click the Join the Topcoder Community for Predix button. Fill out the registration form and confirm your email address. Complete the instructions you’ll receive in your community welcome email to register for your Predix developer account.
IMPORTANT: To avoid complications with registration approval, please use Topcoder as the company name in the registration form.
Eligibility: As of now, residents of the following countries are not allowed to register in Predix, hence they are not eligible to participate in this challenge: China, Cuba, Iran, North Korea, Russia, Sudan, Syria.

Challenge Scope

To emulate a simple abstract device you will write a simple C or C++ App (your choice) which will take three values from a configurational file, p, m and dt, defaulting to 0.60, 0.05 and 1.0, and do the following with them:
std::mt19937 gen;
std::uniform_real_distribution<double> dist(0.0, 1.0);
for(;;) {
    double rnd = dist(gen);
    if (rnd < p + m) send_signal_to_predix_timeseries_service(deviceUUID, timestamp, rnd, msg);
if (rnd < m) send_error_to_predix_asset_service(deviceUUID, timestamp, rnd, msg);
    std::this_thread::sleep_for(std::chrono::seconds(dt));
}

In other words, once per dt seconds it will generate a random number from 0.0 to 1.0. If the number is less than p it will send a regular message to Predix Cloud, to be tracked by Predix Time Series Service. If the number is larger than m it will also send an error message, to be logged by Predix Asset Service. The msg in the first call should be something like Sensor triggered, and in the second (error) case something like Sensor overloaded.
To make this demo app more realistic, you will extend it with auth system, using Predix User Account and Authentication Service, which will ensure that only properly setup and authorized instances of the “sensor emulator app” are able to send data to be tracked by Predix services.

Thus, to communicate with Predix Cloud you will use three services:
Time Series Service to record signals from the app.
- Asset Service to store the alerts / error messages generated by your application.
- User Account and Authentication (UAA) to authenticate your C application with Predix.



Final Submission Guidelines

Source code, along with detailed verification instructions on how to deploy and setup all components of the solution. Verification video is required.

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30057804