-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParityAlgsTests.hpp
46 lines (36 loc) · 1014 Bytes
/
ParityAlgsTests.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef __PARTITY_ALGS_TESTS__
#define __PARTITY_ALGS_TESTS__
#include <bits/stdc++.h>
#include "Logger.hpp"
class PartityAlgsTests {
public:
/**
* @brief Adiciona Bit de paridade Par
*/
static vector<bool> evenParity(vector<bool> frame);
/**
* @brief Teste de integridade utilizando paridade par.
*/
static bool evenParityTest(vector<bool>& frame);
/**
* @brief Adiciona Bit de paridade Ímpar
*/
static vector<bool> oddParity(vector<bool> frame);
/**
* @brief Teste de integridade utilizando paridade ímpar.
*/
static bool oddParityTest(vector<bool>& frame);
/**
* @brief Executa o algoritmo CRC-32
*/
static vector<bool> crc32(vector<bool> frame);
/**
* @brief Teste de integridade utilizando o algoritmo CRC-32
*/
static bool crc32Test(vector<bool>& frame) ;
/**
* @brief Testa a paridade do frame (true if even)
*/
static bool evenTest(vector<bool> frame);
};
#endif