for CAN communication between mbed

Dependents:   EM_Logger EM_Mission

Committer:
YSB
Date:
Sat Aug 03 09:13:48 2013 +0000
Revision:
2:e0e7269bf1f0
Parent:
1:0732a5dec208
aaa

Who changed what in which revision?

UserRevisionLine numberNew 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 1:0732a5dec208 20 int get_roll(void);
YSB 0:89073e0112db 21
YSB 1:0732a5dec208 22 void make_logger_senddata(char* time,int NoS,char* latitude,char* longitude,int roll,int temp,int pres);
YSB 0:89073e0112db 23 void make_mission_senddata(void);
YSB 0:89073e0112db 24
YSB 0:89073e0112db 25 void send(char user);
YSB 0:89073e0112db 26
YSB 0:89073e0112db 27 private:
YSB 0:89073e0112db 28
YSB 2:e0e7269bf1f0 29 char CANdata[8][8];
YSB 0:89073e0112db 30 CANMessage msg;
YSB 0:89073e0112db 31
YSB 2:e0e7269bf1f0 32 char time[9];
YSB 0:89073e0112db 33 int NoS;
YSB 0:89073e0112db 34 char latitude[10];
YSB 0:89073e0112db 35 char longitude[11];
YSB 0:89073e0112db 36
YSB 1:0732a5dec208 37 char hroll;
YSB 1:0732a5dec208 38 char lroll;
YSB 1:0732a5dec208 39 int roll;
YSB 0:89073e0112db 40 int temp;
YSB 0:89073e0112db 41 int pres;
YSB 0:89073e0112db 42
YSB 0:89073e0112db 43
YSB 0:89073e0112db 44 void rxHandler(void);
YSB 0:89073e0112db 45 };
YSB 0:89073e0112db 46
YSB 0:89073e0112db 47 #endif