dslink 0.6.1

  • README.md
  • Installing
  • Versions
  • 0

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.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate dslink

2. Use it

The package has the following executables:


$ dsbeacon

Use this package as a library

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 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...

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

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

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.0.0.
 
 Because dslink depends on cipher from git which requires SDK version >=1.11.0 <2.0.0, version solving failed.

Health suggestions

Format lib/broker_discovery.dart.

Run dartfmt to format lib/broker_discovery.dart.

Format lib/browser.dart.

Run dartfmt to format lib/browser.dart.

Format lib/browser_client.dart.

Run dartfmt to format lib/browser_client.dart.

Fix additional 57 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/client.dart (Run dartfmt to format lib/client.dart.)
  • lib/common.dart (Run dartfmt to format lib/common.dart.)
  • lib/dslink.dart (Run dartfmt to format lib/dslink.dart.)
  • lib/io.dart (Run dartfmt to format lib/io.dart.)
  • lib/nodes.dart (Run dartfmt to format lib/nodes.dart.)
  • lib/server.dart (Run dartfmt to format lib/server.dart.)
  • lib/src/browser/browser_ecdh_link.dart (Run dartfmt to format lib/src/browser/browser_ecdh_link.dart.)
  • lib/src/browser/browser_user_link.dart (Run dartfmt to format lib/src/browser/browser_user_link.dart.)
  • lib/src/browser/browser_ws_conn.dart (Run dartfmt to format lib/src/browser/browser_ws_conn.dart.)
  • lib/src/common/connection_channel.dart (Run dartfmt to format lib/src/common/connection_channel.dart.)
  • lib/src/common/node.dart (Run dartfmt to format lib/src/common/node.dart.)
  • lib/src/common/table.dart (Run dartfmt to format lib/src/common/table.dart.)
  • lib/src/common/value.dart (Run dartfmt to format lib/src/common/value.dart.)
  • lib/src/crypto/dart/isolate.dart (Run dartfmt to format lib/src/crypto/dart/isolate.dart.)
  • lib/src/crypto/dart/pk.dart (Run dartfmt to format lib/src/crypto/dart/pk.dart.)
  • lib/src/crypto/node/pk.dart (Run dartfmt to format lib/src/crypto/node/pk.dart.)
  • lib/src/crypto/pk.dart (Run dartfmt to format lib/src/crypto/pk.dart.)
  • lib/src/historian/container.dart (Run dartfmt to format lib/src/historian/container.dart.)
  • lib/src/historian/get_history.dart (Run dartfmt to format lib/src/historian/get_history.dart.)
  • lib/src/historian/interval.dart (Run dartfmt to format lib/src/historian/interval.dart.)
  • lib/src/historian/main.dart (Run dartfmt to format lib/src/historian/main.dart.)
  • lib/src/historian/manage.dart (Run dartfmt to format lib/src/historian/manage.dart.)
  • lib/src/historian/publish.dart (Run dartfmt to format lib/src/historian/publish.dart.)
  • lib/src/historian/rollup.dart (Run dartfmt to format lib/src/historian/rollup.dart.)
  • lib/src/http/client_link.dart (Run dartfmt to format lib/src/http/client_link.dart.)
  • lib/src/http/websocket_conn.dart (Run dartfmt to format lib/src/http/websocket_conn.dart.)
  • lib/src/nodes/json.dart (Run dartfmt to format lib/src/nodes/json.dart.)
  • lib/src/requester/default_defs.dart (Run dartfmt to format lib/src/requester/default_defs.dart.)
  • lib/src/requester/node_cache.dart (Run dartfmt to format lib/src/requester/node_cache.dart.)
  • lib/src/requester/request.dart (Run dartfmt to format lib/src/requester/request.dart.)
  • lib/src/requester/request/invoke.dart (Run dartfmt to format lib/src/requester/request/invoke.dart.)
  • lib/src/requester/request/list.dart (Run dartfmt to format lib/src/requester/request/list.dart.)
  • lib/src/requester/request/remove.dart (Run dartfmt to format lib/src/requester/request/remove.dart.)
  • lib/src/requester/request/set.dart (Run dartfmt to format lib/src/requester/request/set.dart.)
  • lib/src/requester/request/subscribe.dart (Run dartfmt to format lib/src/requester/request/subscribe.dart.)
  • lib/src/requester/requester.dart (Run dartfmt to format lib/src/requester/requester.dart.)
  • lib/src/responder/base_impl/def_node.dart (Run dartfmt to format lib/src/responder/base_impl/def_node.dart.)
  • lib/src/responder/base_impl/local_node_impl.dart (Run dartfmt to format lib/src/responder/base_impl/local_node_impl.dart.)
  • lib/src/responder/manager/storage.dart (Run dartfmt to format lib/src/responder/manager/storage.dart.)
  • lib/src/responder/manager/trace.dart (Run dartfmt to format lib/src/responder/manager/trace.dart.)
  • lib/src/responder/node_provider.dart (Run dartfmt to format lib/src/responder/node_provider.dart.)
  • lib/src/responder/responder.dart (Run dartfmt to format lib/src/responder/responder.dart.)
  • lib/src/responder/response.dart (Run dartfmt to format lib/src/responder/response.dart.)
  • lib/src/responder/response/invoke.dart (Run dartfmt to format lib/src/responder/response/invoke.dart.)
  • lib/src/responder/response/list.dart (Run dartfmt to format lib/src/responder/response/list.dart.)
  • lib/src/responder/response/subscribe.dart (Run dartfmt to format lib/src/responder/response/subscribe.dart.)
  • lib/src/responder/simple/simple_node.dart (Run dartfmt to format lib/src/responder/simple/simple_node.dart.)
  • lib/src/storage/redis_storage.dart (Run dartfmt to format lib/src/storage/redis_storage.dart.)
  • lib/src/storage/simple_storage.dart (Run dartfmt to format lib/src/storage/simple_storage.dart.)
  • lib/src/storage/web_storage.dart (Run dartfmt to format lib/src/storage/web_storage.dart.)
  • lib/src/utils/codec.dart (Run dartfmt to format lib/src/utils/codec.dart.)
  • lib/src/utils/list.dart (Run dartfmt to format lib/src/utils/list.dart.)
  • lib/src/utils/stream_controller.dart (Run dartfmt to format lib/src/utils/stream_controller.dart.)
  • lib/src/utils/timer.dart (Run dartfmt to format lib/src/utils/timer.dart.)
  • lib/src/utils/uri_component.dart (Run dartfmt to format lib/src/utils/uri_component.dart.)
  • lib/utils.dart (Run dartfmt to format lib/utils.dart.)
  • lib/worker.dart (Run dartfmt to format lib/worker.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Package is too old. (-100 points)

The package was released more than two years ago.

The option strong-mode: false is being deprecated. (-50 points)

Remove strong-mode: false from your analysis_options.yaml file:

analyzer:
  strong-mode: false

Maintain CHANGELOG.md. (-20 points)

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

Use analysis_options.yaml. (-10 points)

Rename old .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

The description is too short. (-20 points)

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

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.11.0