dslink 0.6.1

  • README.md
  • Installing
  • Versions
  • 32

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

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages 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 Go to the documentation of dslink 0.6.0 Download dslink 0.6.0 archive
0.5.8 Feb 18, 2016 Go to the documentation of dslink 0.5.8 Download dslink 0.5.8 archive
0.5.7+1 Jan 30, 2016 Go to the documentation of dslink 0.5.7+1 Download dslink 0.5.7+1 archive
0.5.7 Jan 30, 2016 Go to the documentation of dslink 0.5.7 Download dslink 0.5.7 archive
0.5.6+1 Jan 28, 2016 Go to the documentation of dslink 0.5.6+1 Download dslink 0.5.6+1 archive
0.5.6 Jan 24, 2016 Go to the documentation of dslink 0.5.6 Download dslink 0.5.6 archive
0.5.5 Jan 23, 2016 Go to the documentation of dslink 0.5.5 Download dslink 0.5.5 archive
0.5.4+1 Jan 22, 2016 Go to the documentation of dslink 0.5.4+1 Download dslink 0.5.4+1 archive
0.5.4 Jan 14, 2016 Go to the documentation of dslink 0.5.4 Download dslink 0.5.4 archive

All 16 versions...

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 16, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

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

Platforms

Detected platforms: Flutter, other

Primary library: package:dslink/dslink.dart with components: io.

Suggestions

  • Fix lib/src/responder/simple/simple_node.dart.

    Strong-mode analysis of lib/src/responder/simple/simple_node.dart failed with the following error:

    line: 1174 col: 16
    The return type 'String' isn't a 'void', as defined by the method '[]='.

  • Fix lib/src/requester/request/subscribe.dart.

    Strong-mode analysis of lib/src/requester/request/subscribe.dart failed with the following error:

    line: 19 col: 3
    Invalid override. The type of 'ReqSubscribeListener.asFuture' ('([dynamic]) → Future<dynamic>') isn't a subtype of 'StreamSubscription<dynamic>.asFuture' ('<E>([E]) → Future<E>').

  • Fix further 3 Dart files.

    Similar analysis of the following files failed:

    • lib/src/historian/rollup.dart
    • lib/broker_discovery.dart
    • lib/nodes.dart
  • Maintain CHANGELOG.md.

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

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 3 error(s) and 0 warning(s).

  • Use constrained dependencies.

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

  • 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.3.0
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
Transitive dependencies
collection 1.14.5
diff_match_patch 0.2.1
fixnum 0.10.7
Dev dependencies
browser ^0.10.0
dsbroker
test >=0.12.13