for CAN communication between mbed
Dependents: EM_Logger EM_Mission
myCAN.h@0:89073e0112db, 2013-07-21 (annotated)
- Committer:
- YSB
- Date:
- Sun Jul 21 07:02:45 2013 +0000
- Revision:
- 0:89073e0112db
- Child:
- 1:0732a5dec208
- Child:
- 3:3804d83c7377
latest version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
YSB | 0:89073e0112db | 1 | #ifndef MBED_MYCAN_H |
YSB | 0:89073e0112db | 2 | #define MBED_MYCAN_h |
YSB | 0:89073e0112db | 3 | |
YSB | 0:89073e0112db | 4 | #include "mbed.h" |
YSB | 0:89073e0112db | 5 | |
YSB | 0:89073e0112db | 6 | class myCAN: public CAN{ |
YSB | 0:89073e0112db | 7 | |
YSB | 0:89073e0112db | 8 | public: |
YSB | 0:89073e0112db | 9 | |
YSB | 0:89073e0112db | 10 | myCAN(PinName rd,PinName td); |
YSB | 0:89073e0112db | 11 | |
YSB | 0:89073e0112db | 12 | char* get_time(void); |
YSB | 0:89073e0112db | 13 | char* get_latitude(void); |
YSB | 0:89073e0112db | 14 | char* get_longitude(void); |
YSB | 0:89073e0112db | 15 | int get_NoS(void); |
YSB | 0:89073e0112db | 16 | |
YSB | 0:89073e0112db | 17 | float get_temp(void); |
YSB | 0:89073e0112db | 18 | int get_pres(void); |
YSB | 0:89073e0112db | 19 | |
YSB | 0:89073e0112db | 20 | float get_a_x(void); |
YSB | 0:89073e0112db | 21 | float get_a_y(void); |
YSB | 0:89073e0112db | 22 | int get_a_z(void); |
YSB | 0:89073e0112db | 23 | int get_j_x(void); |
YSB | 0:89073e0112db | 24 | int get_j_y(void); |
YSB | 0:89073e0112db | 25 | int get_j_z(void); |
YSB | 0:89073e0112db | 26 | |
YSB | 0:89073e0112db | 27 | void make_logger_senddata(char* time,int NoS,char* latitude,char* longitude,int a_z,int temp,int pres); |
YSB | 0:89073e0112db | 28 | void make_mission_senddata(void); |
YSB | 0:89073e0112db | 29 | |
YSB | 0:89073e0112db | 30 | void send(char user); |
YSB | 0:89073e0112db | 31 | |
YSB | 0:89073e0112db | 32 | private: |
YSB | 0:89073e0112db | 33 | |
YSB | 0:89073e0112db | 34 | char CANdata[9][8]; |
YSB | 0:89073e0112db | 35 | CANMessage msg; |
YSB | 0:89073e0112db | 36 | |
YSB | 0:89073e0112db | 37 | char time[9]; //= {'0','0',':','0','0',':','0','0','\0'}; |
YSB | 0:89073e0112db | 38 | int NoS; |
YSB | 0:89073e0112db | 39 | char latitude[10]; |
YSB | 0:89073e0112db | 40 | char longitude[11]; |
YSB | 0:89073e0112db | 41 | |
YSB | 0:89073e0112db | 42 | int acel[3]; |
YSB | 0:89073e0112db | 43 | int jail[3]; |
YSB | 0:89073e0112db | 44 | |
YSB | 0:89073e0112db | 45 | int temp; |
YSB | 0:89073e0112db | 46 | int pres; |
YSB | 0:89073e0112db | 47 | |
YSB | 0:89073e0112db | 48 | |
YSB | 0:89073e0112db | 49 | void rxHandler(void); |
YSB | 0:89073e0112db | 50 | }; |
YSB | 0:89073e0112db | 51 | |
YSB | 0:89073e0112db | 52 | #endif |