Changes between Version 13 and Version 14 of WARPLab/Porting


Ignore:
Timestamp:
Feb 5, 2015, 10:26:39 AM (9 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPLab/Porting

    v13 v14  
    1515
    1616{{{
    17 %WARPLab 7.4
    18 
    19 %We will use the transmitter's I/Q buffer length to determine
    20 %how long our transmission can be
     17% WARPLab 7.4
     18
     19% We will use the transmitter's I/Q buffer length to determine
     20% how long our transmission can be
    2121%
    2222% node_tx - WARPLab node object for the transmitter
    2323
    2424txLength = node_tx.baseband.txIQLen;
    25 wl_basebandCmd(node_tx,'tx_length',txLength);
    26 
    27 }}}
    28 
    29 {{{#!html
    30 </td><td width=50% align=left>
    31 }}}
    32 
    33 {{{
    34 %WARPLab 7.5
    35 
    36 %We will read the transmitter's maximum I/Q buffer length
    37 %and assign that value to a temporary variable.
     25wl_basebandCmd(node_tx, 'tx_length', txLength);
     26
     27}}}
     28
     29{{{#!html
     30</td><td width=50% align=left>
     31}}}
     32
     33{{{
     34% WARPLab 7.5
     35
     36% We will read the transmitter's maximum I/Q buffer length
     37% and assign that value to a temporary variable.
    3838%
    3939% node_tx - WARPLab node object for the transmitter
    4040% RF_TX - index of RF interface used for transmission
    4141
    42 maximum_buffer_len = wl_basebandCmd(node_tx,RF_TX,'tx_buff_max_num_samples');
    43 
    44 %Our transmission length for this example does not need
    45 %to fill the entire transmit buffer, so we will use the smaller
    46 %of two values: the maximum buffer length the board
    47 %can support or an arbitrary value defined by this script
     42maximum_buffer_len = wl_basebandCmd(node_tx, RF_TX, 'tx_buff_max_num_samples');
     43
     44% Our transmission length for this example does not need
     45% to fill the entire transmit buffer, so we will use the smaller
     46% of two values: the maximum buffer length the board
     47% can support or an arbitrary value defined by this script
    4848
    4949txLength = min(32768, maximum_buffer_len);
    50 wl_basebandCmd(node_tx,'tx_length',txLength);
     50wl_basebandCmd(node_tx, 'tx_length', txLength);
    5151
    5252}}}
     
    6969
    7070{{{
    71 %WARPLab 7.4
    72 
    73 %Trigger of transmission and reception
     71% WARPLab 7.4
     72
     73% Trigger of transmission and reception
    7474%
    7575% eth_trig - UDP broadcast trigger object
     
    7777eth_trig.send();
    7878
    79 %Read samples from the receive buffer
     79% Read samples from the receive buffer
    8080%
    8181% node_rx - WARPLab node object for the receiver
     
    8383% rxLength - number of samples to read
    8484
    85 rx_IQ = wl_basebandCmd(node_rx,[RF_RX],'read_IQ', 0, rxLength);
    86 }}}
    87 
    88 {{{#!html
    89 </td><td width=50% align=left>
    90 }}}
    91 
    92 {{{
    93 %WARPLab 7.5
    94 
    95 
    96 %Set the number of samples that should be captured
     85rx_IQ = wl_basebandCmd(node_rx, [RF_RX], 'read_IQ', 0, rxLength);
     86}}}
     87
     88{{{#!html
     89</td><td width=50% align=left>
     90}}}
     91
     92{{{
     93% WARPLab 7.5
     94
     95
     96% Set the number of samples that should be captured
    9797%
    9898% node_rx - WARPLab node object for the receiver
    9999% rxLength - number of samples to receive
    100100
    101 wl_basebandCmd(node_rx,'rx_length',rxLength);
    102 
    103 %Trigger of transmission and reception
     101wl_basebandCmd(node_rx, 'rx_length', rxLength);
     102
     103% Trigger of transmission and reception
    104104%
    105105% eth_trig - UDP broadcast trigger object
     
    107107eth_trig.send();
    108108
    109 %Read samples from the receive buffer
     109% Read samples from the receive buffer
    110110%
    111111% node_rx - WARPLab node object for the receiver
     
    113113% rxLength - number of samples to read
    114114
    115 rx_IQ = wl_basebandCmd(node_rx,[RF_RX],'read_IQ', 0, rxLength);
     115rx_IQ = wl_basebandCmd(node_rx, [RF_RX], 'read_IQ', 0, rxLength);
    116116}}}
    117117