Code Monkey home page Code Monkey logo

crc-idecc's Introduction

CRC-IDECC

This a project school that consist in a Introduction, Detection, and Error Correction on Content using CRC algorithm.

Analysis of Capacity

Given the following polynomial that we have chosen to use in our CRC algorithm:

$G(x) = x^{7} + x^{5} + x^{4} + x^{3} + x^{1} + x^{0}$

(in binary: 0b10111001)

We can determine that the hamming distance of this polynomial is 4, which means that we can detect up to 3 errors and correct up to 1 error.

Overall Architecture

The established architecture is capable of handling multiple clients by connecting to a proxy, which is in turn connected to a server, using the TCP protocol with multi-threading support.

To send a message, the client inserts a character and then calculates its CRC (Cyclic Redundancy Check), which is concatenated to form a 2-byte packet:

+-----------+-----------+
| Message   | CRC       |
| (1 byte)  | (1 byte)  |
+-----------+-----------+

The client then sends the packet to the proxy, which modifies random bits in the first byte representing the message.

Note: We assume that the byte representing the CRC cannot be altered.

The proxy then forwards the modified packet to the server, which verifies its validity by performing a polynomial division in the binary field $F_2[X]$

Two cases can occur:

  • If the remainder of the polynomial division is zero, there are no errors.
  • If the remainder is non-zero, an error is detected and can be corrected by comparison with a software register.

If the server fails to correct the error, it sends a predefined value of 0xFFFF, indicating that the packet could not be corrected. The client then resends the packet until the server manages to correct the error.

Usage

In root directory:

make

you will need to execute in order:

Server

./bin/project-rio --server --server-address=localhost --server-port=9876

Proxy

./bin/project-rio --proxy --proxy-address=localhost --proxy-port=9800 --server-address=localhost--server-port=9876

Client

./bin/project-rio --client --proxy-address=localhost --proxy-port=9800

Note: You can use the --help flag to see the available options for each program.

Resources

Authors

crc-idecc's People

Contributors

aaalloc avatar jrj37 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.