Git Product home page Git Product logo

Comments (10)

jfjlaros avatar jfjlaros commented on June 15, 2024

What about adding a reopen() method to the interface class?

from arduino-simple-rpc.

chrisflesher avatar chrisflesher commented on June 15, 2024

Hmm... I guess you could call open (to get methods) then close (to delete methods but you could save a copy somewhere) then reopen (this would copy over the old methods without getting them again). Is this what you're suggesting?

In that case the python API would look like this:

from simple_rpc import Interface

interface = Interface('socket://192.168.1.50:10000')
print(interface.ping(1))
interface.close()
interface.reopen()
print(interface.ping(1))
interface.close()

That would work, the API for ethernet connections would be somewhat verbose but its fine for what I'm trying to do for now.

from arduino-simple-rpc.

jfjlaros avatar jfjlaros commented on June 15, 2024

Something like that. Or we could remove the whole removal of methods altogether.

from arduino-simple-rpc.

jfjlaros avatar jfjlaros commented on June 15, 2024

Perhaps something like this: reopen only opens the serial connection, open calls reopen, does the wait, fetches the methods, etc. and close does not throw away the methods anymore.

from arduino-simple-rpc.

jfjlaros avatar jfjlaros commented on June 15, 2024

By the way, I have enabled discussions for this repository.

from arduino-simple-rpc.

chrisflesher avatar chrisflesher commented on June 15, 2024

Ok, I'll put up a different PR to prototype that idea. I haven't used the discussions feature before, it looks kind of like Slack?

from arduino-simple-rpc.

jfjlaros avatar jfjlaros commented on June 15, 2024

No idea, I never used it either.

from arduino-simple-rpc.

jfjlaros avatar jfjlaros commented on June 15, 2024

We could give it a try perhaps, see this discussion.

from arduino-simple-rpc.

jfjlaros avatar jfjlaros commented on June 15, 2024

Fixed in #13.

from arduino-simple-rpc.

chrisflesher avatar chrisflesher commented on June 15, 2024

Thanks for looking at this!

from arduino-simple-rpc.

Related Issues (13)

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.