Exemplo n.º 1
0
def test_fail():
    encoded = list(framing.encode(''))
    encoded[-1] = not encoded[-1]
    with pytest.raises(ValueError):
        concat(framing.decode_frames(encoded))
Exemplo n.º 2
0
def test_main(data):
    encoded = framing.encode(data)
    decoded = framing.decode_frames(encoded)
    assert concat(decoded) == data
Exemplo n.º 3
0
def test_main(data):
    encoded = framing.encode(data)
    decoded = framing.decode_frames(encoded)
    assert concat(decoded) == data
Exemplo n.º 4
0
def test_fail():
    encoded = list(framing.encode(''))
    encoded[-1] = not encoded[-1]
    with pytest.raises(ValueError):
        concat(framing.decode_frames(encoded))
Exemplo n.º 5
0
 def send(self, data):
     #self.sender.start()
     self.sender.write(np.zeros(int(self.config.silence_start)))
     bits = framing.encode(data, self.framer)
     self.sender.modulate(bits=bits)