The CLI arguments in the pssch_ue example (C-V2X application note) do not match with the usage note. I discovered this when trying to set the number of subchannels (-n). This holds for -s option as well.
The -n option is listed in the usage printing, but not handled in the parse_args function. I think it has to be either removed from the usage or added to the parse_args function, depending if you want it to be set via CLI.
The fix is fairly straight forward in both ways, but you have to decide for one option first.
Additional information:
In the parse_args function, there are sometimes conversions to int32_t and sometimes uint32_t while the target variable is uint32_t anyways. Is there any reason? If not, casting to the "right" type might be preferred and fixed within this issue.
case 'm':
args->file_start_sf_idx = (uint32_t)strtol(argv[optind], NULL, 10); // args->file_start_sf_idx is a uint32_t (everything ok here)
break;
case 'p':
cell_sl.nof_prb = (int32_t)strtol(argv[optind], NULL, 10); // cell_sl.nof_prb is a uint32_t (type mismatch?)
break;
Setup Details
Basic srsRAN 21.04 with B210 SDR + UHD Driver.
Expected Behavior
./lib/examples/pssch_ue -i <FILE>.dat -n 10
I expected this to decode the file with according number of subchannels.
Issue Description
The CLI arguments in the pssch_ue example (C-V2X application note) do not match with the usage note. I discovered this when trying to set the number of subchannels (
-n
). This holds for-s
option as well.The
-n
option is listed in theusage
printing, but not handled in theparse_args
function. I think it has to be either removed from theusage
or added to theparse_args
function, depending if you want it to be set via CLI. The fix is fairly straight forward in both ways, but you have to decide for one option first.Additional information: In the
parse_args
function, there are sometimes conversions toint32_t
and sometimesuint32_t
while the target variable isuint32_t
anyways. Is there any reason? If not, casting to the "right" type might be preferred and fixed within this issue.Setup Details
Basic srsRAN 21.04 with B210 SDR + UHD Driver.
Expected Behavior
./lib/examples/pssch_ue -i <FILE>.dat -n 10
I expected this to decode the file with according number of subchannels.
Actual Behaviour
./lib/examples/pssch_ue: invalid option -- 'n'
Steps to reproduce the problem
Trying to set
-n 10
for pssch_ue example.Additional Information
From pssch_ue example