[ 
https://issues.apache.org/jira/browse/QUARKS-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15216225#comment-15216225
 ] 

ASF GitHub Bot commented on QUARKS-21:
--------------------------------------

Github user ddebrunner commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/49#discussion_r57749368
  
    --- Diff: 
test/svt/src/main/java/quarks/test/svt/apps/iotf/AbstractIotfApplication.java 
---
    @@ -0,0 +1,110 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    + */
    +package quarks.test.svt.apps.iotf;
    +
    +import quarks.connectors.iot.IotDevice;
    +import quarks.connectors.iotf.IotfDevice;
    +import java.io.PrintWriter;
    +import java.util.Random;
    +import quarks.samples.apps.AbstractApplication;
    +import quarks.samples.apps.ApplicationUtilities;
    +import quarks.samples.apps.TopologyProviderFactory;
    +import quarks.topology.Topology;
    +
    +/**
    + * An IotF Application base class.
    + * <p>
    + * Application instances need to:
    + * <ul>
    + * <li>define an implementation for {@link #buildTopology(Topology)}</li>
    + * <li>call {@link #run()} to build and submit the topology for 
execution.</li>
    + * </ul>
    + * <p>
    + * The class provides some common processing needs:
    + * <ul>
    + * <li>Support for an external configuration file</li>
    + * <li>Provides a {@link TopologyProviderFactory}</li>
    + * <li>Provides a {@link ApplicationUtilities}</li>
    + * <li>Provides a {@link IotDevice}</li>
    + * </ul>
    + */
    +public abstract class AbstractIotfApplication extends AbstractApplication {
    +
    +   private IotDevice device;
    +
    +   public AbstractIotfApplication(String propsPath) throws Exception {
    +           super(propsPath);
    +   }
    +
    +   @Override
    +   protected void preBuildTopology(Topology topology) {
    +           // Add an Iotf device communication manager to the topology
    +           // Declare a connection to IoTF Quickstart service              
    +           String deviceId = "qs" + Long.toHexString(new 
Random().nextLong());
    +           device = IotfDevice.quickstart(topology, deviceId);
    +
    +           // TODO replace quickstart 
    +           //     iotfDevice = new IotfDevice(topology, new 
File("device.cfg"));
    +
    +           System.out.println("Quickstart device type:" + 
IotfDevice.QUICKSTART_DEVICE_TYPE);
    --- End diff --
    
    Quickstart isn't very useful for arbitrary applications, why not just 
support the real service?


> Create test application using GPS/OBD sensors
> ---------------------------------------------
>
>                 Key: QUARKS-21
>                 URL: https://issues.apache.org/jira/browse/QUARKS-21
>             Project: Quarks
>          Issue Type: Improvement
>          Components: Test
>            Reporter: May Wone
>            Assignee: May Wone
>            Priority: Minor
>              Labels: test
>
> I’m looking at creating a ‘Fleet Management’ application that uses simulated 
> GPS and On-Board Diagnostics aka OBD data.
> Here are some initial thoughts:
> h4. GPS 
> Create a simulated GPS sensor that reads in saved real GPS data collected 
> from my Garmin (say from a drive from IBM SVL to IBM research).  The GPS 
> sensor will read from a .csv file that contains extracted relevant data from 
> a .gmz file.
> h5. Potential applications:
> 1. Send GPS data to say, Kafka.  Potentially, there can be a server 
> application to track the fleet of vehicles in real time (ex. vehicles moving 
> on a map). 
> 2. Speeding monitor – filter for > 70mph
> 3. Geofence exception monitor if the vehicle is outside the Geofence  
> boundaries (simple definition).  This may indicate the vehicle is lost, 
> stolen, or making an unauthorized trip.
> 4.  …
> h4. OBD 
> Create a simulated OBD sensor that reads in made-up data.
> h5. Potential applications:
> 1. Send alert if a sensor value is out of range. For example, engine oil 
> temperature overheating.
> 1a.. Battery voltage low, ….
> 2. Send alert for Diagnostic Trouble Codes. 
> 3. Show simple embedded analytics (more complex analytics requires domain 
> knowledge). For example:
>   3a. Hard braking (>7mph)  - send alert to driver and send alert to on 
> server. A metric can count the number of such incidents.
>   3b. Hard acceleration (> ? mph) 
>   3c. Ignition off & motion detected(GPS) -> possible towing
>   3d. …
> Comments?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to