dslink 0.6.1

  • README.md
  • Installing
  • Versions
  • 27

DSLink SDK for Dart Build Status Coverage Status Slack

DSLink SDK for Dart

Getting Started

Prerequisites

Install

pub global activate -sgit https://github.com/IOT-DSA/broker-dart.git # Globally install the DSA Broker

Start a Broker

dsbroker # If you have the pub global executable path setup.
pub global run dsbroker:broker # If you do not have the pub global executable path setup.

You can edit the server configuration using broker.json. For more information about broker configuration, see this page.

For documentation, see this page. For more examples, see this page.

import "package:dslink/dslink.dart";

LinkProvider link;

main(List<String> args) async {
  // Process the arguments and initializes the default nodes.
  link = new LinkProvider(args, "Simple-", defaultNodes: {
    "Message": {
      r"$type": "string", // The type of the node is a string.
      r"$writable": "write", // This node's value can be set by a responder link.
      "?value": "Hello World" // The default message value.
    }
  });

  // Connect to the broker.
  link.connect();

  // Save the message when it changes.
  link.onValueChange("/Message").listen((_) => link.save());
}
dart path/to/link.dart # Start a link that connects to a broker at http://127.0.0.1:8080/conn
dart path/to/link.dart --broker http://my.broker:8080/conn # Start a link that connects to the specified broker.

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dslink: "^0.6.1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dslink/dslink.dart';
        
Version Uploaded Documentation Archive
0.6.1 Jun 7, 2016 Go to the documentation of dslink 0.6.1 Download dslink 0.6.1 archive
0.6.0 Apr 24, 2016 failed Download dslink 0.6.0 archive
0.5.8 Feb 18, 2016 failed Download dslink 0.5.8 archive
0.5.7+1 Jan 30, 2016 failed Download dslink 0.5.7+1 archive
0.5.7 Jan 30, 2016 failed Download dslink 0.5.7 archive
0.5.6+1 Jan 28, 2016 failed Download dslink 0.5.6+1 archive
0.5.6 Jan 24, 2016 failed Download dslink 0.5.6 archive
0.5.5 Jan 23, 2016 failed Download dslink 0.5.5 archive
0.5.4+1 Jan 22, 2016 failed Download dslink 0.5.4+1 archive
0.5.4 Jan 14, 2016 failed Download dslink 0.5.4 archive

All 16 versions...

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
90 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
27
Learn more about scoring.

Platforms

Detected platforms: unsure

Suggestions

  • Fix platform conflicts.

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Use constrained dependencies.

    The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: cipher.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 17 errors 19 hints.

    Make sure that the imported libraries are not in conflict. Detected components: html, isolate. null

    Make sure that the imported libraries are not in conflict. Detected components: html, isolate. null

    Similar analysis of the following files failed:

    • lib/broker_discovery.dart (error)
    • lib/io.dart (error)
    • lib/nodes.dart (error)
    • lib/src/historian/rollup.dart (error)
    • lib/src/requester/default_defs.dart (error)
    • lib/src/requester/node_cache.dart (error)
    • lib/src/requester/request/subscribe.dart (error)
    • lib/src/responder/base_impl/local_node_impl.dart (error)
    • lib/src/responder/simple/simple_node.dart (error)
    • lib/src/common/value.dart (hint)
    • lib/src/nodes/json.dart (hint)
    • lib/src/responder/base_impl/def_node.dart (hint)
    • lib/src/utils/timer.dart (hint)
    • lib/utils.dart (hint)
  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use dslink.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

    analyzer:
      strong-mode: true
    

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.11.0
args ^0.13.4 0.13.7 1.4.2
bignum ^0.1.0 0.1.0
cipher 0.7.2
crypto 0.9.1 0.9.1 2.0.2+1
json_diff ^0.1.2 0.1.2
logging ^0.11.3 0.11.3+1
msgpack ^0.4.0 0.4.0 0.8.0+1
Transitive dependencies
collection 1.14.9
diff_match_patch 0.2.1
fixnum 0.10.7
Dev dependencies
browser ^0.10.0
dsbroker
test >=0.12.13