Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Rig an interface? #7

Open
tzneal opened this issue Jun 15, 2018 · 2 comments
Open

Make Rig an interface? #7

tzneal opened this issue Jun 15, 2018 · 2 comments

Comments

@tzneal
Copy link
Contributor

tzneal commented Jun 15, 2018

Hey Tobias,

The issue I'm running into is that querying the rig for its frequency is expensive. There's no good way to throw in a caching layer, but if Rig was an interface I could easily add a CachedRig that wrapped a rig and cached all of the Rig get calls for a few seconds to save calls to the radio.

Thoughts?

@dh1tw
Copy link
Owner

dh1tw commented Jun 17, 2018

Hi Todd,

I guess sooner or later everybody runs into this kind of bottleneck issues with hamlib ;-) One solution might be to change from polling to the hamlib callbacks which inform about changes. Although I've heard that the callbacks are not implemented in all backends.

In gorigctl, which is intended as a rigctld replacement, but using Protobuf instead of plain TCP sockets, I added a caching layer between the RPC calls and the radio connected via goHamlib. I defined there a radio interface and then implemented it for a local and a remote radio.

But I understand that you want to rather work directly with goHamlib, without an RPC layer in between.

Converting rig into an interface might be a viable option. My main concern is that the interface will have to be changed with each new method call added. Especially since rig in goHamlib currently doesnt implement the full C api for hamlib.

hw?

Tobias

@dh1tw dh1tw closed this as completed Jun 17, 2018
@dh1tw dh1tw reopened this Jun 17, 2018
@dh1tw
Copy link
Owner

dh1tw commented Jun 17, 2018

sorry, accidentally closed the issue :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants