stopTransmission
Stop transmission from preamble detector
Syntax
Description
Examples
Configure Preamble Detector and Capture Test Waveform
Configure a preamble detector to continuously send a test waveform with a known preamble sequence and capture data samples of the transmitted waveform.
Define a preamble sequence with good correlation properties. For example, generate and normalize a Zadoff-Chu sequence of length 137.
seq = zadoffChuSeq(38,137); preamble = seq/norm(seq,2);
Generate a test waveform.
prePadding = complex(zeros(999,1),zeros(999,1)); postPadding = complex(zeros(1000,1),zeros(1000,1)); testWaveform = [prePadding;preamble;postPadding;];
Create and configure a preamble detector object, specifying a radio setup configuration previously saved in the Radio Setup wizard.
pd = preambleDetector("MyRadio")
pd = preambleDetector with properties: CenterFrequency: 2.4000e+09 RadioGain: 10 Antennas: "RF0:RX2" SampleRate: 250000000 CaptureDataType: "int16" DroppedSamplesAction: "error" Preamble: 0 ThresholdMethod: "adaptive" FixedThreshold: 0 AdaptiveThresholdOffset: 0 AdaptiveThresholdGain: 0 TriggerOffset: 0
pd.SampleRate = 10.24e6;
Specify the preamble.
pd.Preamble = preamble;
Send the test waveform continuously.
transmit(pd,testWaveform,"continuous", ... TransmitGain=40, ... TransmitCenterFrequency=2.45e9, ... TransmitAntennas="RF0:TX/RX");
Capture 10 ms of data of the transmitted waveform.
[data,timestamp,droppedSamples,status] = capture(pd,milliseconds(10),seconds(1));
Stop test waveform transmission.
stopTransmission(pd);
Input Arguments
pd
— Preamble detector
preambleDetector
object
Preamble detector, specified as a preambleDetector
object.
Note
The first object function call in which you specify this object as an input requires a few extra seconds to load the application onto the hardware.
Version History
Introduced in R2022a
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)