Giter Club home page Giter Club logo

sdk-dslink-java-v2's Issues

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.

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:

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.