for CAN communication between mbed
Dependents: EM_Logger EM_Mission
Diff: myCAN.h
- Revision:
- 0:89073e0112db
- Child:
- 1:0732a5dec208
- Child:
- 3:3804d83c7377
diff -r 000000000000 -r 89073e0112db myCAN.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/myCAN.h Sun Jul 21 07:02:45 2013 +0000 @@ -0,0 +1,52 @@ +#ifndef MBED_MYCAN_H +#define MBED_MYCAN_h + +#include "mbed.h" + +class myCAN: public CAN{ + +public: + + myCAN(PinName rd,PinName td); + + char* get_time(void); + char* get_latitude(void); + char* get_longitude(void); + int get_NoS(void); + + float get_temp(void); + int get_pres(void); + + float get_a_x(void); + float get_a_y(void); + int get_a_z(void); + int get_j_x(void); + int get_j_y(void); + int get_j_z(void); + + void make_logger_senddata(char* time,int NoS,char* latitude,char* longitude,int a_z,int temp,int pres); + void make_mission_senddata(void); + + void send(char user); + +private: + + char CANdata[9][8]; + CANMessage msg; + + char time[9]; //= {'0','0',':','0','0',':','0','0','\0'}; + int NoS; + char latitude[10]; + char longitude[11]; + + int acel[3]; + int jail[3]; + + int temp; + int pres; + + + void rxHandler(void); +}; + +#endif \ No newline at end of file