APP4 - S5 H16

Dependencies:   mbed-rtos mbed

Committer:
SonSenpai
Date:
Tue Feb 23 04:47:56 2016 +0000
Revision:
2:f57df1b4a7a4
Parent:
0:6b5926b50a71
Child:
4:d773812f9f7b
hahhahaha gnight

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SonSenpai 0:6b5926b50a71 1 #pragma once
SonSenpai 0:6b5926b50a71 2
SonSenpai 0:6b5926b50a71 3 #include<bitset>
SonSenpai 0:6b5926b50a71 4 #include<string>
SonSenpai 0:6b5926b50a71 5 #include "mbed.h"
SonSenpai 0:6b5926b50a71 6 #include "CRC16.h"
SonSenpai 0:6b5926b50a71 7
SonSenpai 0:6b5926b50a71 8
SonSenpai 0:6b5926b50a71 9 using namespace std;
SonSenpai 0:6b5926b50a71 10
SonSenpai 0:6b5926b50a71 11 class trame
SonSenpai 0:6b5926b50a71 12 {
SonSenpai 0:6b5926b50a71 13 public:
SonSenpai 0:6b5926b50a71 14 int length;
SonSenpai 0:6b5926b50a71 15 string text;
SonSenpai 0:6b5926b50a71 16 int dataLength;
SonSenpai 0:6b5926b50a71 17
SonSenpai 0:6b5926b50a71 18 bitset<8> preambule;
SonSenpai 0:6b5926b50a71 19 bitset<8> start;
SonSenpai 0:6b5926b50a71 20 bitset<8> type_flags;
SonSenpai 0:6b5926b50a71 21 bitset<8> message_length;
SonSenpai 0:6b5926b50a71 22 bitset<640> message;
SonSenpai 0:6b5926b50a71 23 bitset<16> crc16;
SonSenpai 0:6b5926b50a71 24 bitset<8> end;
SonSenpai 0:6b5926b50a71 25
SonSenpai 0:6b5926b50a71 26 trame( string msg );
SonSenpai 0:6b5926b50a71 27 trame( bitset<696> bit );
SonSenpai 0:6b5926b50a71 28 bitset<696>* getBitset();
SonSenpai 0:6b5926b50a71 29
SonSenpai 0:6b5926b50a71 30 private:
SonSenpai 0:6b5926b50a71 31 bitset<696> *bitFrame;
SonSenpai 0:6b5926b50a71 32
SonSenpai 0:6b5926b50a71 33 };