1

私は現在、いくつかのエラー訂正コードを検証するためのテストを書いています。

inputData1  = "1001011011"
inputData2  = "1001111011"
fingerPrint1 = parityCheck.getParityFingerprint(inputData1)
                                      # Expected: fingerPrint1=0

fingerPrint2 = parityCheck.getParityFingerprint(inputData2)
                                      # Expected: fingerPrint2=1

if fingerPrint1 == fingerPrint2:
    print "Test failed: errorCorrectingAlgo1 failed to detect error"
else:
    print "Test success: errorCorrectingAlgo1 successfully detected error"

バイナリ文字列でエラー(バーストエラー、単一イベント、並べ替えなど)を自動的に生成するために使用できるPythonクラスはありますか?例えば:

inputData1 = "1001011011"
inputData1BurstError = applyBurstError(inputData1)  # Eg: inputData1BurstError =
                                         ("1011111011", or "1001000000", or etc.)

inputData1RandomError = applyRandomError(inputData1)# Eg: inputData1RandomError =
                                         ("0001101011", or "0111101101", or etc.)

inputData1Reordering = applyReordering(inputData1)  # Eg: inputData1Reordering =
                                         ("0101110011", or "1101101001", or etc.)

inputData1SingleEvent = applySingleEvent(inputData1)# Eg: inputData1SingleEvent =
                                         ("1001011011", or "1000011011", or etc.)

このようなクラスは、バイナリチェックの検証に簡単に実装できることを私は知っています。ただし、CRCなどのより複雑なエラー検出コードをテストするには、より完全なクラスが必要です。私は過去にNetem(http://www.linuxfoundation.org/collaborate/workgroups/networking/netem)を使用して、テレコムラボのインターフェイスに出入りするパケットを変更しました。ただし、テスト全体をデスクトップコンピュータでのみ実行するように計画されているため、今回はNetemが私の問題の良い解決策になるとは思えません。また、今回はWindows7に取り組んでいます。さらに、Netemは、私のテスト実装に十分な完全/複雑な関数のセットを提供していません。

どんな助け/提案も大歓迎です。

ありがとう!

関連する質問:ガウス分布でリストをシャッフルする方法

4

0 に答える 0