APP 4

Dependencies:   mbed CRC16 mbed-rtos

MEF.h

Committer:
manl2003
Date:
2016-02-23
Revision:
27:011ad1667040
Parent:
26:f2b37f9dfca9

File content as of revision 27:011ad1667040:

// Vincent Bélanger et Laurent Mandrile
// belv1802 - manl2003

#include "APP.h"

#pragma once

class MEF
{
public:

    void ReceiveBit(bool bit);

private:

    //Verification du start byte
    bool startChecker();
    //Verification du preamble byte
    bool preambleChecker();
    //Calcul de la longueur
    int calculateSize();
    bool compareCRC();
    void init();

    //État actuel de la mef
    STATES state;
    //Buffer d'entrée
    bitset<16> m_InputBuffer;
    //Payload en bits
    bitset<MAX_DATA> m_BSPayload;
    //Payload en char
    char m_CPayload[80];
    int m_Counter;
    int m_DataSize;
    unsigned short m_CRC;
};