Beispiel #1
0
        private void ButtonRunText_Click(object sender, EventArgs e)
        {
            string binaryUserInput = BitUtils.StringToBinaryString(textBoxUserInput.Text);

            // Užkodavimas, siuntimas kanalu ir dekodavimas ---------------------------------
            string encoderOutput = _convolutionalEncoder.Encode(binaryUserInput);

            _simpleChannel.SetNoiseLevel((double)numericUpDownNoiseLevel.Value);
            string channelOutput = _simpleChannel.AddNoise(encoderOutput, 0);
            string decoderOutput = _convolutionalDecoder.Decode(channelOutput);

            textBoxTextFromDecoder.Text = BitUtils.BinaryStringToString(decoderOutput);

            // Tik siuntimas kanalu ---------------------------------------------------------
            channelOutput = _simpleChannel.AddNoise(binaryUserInput, 0);
            textBoxTextFromChannel.Text = BitUtils.BinaryStringToString(channelOutput);
        }