Giter Site home page Giter Site logo

Unexpected subscribe message about freeboard-sk HOT 3 CLOSED

rob42 avatar rob42 commented on August 16, 2024
Unexpected subscribe message

from freeboard-sk.

Comments (3)

rob42 avatar rob42 commented on August 16, 2024

BTW getting all /vessels/self/ data could result in a lot of data. Would be better to ask for the data thats actually required.

from freeboard-sk.

panaaj avatar panaaj commented on August 16, 2024

It connects to delta stream using: ws://host:port/signalk/v1/stream?subscribe=none

Spec for streaming api says.....
You can specify the contents of the strea by using the subscribe query parameter.

  • ws://hostname/signalk/«version»/stream?subscribe=self
  • ws://hostname/signalk/«version»/stream?subscribe=all
  • ws://hostname/signalk/«version»/stream?subscribe=none

So this is a valid connection query string according to the spec.

Upon successful connection it sends the following subscription requests:

        let aisSub = {
            "context":"vessels.*",
            "subscribe":[
                {"path":"uuid","period":10000,"policy":selfPolicy},
                {"path":"name","period":10000,"policy":selfPolicy},
                {"path":"communication.callsignVhf","period":10000,"policy":selfPolicy},
                {"path":"mmsi","period":10000,"policy":selfPolicy},
                {"path":"port","period":10000,"policy":selfPolicy},
                {"path":"flag","period":10000,"policy":selfPolicy},
                {"path":"navigation.position","period":10000,"policy":selfPolicy},
                {"path":"navigation.state","period":10000,"policy":selfPolicy},
                {"path":"navigation.courseOverGround*","period":10000,"policy":selfPolicy},
                {"path":"navigation.speedOverGround","period":10000,"policy":selfPolicy}
            ]
        };
        let selfSub = {
            "context":"vessels.self",
            "subscribe":[
                {"path":"navigation.*","period":1000,"policy":selfPolicy},
                {"path":"environment.wind.*","period":1000,"policy":selfPolicy},
                {"path":"notifications.*","period":1000}
            ]
        };  ```

So not sure where `playbackRate` would come into it.... that would be a history API query...

from freeboard-sk.

rob42 avatar rob42 commented on August 16, 2024

Looks like my code added default playback and startTime - oops. So ignore that.
Ok, I was handling 'all', Ive added 'none' now, and will look at 'self' too. Long time since I looked at that code :-)

Seems there is another ws bug in my code that was affecting the above too so closing this.

from freeboard-sk.

Related Issues (20)

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.