‘10101111’ -> (‘¯’, False)
Basically the inverse of conv_packed_binary_string_to_1_0_string, but also returns a flag indicating if we had to pad with leading zeros to get to a multiple of 8.
‘¯’ –> ‘10101111’
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 access_code: string of ascii 0’s and 1’s @param whitener_offset offset into whitener string to use [0-16)
Packet will have access code at the beginning, followed by length, payload and finally CRC-32.
tuple(iterable) -> tuple initialized from iterable’s items
If the argument is a tuple, the return value is the same object.
Return (ok, payload)
@param whitened_payload_with_crc: string