[
https://issues.apache.org/jira/browse/QUARKS-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15221689#comment-15221689
]
ASF GitHub Bot commented on QUARKS-99:
--------------------------------------
Github user ddebrunner commented on a diff in the pull request:
https://github.com/apache/incubator-quarks/pull/64#discussion_r58205762
--- Diff:
connectors/iotf/src/main/java/quarks/connectors/iotf/IotfDevice.java ---
@@ -69,11 +109,56 @@ public IotfDevice(Topology topology, Properties
options) {
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
--- End diff --
Good catch!
> Improve documentation for IotfDevice
> ------------------------------------
>
> Key: QUARKS-99
> URL: https://issues.apache.org/jira/browse/QUARKS-99
> Project: Quarks
> Issue Type: Task
> Components: Connectors
> Reporter: Daniel John Debrunner
> Assignee: Daniel John Debrunner
>
> It's not at all clear form the docs what needs to be passed to the
> constructor to create the device.
> It's either a device.cfg file that looks like the one in the
> scripts/connectors/iotf
> or a set of properties
> https://docs.internetofthings.ibmcloud.com/devices/libraries/java.html
> //Provide the device specific data, as well as Auth-key and token using
> Properties class
> 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", "AUTH TOKEN FOR DEVICE");
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)