APP4 - S5 H16

Dependencies:   mbed-rtos mbed

trame.h

Committer:
SonSenpai
Date:
2016-02-23
Revision:
0:6b5926b50a71
Child:
2:f57df1b4a7a4

File content as of revision 0:6b5926b50a71:

#pragma once

#include<bitset>
#include<string>
#include "mbed.h"
#include "CRC16.h"


using namespace std;

class trame
{
  public:
  int length;
  string text;
  int dataLength;
  
  bitset<8> preambule;
  bitset<8> start;
  bitset<8> type_flags;
  bitset<8> message_length;
  bitset<640> message;
  bitset<16> crc16;
  bitset<8> end;
  
  trame( string msg );
  trame( bitset<696> bit );
  bitset<696>* getBitset();
  string ToString();
  
  private:
  bitset<696> *bitFrame;
    
};