Main Content

isCapturing

Status of capture running in background using baseband receiver

Since R2024a

Description

example

status=isCapturing(bbrx) returns a logical value status indicating whether the capture running in the background using the specified baseband receiver has finished.

Examples

collapse all

Create a baseband receiver object, specifying a radio setup configuration previously saved in the Radio Setup wizard.

bbrx = basebandReceiver("MyRadio")
bbrx = 
  basebandReceiver with properties:

               RadioGain: 10
         CenterFrequency: 2.4000e+09
              SampleRate: 250000000
                Antennas: "RF0:RX2"
    DroppedSamplesAction: "error"
         CaptureDataType: "int16"

Capture 1 s of IQ data in the background and save it to a file in the basebandData folder called capture1.mat.

mkdir('basebandData');
[dataPath,~] = capture(bbrx,seconds(1),SaveLocation='basebandData/capture1.mat',Background=true);

Check if the capture is in progress.

isCapturing(bbrx)
ans = logical
   1

Wait for the capture to complete.

while isCapturing(bbrx)
    pause(0.1);
end

Check that the capture is no longer in progress.

isCapturing(bbrx)
ans = logical
   0

Retrieve the outputs of the capture operation and load the captured IQ data into the workspace.

[dataPath, timestamp, droppedSamples] = captureOutputs(bbrx);
load(dataPath,'data');

Input Arguments

collapse all

Baseband receiver, specified as a basebandReceiver object.

Output Arguments

collapse all

Background capture status, returned as a 1 (true) or 0 (false).

Data Types: logical

Version History

Introduced in R2024a