dslink 1.0.4

  • Readme
  • Changelog
  • Installing
  • 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.

  // 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
dart path/to/link.dart --broker http://my.broker:8080/conn # Start a link that connects to the specified broker.

ChangeLog #

  • v1.0.2 - Properly forward QOS level changes to nodes when changing an existing subscription QOS level.
  • v1.0.1 - Fix bug in list subscriptions for nodes which have been removed and recreated throughout subscription's life. This may have prevented list subscriptions from updating full entries.
  • v1.0.0 - Start of changelog tracking. Too many existing changes to list.

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:

  dslink: ^1.0.4

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';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.0 <2.0.0