Git Product home page Git Product logo

Comments (1)

JoelKrec avatar JoelKrec commented on July 30, 2024

Tldr: I am really new to Mqtt so I cant be certain but I think this feature seems unfinished and the timer that publishes submodels is not started currently. Release version I looked through: 2022-01-13.alpha

As said in tldr: I dont have a lot of qualifications to say something of high value here but I think I can just say what I found and think. If that is against any kind of rules here, please tell me. I will delete my comment afterwards.

If you use the option "--mqtt" in command line, aasxs will set up a mqtt broker on localhost with the standard mqtt port 1883.

In AasxServerStandardBib/Program.cs at 1792, there is code to start a mqtt client in the backround which will publish every submodel as json with topic "Submodel_" + submodel id short.

This code is in a method called OnRestTimedEvent which is added as an event listener in a method called SetRestTimer. This set-timer-method is never used and therefore, it wont publish anything. The rest of the OnRestTimedEvent method contains as the name implies stuff about updating Rest stuff for GET and POST. But I didnt look much into that as this wasnt my problem.

To get the server to publish submodels I just called SetRestTimer(2000) at 518 in AasxServerStandardBib/Program.cs. The integer is the rate in milliseconds at which the timer event fires. For now, it seems like the other unused code doesnt throw any problems but I didnt test it too much.

My plan for the future is to create a mqtt timer like the rest and opc timers with the backround worker code I mentioned earlier extracted from the current rest timer. Maybe even add an option to the command line thingy ( I dont know what it is called ), so that I can use a different broker and credentials (like --mqtt-broker and --mqtt-credentials ). But that seems to be out of my reach for now.

Again, please tell me if I did something against the rules. I will react the fastest to an email at [email protected]

I hoped my comment helped a little bit.

from server.

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.