Code Monkey home page Code Monkey logo

Comments (3)

astrobokonon avatar astrobokonon commented on September 26, 2024

Oh. I forgot that this listener is a bit of a hackish mess. This is not going to get done today after all.

if tname == 'lig.MrFreeze.cmd':
schema = self.schemaDict[tname]
cmddict = parsers.parserCmdPacket(headers, body,
schema=schema,
debug=True)
elif tname.endswith("loisLog"):
tfields = parsers.parseLOISTemps(headers, body)
# A little bit of hackish because it's already ugly
# I HATE THAT THESE ARE HARDCODED BUT IT'S FASTER
# AND MAYBE LOIS WILL GO AWAY SOON SO I CAN DITCH THIS.
# I couldn't figure out a quick way to get the config
# sections into here, but probably could with more effort
table = "MrFreeze"
tags = {"Device": "arc-loisgettemp"}
if 'lemi' in tname.lower():
meas = ["LMI_arc-loisgettemp"]
elif 'deveny' in tname.lower():
meas = ["DeVeny_arc-loisgettemp"]
elif 'nasa42' in tname.lower():
meas = ["NASA42_arc-loisgettemp"]

from mrfreeze.

astrobokonon avatar astrobokonon commented on September 26, 2024

One chance might be to define the listener command topic as a "kinda XML" topic that requires further parsing like I did for the PurpleAir parser, but I might have to define a meta-function to call another processing sequence since I only have a place for one bound method to be called. But it might work and it might not be too confusing.

from mrfreeze.

astrobokonon avatar astrobokonon commented on September 26, 2024

Initial version now done; the gist is (from ligmos):

  • LIGBaseConsumer is a subclass of STOMP's ConnectionListener
  • queueMaintainer is a subclass of LIGBaseConsumer

and the command/reply topics are passed in as arguments to the initialization of queueMaintainer. The queueMaintainer itself is initialized here in MrFreeze but it's really just a stub with some definitions. Hooray!

from mrfreeze.

Related Issues (16)

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.