Projectlab Elektronica-ICT KULeuven

Dependencies:   EthernetInterface TMP102 TextLCD mbed-rtos mbed

werking.pdf

Committer:
seppeduwe
Date:
Mon Mar 17 18:40:46 2014 +0000
Revision:
4:466d859bfb13
Parent:
3:344115c04cd0
Einde Labo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
seppeduwe 0:ae3af7d18c4a 1 #ifndef Frame_H
seppeduwe 0:ae3af7d18c4a 2 #define Frame_H
seppeduwe 0:ae3af7d18c4a 3 class Frame
seppeduwe 0:ae3af7d18c4a 4 {
seppeduwe 0:ae3af7d18c4a 5 private:
seppeduwe 0:ae3af7d18c4a 6 int IdDestinationMbed;
seppeduwe 0:ae3af7d18c4a 7 int temperature;
seppeduwe 0:ae3af7d18c4a 8 int pWMDutycycle;
seppeduwe 0:ae3af7d18c4a 9 int tune;
seppeduwe 0:ae3af7d18c4a 10 int lengthIDs;
seppeduwe 0:ae3af7d18c4a 11 char* IDs;
seppeduwe 1:635e76c52151 12 int crc;
seppeduwe 0:ae3af7d18c4a 13 public:
seppeduwe 0:ae3af7d18c4a 14 Frame(int IdDestinationMbed,
seppeduwe 0:ae3af7d18c4a 15 int temperature,
seppeduwe 0:ae3af7d18c4a 16 int pWMDutycycle,
seppeduwe 0:ae3af7d18c4a 17 int tune,
seppeduwe 0:ae3af7d18c4a 18 int lengthIDs,
seppeduwe 1:635e76c52151 19 char* IDs);
seppeduwe 1:635e76c52151 20 Frame();
seppeduwe 1:635e76c52151 21 int Encode(char* frame);
seppeduwe 1:635e76c52151 22 int Decode(char* frame);
seppeduwe 0:ae3af7d18c4a 23 int MakeCRC(char LEN, char IDD, char TMP0, char TMP1, char PWM, char* data, int lenghtData);
seppeduwe 1:635e76c52151 24 void testEncode(char* encode);
seppeduwe 4:466d859bfb13 25 int CheckCRC();
seppeduwe 1:635e76c52151 26 int CheckMyID(int id);
seppeduwe 1:635e76c52151 27 void AddID(int id);
seppeduwe 1:635e76c52151 28 //int Length(char* frame);
seppeduwe 1:635e76c52151 29 void setIdDestinationMbed(int IdDestinationMbed);
seppeduwe 1:635e76c52151 30 int getIdDestinationMbed(void);
seppeduwe 3:344115c04cd0 31 void setTemperature(float temperature);
seppeduwe 1:635e76c52151 32 int getTemperature(void);
seppeduwe 4:466d859bfb13 33 void setPWMDutycycle(float pWMDutycycle);
seppeduwe 1:635e76c52151 34 void setTune(int tune);
seppeduwe 1:635e76c52151 35 int getTune(void);
seppeduwe 1:635e76c52151 36 void setLengthIDs(int lengthIDs);
seppeduwe 1:635e76c52151 37 void setIDs(char* IDs);
seppeduwe 1:635e76c52151 38
seppeduwe 0:ae3af7d18c4a 39 };
seppeduwe 0:ae3af7d18c4a 40 #endif