Comments (10)
What about adding a reopen()
method to the interface class?
from arduino-simple-rpc.
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.
Something like that. Or we could remove the whole removal of methods altogether.
from arduino-simple-rpc.
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.
By the way, I have enabled discussions for this repository.
from arduino-simple-rpc.
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.
No idea, I never used it either.
from arduino-simple-rpc.
We could give it a try perhaps, see this discussion.
from arduino-simple-rpc.
Fixed in #13.
from arduino-simple-rpc.
Thanks for looking at this!
from arduino-simple-rpc.
Related Issues (13)
- Unclosed file warning triggered on import HOT 1
- cannot import class methods HOT 3
- Speed up ethernet / wifi comms HOT 3
- trying to use spy:// (pyserial feature) with Interface mistakes it for a host address HOT 3
- Initialize interface from disk HOT 13
- Ethernet support HOT 3
- Type hinting using any vs typing.Any HOT 3
- Adding timeouts to the library HOT 7
- Type hinting correction on *args and **kwargs in function definitions HOT 2
- python library can't handle bare Tuple<T,S> return type from Arduino Library HOT 8
- client library in C HOT 1
- Module hangs on _get_methods() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-simple-rpc.