Return-Path: X-Original-To: apmail-quarks-dev-archive@minotaur.apache.org Delivered-To: apmail-quarks-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5EF319425 for ; Fri, 1 Apr 2016 13:35:29 +0000 (UTC) Received: (qmail 76432 invoked by uid 500); 1 Apr 2016 13:35:29 -0000 Delivered-To: apmail-quarks-dev-archive@quarks.apache.org Received: (qmail 76405 invoked by uid 500); 1 Apr 2016 13:35:29 -0000 Mailing-List: contact dev-help@quarks.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quarks.incubator.apache.org Delivered-To: mailing list dev@quarks.incubator.apache.org Received: (qmail 76394 invoked by uid 99); 1 Apr 2016 13:35:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2016 13:35:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 346FA1A03A4 for ; Fri, 1 Apr 2016 13:35:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HPSoQpqCw9TV for ; Fri, 1 Apr 2016 13:35:27 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 898D75FB2F for ; Fri, 1 Apr 2016 13:35:26 +0000 (UTC) Received: (qmail 76323 invoked by uid 99); 1 Apr 2016 13:35:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2016 13:35:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8C8252C14F6 for ; Fri, 1 Apr 2016 13:35:25 +0000 (UTC) Date: Fri, 1 Apr 2016 13:35:25 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@quarks.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (QUARKS-99) Improve documentation for IotfDevice MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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. + *
+ * The format of the file is: + *
    +     * 
    +     * [device]
    +     * org = organization identifier
    +     * type = device type
    +     * id = device identifier
    +     * auth-method = token
    +     * auth-token = authorization token
    +     * 
    +     * 
+ * For example: + *
    +     * 
    +     * [device]
    +     * org = uguhsp
    +     * type = iotsample-arduino
    +     * id = 00aabbccde03
    +     * auth-method = token
    +     * auth-token = AJfKQV@&bBo@VX6Dcg
    +     * 
    +     * 
+ *

+ * Connecting to the server occurs when the topology is submitted for + * execution. + *

+ * @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)