Giter Club home page Giter Club logo

sdk-dslink-java-v2's Introduction

sdk-dslink-java-v2

Overview

This repository contains a Java SDK for creating DSA links. To learn about the DSA architecture, please visit this description of how DSA works.

Link Development

Please read the developer guide.

Sub Projects

/dslink-v2

  • Link implementation. Links that wish to use a custom websocket library should declare a dependency on this, such as in a servlet container that already provides one. Otherwise, use dslink-v2-websocket.

/dslink-v2-api

  • The APIs to use for link development.

/dslink-v2-websocket

  • Link base that uses Tyrus, the reference implementation of JSR 356, for websockets. Most links should declare a dependency on this.

JPMS Modules

This SDK is targeted at Java 8. However, they can be used in the Java Platform Module System with the following automatic module names:

  • /dslink-v2 - org.iot.dsa.dslink.v2
  • /dslink-v2-api - org.iot.dsa.dslink.v2.api
  • /dslink-v2-websocket - org.iot.dsa.dslink.v2.websocket

Dependency Management

During development JitPack will be used as the public repository. For more information, visit the JitPack page for this SDK.

The following examples show how to declare a dependency on a specific module which is the most common use case:

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    repository>
</repositories>

<dependency>
    <groupId>com.github.iot-dsa-v2.sdk-dslink-java-v2</groupId>
    <artifactId>dslink-v2-websocket</artifactId>
    <version>n.n.n</version>
    <type>pom</type>
</dependency>

Gradle

repositories {
    maven {
        url 'https://jitpack.io'
    }
}
dependencies {
    implementation 'com.github.iot-dsa-v2.sdk-dslink-java-v2:dslink-v2-websocket:n.n.n'
}

Acknowledgements

Project Tyrus

This software contains unmodified binary redistributions for Project Tyrus, which is dual licensed and available under the CDDL 1.1 and GPL 2 with CPE. An original copy of the license agreement can be found at: https://tyrus-project.github.io/license.html

Silk Icons

This software uses icons from Silk Icons 1.3 created by Mark James and licensed under a Creative Commons Attribute 2.5 License.

sdk-dslink-java-v2's People

Contributors

a-hansen avatar d-shapiro avatar gmtr-web avatar pacane avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdk-dslink-java-v2's Issues

ClassCastException and immediate disconnect during "StreamAll" on log node

java.lang.ClassCastException: com.acuity.iot.dsa.dslink.sys.logging.SysLogService cannot be cast to org.iot.dsa.node.action.DSAction
at org.iot.dsa.node.DSInfo.getAction(DSInfo.java:141)
at com.acuity.iot.dsa.dslink.sys.logging.StreamableLogNode$3.getAction(StreamableLogNode.java:69)
at com.acuity.iot.dsa.dslink.protocol.responder.DSInboundInvoke.writeColumns(DSInboundInvoke.java:362)
at com.acuity.iot.dsa.dslink.protocol.responder.DSInboundInvoke.write(DSInboundInvoke.java:218)
at com.acuity.iot.dsa.dslink.protocol.v1.DS1Session.writeResponse(DS1Session.java:410)
at com.acuity.iot.dsa.dslink.protocol.v1.DS1Session.send(DS1Session.java:363)
at com.acuity.iot.dsa.dslink.protocol.v1.DS1Session.doSendMessage(DS1Session.java:120)
at com.acuity.iot.dsa.dslink.protocol.DSSession$WriteThread.run(DSSession.java:457)

[2019-02-11 08:37:18:810] INFO [DSLink.sys.Connection] iothub2-local-localhost:8080 connected

DSValueNode showing value of last updated child

Hi @a-hansen,

Pls clarify if I'm doing something wrong, or this might be a sdk bug?

I'm implementing DSValueNode. I have two child values called:
"normal-value" and "effective-value". I've implemented getValueChild like this;

   @Override
    public DSInfo<DSIValue> getValueChild() {
        return effectiveValue;
    }

I would expect my DSValueNode to always display effectiveValue child's value.
However, I'm experiencing the behaviour of always showing the value of last changed child.

After some debugging, I've realized this line is being executed (hence updating parent's value) upon either of child nodes being set:

ClassCastException converting to int

Reading a value from a BACNet point, an integer per device specs. For whatever reason, when calling value.toInt() I'm getting java.lang.ClassCastException: org.iot.dsa.node.DSString not int.

Looking into the sources/comments - it says out that Strings will attempt to parseRequest the numeric which may result in a parseRequest exception., but no trace of implementation in DSString class.

My problem definitely is somewhere else, but it'd be great if DSString actually attempted parsing, and included the value that failed to parse into the exception message.

DSBool action parameter editor

@a-hansen Somewhere between 0.70.5 and 0.70.7, I've lost flip-switch as boolean action parameter editor.
I am expecting the editor to default to flip-switch (or whatever is the correct name for it) to reflect the type of the second parameter in addParameter. E.g.
addParameter("override-to-value", DSBool.TRUE, ""); since 0.70.7, and including 0.71.0 is rendering as text input field.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.