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

Argument naming convention #1

Open
guruofquality opened this issue May 29, 2016 · 3 comments
Open

Argument naming convention #1

guruofquality opened this issue May 29, 2016 · 3 comments
Labels

Comments

@guruofquality
Copy link
Contributor

Multi prefix to make it through the inception

Since SoapyMultiSDR is a bit of a meta-wrapper, I was thinking about how the arguments to specify devices could be formatted to make it through the system. For example, the remote module uses remote: prefix to denote args that should only go to the remote system.

  • For example remote uses: driver=remote,remote:driver=rtlsdr
  • Then multi could use: driver=multi,multi:driver=rtlsdr

This is especially useful for the driver keyword which is used inside the factory lookup itself to filter out support modules. But we can support it in general for other args. The MultiSDR will simply strip the prefix whenever its found.

Index format for specific device indexes

That would specify the "multi" support module and the rtlsdr driver for all internal devices. Now thats not going to be enough for the multi module as it needs specifying arguments for each device. I was imagining a different "indexing-format" for specifying a specific device in the list of devices:

  • driver=multi,multi:driver=rtlsdr,serial[0]=00000001,serial[1]=00000002

Now the multi driver can see there are two devices because it has two indexed keywords, and it can format the internal device args to find and make each internal device:

  • Device 0 args: driver=rtlsdr,serial=00000001
  • Device 1 args: driver=rtlsdr,serial=00000002

One could also imagine skipping the multi prefix and using the index format here. Perhaps redundant this way if you are using homogeneous devices:

  • driver=multi,driver[0]=rtlsdr,driver[1]=rtlsdr,serial[0]=00000001,serial[1]=00000002

Regular global named stuff

Lets use the same index format for named items (example global sensors). Because these don't have a specific channel space which can be segmented for the multi-device, we must modify the names. So if each rtl had a sensor named foo, then the names presented as the multi device would be foo[0] and foo[1].

Inception with SoapyRemote

Although it hurts to think about, we are going to want to make sure the system is complete by supporting a SoapyMultiSDR made up on individual SoapyRemotes or a SoapyRemote that proxies for a local SoapyMultiSDR. Note that many of the arguments don't get prefixed because they don't really need to be mutated between layers since they are ignored in these layers:

Args for MultiSDR of remotes

driver=multi,multi:driver=remote,remote=host,remote:driver=rtlsdr,serial[0]=00000001,serial[1]=00000002

  • driver=multi specifies the multi support module
  • multi:driver=remote uses the remote support module for each internal device
  • remote=host specifies the remote host (could use index format if different hosts)
  • remote:driver=rtlsdr specifies the rtl driver on the remote node
  • serial[0]=00000001 specifies the specific device serial number

Args for SoapyRemote to proxy a MultiSDR

driver=remote,remote:driver=multi,remote=host,multi:driver=rtlsdr,serial[0]=00000001,serial[1]=00000002

  • driver=remote specifies the remote support module
  • remote:driver=multi specifies the multi driver on the remote end
  • remote=host specifies the remote host (could use index format if different hosts)
  • multi:driver=rtlsdr specifies the rtl driver on the remote node in the multi module
  • serial[0]=00000001 specifies the specific device serial number
@cjcliffe
Copy link

This looks interesting; I hadn't considered the SoapyRemote config case and indexing but I think it makes sense and is consistent.

Is there any thought on implementing the indexing scheme optionally for individual settings, bandwidth, gain, etc? -- I'm thinking in particular for PPM which can vary between RTL devices I would like to make sure each one has the appropriate adjustments applied when being used together since they're rarely the same -- for example just listing a few here that I've labelled I've got +77, +40, -2, +4 and +1 PPM.

@guruofquality
Copy link
Contributor Author

Is there any thought on implementing the indexing scheme optionally for individual settings, bandwidth, gain, etc? -- I'm thinking in particular for PPM which can vary between RTL devices I would like to make sure each one has the appropriate adjustments applied when being used together since they're rarely the same -- for example just listing a few here that I've labelled I've got +77, +40, -2, +4 and +1 PPM.

Any channel-specified setting will continue to work as before. The channels just keep running up linearly and map down to a particular device. So with a multi device using two rtls, you get two channels 0 and 1. Example:

  • RTL0: ``setBandwidth(SOAPY_SDR_RX, 0, 1e6)
  • RTL1: ``setBandwidth(SOAPY_SDR_RX, 1, 1e6)

@cjcliffe
Copy link

@guruofquality ah yes, I completely forgot about the channel mapping you mentioned in the original issue -- that works just fine and is simple enough to use.

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

No branches or pull requests

2 participants