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