You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dj...@apache.org on 2016/04/01 18:54:13 UTC

[1/3] incubator-quarks git commit: QUARKS-99 Improve Javadoc for IotfDevice

Repository: incubator-quarks
Updated Branches:
  refs/heads/master 7c0455072 -> 35c821cb8


QUARKS-99 Improve Javadoc for IotfDevice


Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks/commit/bd03d506
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks/tree/bd03d506
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks/diff/bd03d506

Branch: refs/heads/master
Commit: bd03d5064a52ec49adeef0a2275ef7ed9d3658ea
Parents: 434dd02
Author: Dan Debrunner <dj...@debrunners.com>
Authored: Thu Mar 31 16:54:35 2016 -0700
Committer: Dan Debrunner <dj...@debrunners.com>
Committed: Thu Mar 31 16:54:35 2016 -0700

----------------------------------------------------------------------
 .../java/quarks/connectors/iotf/IotfDevice.java | 87 +++++++++++++++++++-
 1 file changed, 86 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/bd03d506/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
----------------------------------------------------------------------
diff --git a/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java b/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
index fae5019..2fa0d7f 100644
--- a/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
+++ b/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
@@ -44,10 +44,25 @@ import quarks.topology.Topology;
 /**
  * Connector for IBM Watson IoT Platform.
  * <BR>
- * <em>Note IBM Watson IoT Platform was previously known as Internet of Things Foundation.</em>
+ * IBM Watson IoT Platform is a cloud based internet of things
+ * scale message hub that provides a device model on top of MQTT.
+ * {@code IotfDevice} implements the generic device model {@link IotDevice}
+ * and thus can be used as a connector for
+ * {@link quarks.providers.iot.IotProvider}.
+ * <BR>
+ * <em>Note IBM Watson IoT Platform was previously known as
+ * IBM Internet of Things Foundation.</em>
+ * 
+ * @see quarks.connectors.iot Quarks generic device model
+ * @see <a href="http://www.ibm.com/internet-of-things/iot-platform.html">IBM Watson IoT Platform</a>
+ * @see quarks.samples.connectors.iotf.IotfSensors Sample application
  */
 public class IotfDevice implements IotDevice {
     
+    /**
+     * Device type identifier ({@value}) used when using the Quickstart service.
+     * @see #quickstart(Topology, String)
+     */
     public static final String QUICKSTART_DEVICE_TYPE = "iotsamples-quarks";
 
     private final IotfConnector connector;
@@ -57,9 +72,34 @@ public class IotfDevice implements IotDevice {
     /**
      * Create a connector to the IBM Watson IoT Platform Bluemix service with the device
      * specified by {@code options}.
+     * <BR>
+     * These properties must be set in {@code options}.
+     * 
+     * <UL>
+     * <LI>{@code org=}<em>organization identifier</em></LI>
+     * <LI>{@code type=}<em>device type</em></LI>
+     * <LI>{@code id=}<em>device identifier</em></LI>
+     * <LI>{@code auth-method=token}</LI>
+     * <LI>{@code auth-token=}<em>authorization token</em></LI>
+     * </UL>
+     * For example:
+     * <pre>
+     * <code>
+     * Properties options = new Properties();
+     * options.setProperty("org", "uguhsp");
+     * options.setProperty("type", "iotsample-arduino");
+     * options.setProperty("id", "00aabbccde03");
+     * options.setProperty("auth-method", "token");
+     * options.setProperty("auth-token", "AJfKQV@&bBo@VX6Dcg");
+     * 
+     * IotDevice iotDevice = new IotfDevice(options);
+     * </code>
+     * </pre>
+
      * <p>
      * Connecting to the server occurs when the topology is submitted for
      * execution.
+     * </p>
      * 
      * @param topology
      *            the connector's associated {@code Topology}.
@@ -69,11 +109,56 @@ public class IotfDevice implements IotDevice {
         this.connector = new IotfConnector(options);
     }
 
+    /**
+     * Create a connector to the IBM Watson IoT Platform Bluemix service.
+     * Device identifier and authorization are specified
+     * by a configuration file.
+     * <BR>
+     * The format of the file is:
+     * <pre>
+     * <code>
+     * [device]
+     * org = <em>organization identifier</em>
+     * type = <em>device type</em>
+     * id = <em>device identifier</em>
+     * auth-method = token
+     * auth-token = <em>authorization token</em>
+     * </code>
+     * </pre>
+     * For example:
+     * <pre>
+     * <code>
+     * [device]
+     * org = uguhsp
+     * type = iotsample-arduino
+     * id = 00aabbccde03
+     * auth-method = token
+     * auth-token = AJfKQV@&bBo@VX6Dcg
+     * </code>
+     * </pre>
+     * <p>
+     * Connecting to the server occurs when the topology is submitted for
+     * execution.
+     * </p>
+     * @param topology the connector's associated {@code Topology}.
+     * @param optionsFile File containing connection information.
+     */
     public IotfDevice(Topology topology, File optionsFile) {
         this.topology = topology;
         this.connector = new IotfConnector(optionsFile);
     }
     
+    /**
+     * Create an {@code IotfDevice} connector to the Quickstart service.
+     * Quickstart service requires no-sign up to use, but only supports
+     * device commands for a single 
+     * @param topology the connector's associated {@code Topology}.
+     * @param deviceId Device identifier to use for the connection.
+     * @return Connector to the Quickstart service.
+     * 
+     * @see <a href="https://quickstart.internetofthings.ibmcloud.com">Quickstart</a>
+     * @see quarks.samples.connectors.iotf.IotfQuickstart Quickstart sample application
+     */
     public static IotfDevice quickstart(Topology topology, String deviceId) {
         Properties options = new Properties();
         options.setProperty("org", "quickstart");


[2/3] incubator-quarks git commit: Fix incomplete sentence.

Posted by dj...@apache.org.
Fix incomplete sentence.

Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks/commit/85be0c8d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks/tree/85be0c8d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks/diff/85be0c8d

Branch: refs/heads/master
Commit: 85be0c8d756218b3d1018091c2a5691c7d39ba75
Parents: bd03d50
Author: Dan Debrunner <dj...@debrunners.com>
Authored: Fri Apr 1 06:29:00 2016 -0700
Committer: Dan Debrunner <dj...@debrunners.com>
Committed: Fri Apr 1 06:29:00 2016 -0700

----------------------------------------------------------------------
 .../iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/85be0c8d/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
----------------------------------------------------------------------
diff --git a/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java b/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
index 2fa0d7f..313301c 100644
--- a/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
+++ b/connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java
@@ -150,8 +150,10 @@ public class IotfDevice implements IotDevice {
     
     /**
      * Create an {@code IotfDevice} connector to the Quickstart service.
-     * Quickstart service requires no-sign up to use, but only supports
-     * device commands for a single 
+     * Quickstart service requires no-sign up to use to allow evaluation
+     * but has limitations on functionality, such as only supporting
+     * device events and only one message per second.
+     * 
      * @param topology the connector's associated {@code Topology}.
      * @param deviceId Device identifier to use for the connection.
      * @return Connector to the Quickstart service.


[3/3] incubator-quarks git commit: Merge branch 'pr-64'

Posted by dj...@apache.org.
Merge branch 'pr-64'


Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks/commit/35c821cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks/tree/35c821cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks/diff/35c821cb

Branch: refs/heads/master
Commit: 35c821cb8800eba8d0f561205d647768c84985b4
Parents: 7c04550 85be0c8
Author: Daniel J. Debrunner <de...@us.ibm.com>
Authored: Fri Apr 1 09:54:09 2016 -0700
Committer: Daniel J. Debrunner <de...@us.ibm.com>
Committed: Fri Apr 1 09:54:09 2016 -0700

----------------------------------------------------------------------
 .../java/quarks/connectors/iotf/IotfDevice.java | 89 +++++++++++++++++++-
 1 file changed, 88 insertions(+), 1 deletion(-)
----------------------------------------------------------------------