Skip to content

Commit 81906f3

Browse files
committed
Remove SDR over network backend as most of new SDR API proposes a direct API for such case. Remove dependency on ZMQ that creates lot of invalidations
1 parent dd715fb commit 81906f3

6 files changed

Lines changed: 3 additions & 422 deletions

File tree

src/AbstractSDRs.jl

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ l = getSupportedSDR()
2121
- l : Array of symbols of supported SDRs
2222
"""
2323
function getSupportedSDRs()
24-
return [:uhd;:sdr_over_network;:radiosim;:pluto;:rtlsdr;:bladerf];
24+
return [:uhd;:radiosim;:pluto;:rtlsdr;:bladerf];
2525
end
2626
export getSupportedSDRs
2727

@@ -84,7 +84,6 @@ Receive nbSamples from the SDR and fill them in the output buffer. The buffer fo
8484
# --- Output parameters
8585
- buffer : Output buffer from the radio filled with nbSamples samples
8686
"""
87-
recv(obj::SDROverNetwork,tul...) = SDROverNetworks.recv(obj,tul...);
8887
recv(obj::UHDBinding,tul...) = UHDBindings.recv(obj,tul...);
8988
recv(obj::RadioSim,tul...) = RadioSims.recv(obj,tul...);
9089
recv(obj::RTLSDRBinding,tul...) = RTLSDRBindings.recv(obj,tul...);
@@ -103,7 +102,6 @@ Receive from the SDR and fill them in the input buffer.
103102
# --- Output parameters
104103
- nbSamples : Number of samples filled
105104
"""
106-
recv!(sig,obj::SDROverNetwork,tul...) = SDROverNetworks.recv!(sig,obj,tul...);
107105
recv!(sig,obj::UHDBinding,tul...) = UHDBindings.recv!(sig,obj,tul...);
108106
recv!(sig,obj::RadioSim,tul...) = RadioSims.recv!(sig,obj,tul...);
109107
recv!(sig,obj::RTLSDRBinding,tul...) = RTLSDRBindings.recv!(sig,obj,tul...);
@@ -124,7 +122,6 @@ send(radio,buffer,cyclic=false)
124122
- nbEch : Number of samples effectively send [Csize_t]. It corresponds to the number of complex samples sent.
125123
"""
126124

127-
send(obj::SDROverNetwork,sig,tul...;kwarg...) = SDROverNetworks.send(obj,sig,tul...;kwarg...);
128125
send(obj::UHDBinding,sig,tul...;kwarg...) = UHDBindings.send(obj,sig,tul...)
129126
send(obj::RadioSim,sig,tul...;kwarg...) = RadioSims.send(obj,sig,tul...)
130127
send(obj::RTLSDRBinding,sig,tul...;kwarg...) = RTLSDRBindings.send(obj,sig,tul...)
@@ -150,27 +147,6 @@ function openSDR(name::Symbol,tul...;key...)
150147
if name == :uhd
151148
suppKwargs = [:args;:channels;:antennas;:cpu_format;:otw_format;:subdev;:nbAntennaRx;:nbAntennaTx;:bypassStreamer];
152149
radio = openUHD(tul...;parseKeyword(key,suppKwargs)...);
153-
elseif (name == :sdr_over_network || name == :e310)
154-
suppKwargs = [:addr];
155-
keyOut = parseKeyword(key,suppKwargs);
156-
if haskey(key,:args)
157-
# For UHDBindings IP address is set as args="addr=192.168.10.14". We want to support this
158-
# We look at args and find addr inside and extract the IP address. Then create a dict entry
159-
str = key[:args];
160-
ind = findfirst("addr",str)[1];
161-
# If addr flag is here, convert it into IP
162-
if ~isnothing(ind)
163-
# --- Getting end of parameter
164-
indV = findfirst(",",str[ind:end]);
165-
# --- If last parameters, get the compelte string
166-
(isnothing(indV)) ? indF = length(str) : indF = indV[1];;
167-
# --- Extract ip address
168-
ip = str[ind+5:indF];
169-
# --- Create a new input in dictionnary
170-
keyOut[:addr] = ip;
171-
end
172-
end
173-
radio = openUhdOverNetwork(tul...;keyOut...);
174150
elseif (name == :radiosim)
175151
suppKwargs = [:packetSize;:scaleSleep;:buffer];
176152
radio = openRadioSim(tul...;parseKeyword(key,suppKwargs)...);

src/Assessors.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55

66
getError(obj::UHDBinding) = UHDBindings.getError(obj);
77
getError(obj::RadioSim) = RadioSims.getError(obj);
8-
getError(obj::SDROverNetwork) = SDROverNetworks.getMD(obj)[3];
98
getError(obj::RTLSDRBinding) = RTLSDRBindings.getError(obj);
109
getError(obj::BladeRFBinding) = BladeRFBindings.getError(obj);
1110

1211
getTimestamp(obj::UHDBinding) = UHDBindings.getTimestamp(obj);
1312
getTimestamp(obj::RadioSim) = RadioSims.getTimestamp(obj);
14-
getTimestamp(obj::SDROverNetwork) = SDROverNetworks.getMD(obj)[1:2];
1513
getTimestamp(obj::RTLSDRBinding) = RTLSDRBindings.getTimestamp(obj);
1614
getTimestamp(obj::BladeRFBinding) = BladeRFBindings.getTimestamp(obj);
1715

src/Backends.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ include("Backends/BladeRF/BladeRFBindings.jl")
3333
@reexport using .BladeRFBindings
3434
export BladeRFBinding
3535

36-
# ----------------------------------------------------
37-
# --- Socket System
38-
# ----------------------------------------------------
39-
# --- Create and load module to pilot E310 devices
40-
# To control this device we create a pure Socket based system
41-
# for which the AbstractSDRs package will help to bind the utils
42-
# Have a look on minimalTransceiver.jl for the code to be ran on E310
43-
include("Backends/SDROverNetworks.jl");
44-
@reexport using .SDROverNetworks
45-
# --- Specific E310 related functions
46-
export SDROverNetwork;
47-
4836
# ----------------------------------------------------
4937
# --- Simulation Radio
5038
# ----------------------------------------------------
@@ -63,6 +51,6 @@ export RadioSim;
6351
# This type will be used as default fallback methods to handle 2 things
6452
# - In case of functions not supported in the given backend to obtain a predictible (and non error) behaviour
6553
# - To simplify access to similar backends fields
66-
AbstractSDR = Union{RadioSim,UHDBinding,PlutoSDR,SDROverNetwork,RTLSDRBinding,BladeRFBinding}
54+
AbstractSDR = Union{RadioSim,UHDBinding,PlutoSDR,RTLSDRBinding,BladeRFBinding}
6755

6856

0 commit comments

Comments
 (0)