diff options
Diffstat (limited to 'gr-digital/python/ofdm_packet_utils.py')
-rw-r--r-- | gr-digital/python/ofdm_packet_utils.py | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/gr-digital/python/ofdm_packet_utils.py b/gr-digital/python/ofdm_packet_utils.py index d0000e6db5..c49dfe4f8e 100644 --- a/gr-digital/python/ofdm_packet_utils.py +++ b/gr-digital/python/ofdm_packet_utils.py @@ -101,14 +101,12 @@ def make_packet(payload, samples_per_symbol, bits_per_symbol, """ Build a packet, given access code, payload, and whitener offset - @param payload: packet payload, len [0, 4096] - @param samples_per_symbol: samples per symbol (needed for padding calculation) - @type samples_per_symbol: int - @param bits_per_symbol: (needed for padding calculation) - @type bits_per_symbol: int - @param whitener_offset offset into whitener string to use [0-16) - @param whitening: Turn whitener on or off - @type whitening: bool + Args: + payload: packet payload, len [0, 4096] + samples_per_symbol: samples per symbol (needed for padding calculation) (int) + bits_per_symbol: (needed for padding calculation) (int) + whitener_offset: offset into whitener string to use [0-16) + whitening: Turn whitener on or off (bool) Packet will have access code at the beginning, followed by length, payload and finally CRC-32. @@ -150,13 +148,13 @@ def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol): we want to pad so that after modulation the resulting packet is a multiple of 128 samples. - @param ptk_byte_len: len in bytes of packet, not including padding. - @param samples_per_symbol: samples per bit (1 bit / symbolwidth GMSK) - @type samples_per_symbol: int - @param bits_per_symbol: bits per symbol (log2(modulation order)) - @type bits_per_symbol: int + Args: + ptk_byte_len: len in bytes of packet, not including padding. + samples_per_symbol: samples per bit (1 bit / symbolwidth GMSK) (int) + bits_per_symbol: bits per symbol (log2(modulation order)) (int) - @returns number of bytes of padding to append. + Returns: + number of bytes of padding to append. """ modulus = 128 byte_modulus = gru.lcm(modulus/8, samples_per_symbol) * bits_per_symbol / samples_per_symbol @@ -170,10 +168,10 @@ def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dewhitening=1): """ Return (ok, payload) - @param whitened_payload_with_crc: string - @param whitener_offset offset into whitener string to use [0-16) - @param dewhitening: Turn whitener on or off - @type dewhitening: bool + Args: + whitened_payload_with_crc: string + whitener_offset: offset into whitener string to use [0-16) + dewhitening: Turn whitener on or off (bool) """ if dewhitening: |