UHD USRP Sink 块的消息端口可以发送什么命令?
What commands can be sent on the message port of UHD USRP Sink block?
我一直在尝试在 GNU Radio companion 的信号源块中传递消息。我从它的源码中可以看出,我们可以通过消息来改变源的频率、幅度、偏移和相位。例如,从消息选通发送的以下消息 PMT 可以将信号的幅度更改为 0.5。
pmt.dict_add(pmt.make_dict(), pmt.intern("ampl"), pmt.from_double(0.5))
但是当我查看UHD USRP Sink的代码时,我无法清楚地知道可以向这个块发送什么命令或者可以更改哪些参数。我在文档的某些地方读到,USRP Sink 的频率、增益、LO 偏移、时间戳、中心频率和其他收发器相关设置可以通过命令消息进行操作。
什么命令可以从消息选通(以 pmt 格式)发送到 USRP 接收器块以及可以修改哪些参数(及其密钥)?
这是正式记录的:
https://www.gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax
Command name
Value Type
Description
chan
int
Specifies a channel. If this is not given, either all channels are chosen, or channel 0, depending on the action. A value of -1 forces 'all channels', where possible.
gain
double
Sets the Tx or Rx gain (in dB). Defaults to all channels.
power_dbm
double
Sets the Tx or Rx power reference level (in dBm). Defaults to all channels. Works for certain devices only, and only if calibration data is available.
freq
double
Sets the Tx or Rx frequency. Defaults to all channels. If specified without lo_offset, it will set the LO offset to zero.
lo_offset
double
Sets an LO offset. Defaults to all channels. Note this does not affect the effective center frequency.
tune
tune_request
Like freq, but sets a full tune request (i.e. center frequency and DSP offset). Defaults to all channels.
mtune
tune_request_t
Like tune, but supports a full manual tune request as uhd::tune_request_t. Defaults to all channels.
lo_freq
double
For fully manual tuning: Set the LO frequency (RF frequency). Conflicts with freq, lo_offset, and tune.
dsp_freq
double
For fully manual tuning: Set the DSP frequency (CORDIC frequency). Conflicts with freq, lo_offset, and tune.
direction
string
Used for timed transceiver tuning to ensure tuning order is maintained. Values other than 'TX' or 'RX' will be ignored.
rate
double
See usrp_block::set_samp_rate(). Always affects all channels.
bandwidth
double
See usrp_block::set_bandwidth(). Defaults to all channels.
time
timestamp
Sets a command time. See usrp_block::set_command_time(). A value of PMT_NIL will clear the command time.
mboard
int
Specify mboard index, where applicable.
antenna
string
See usrp_block::set_antenna(). Defaults to all channels.
gpio
gpio
PMT dictionary including bank, attr, value, mask for GPIO. See notes.
我一直在尝试在 GNU Radio companion 的信号源块中传递消息。我从它的源码中可以看出,我们可以通过消息来改变源的频率、幅度、偏移和相位。例如,从消息选通发送的以下消息 PMT 可以将信号的幅度更改为 0.5。
pmt.dict_add(pmt.make_dict(), pmt.intern("ampl"), pmt.from_double(0.5))
但是当我查看UHD USRP Sink的代码时,我无法清楚地知道可以向这个块发送什么命令或者可以更改哪些参数。我在文档的某些地方读到,USRP Sink 的频率、增益、LO 偏移、时间戳、中心频率和其他收发器相关设置可以通过命令消息进行操作。
什么命令可以从消息选通(以 pmt 格式)发送到 USRP 接收器块以及可以修改哪些参数(及其密钥)?
这是正式记录的:
https://www.gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax
Command name | Value Type | Description |
---|---|---|
chan | int | Specifies a channel. If this is not given, either all channels are chosen, or channel 0, depending on the action. A value of -1 forces 'all channels', where possible. |
gain | double | Sets the Tx or Rx gain (in dB). Defaults to all channels. |
power_dbm | double | Sets the Tx or Rx power reference level (in dBm). Defaults to all channels. Works for certain devices only, and only if calibration data is available. |
freq | double | Sets the Tx or Rx frequency. Defaults to all channels. If specified without lo_offset, it will set the LO offset to zero. |
lo_offset | double | Sets an LO offset. Defaults to all channels. Note this does not affect the effective center frequency. |
tune | tune_request | Like freq, but sets a full tune request (i.e. center frequency and DSP offset). Defaults to all channels. |
mtune | tune_request_t | Like tune, but supports a full manual tune request as uhd::tune_request_t. Defaults to all channels. |
lo_freq | double | For fully manual tuning: Set the LO frequency (RF frequency). Conflicts with freq, lo_offset, and tune. |
dsp_freq | double | For fully manual tuning: Set the DSP frequency (CORDIC frequency). Conflicts with freq, lo_offset, and tune. |
direction | string | Used for timed transceiver tuning to ensure tuning order is maintained. Values other than 'TX' or 'RX' will be ignored. |
rate | double | See usrp_block::set_samp_rate(). Always affects all channels. |
bandwidth | double | See usrp_block::set_bandwidth(). Defaults to all channels. |
time | timestamp | Sets a command time. See usrp_block::set_command_time(). A value of PMT_NIL will clear the command time. |
mboard | int | Specify mboard index, where applicable. |
antenna | string | See usrp_block::set_antenna(). Defaults to all channels. |
gpio | gpio | PMT dictionary including bank, attr, value, mask for GPIO. See notes. |