aigamo get data

Dependents:   agz_base_ver2 agz_base_ver2 get_GPS_data_ver1 aigamozu_program_ver2 ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers agz_common.h Source File

agz_common.h

00001 //define common data
00002 
00003 #ifndef AGZ_COMMON
00004 #define AGZ_COMMON
00005 
00006 #include "XBee.h"
00007 #include "mbed.h"
00008 
00009 //device num with XBee
00010 #define AGZ_NUM_NODES   56
00011 
00012 //about robot
00013 #define AGZ_NUM_ROBOTS  4//40
00014 #define AGZ_FROM_ROBOT  0
00015 #define AGZ_TO_ROBOT    39
00016 
00017 //about base
00018 #define AGZ_FROM_BASE   40
00019 #define AGZ_TO_BASE     47
00020 #define AGZ_BASE_A_FROM_ROBOT_ID    0
00021 #define AGZ_BASE_A_TO_ROBOT_ID      7
00022 #define AGZ_BASE_B_FROM_ROBOT_ID    8  
00023 #define AGZ_BASE_B_TO_ROBOT_ID      15
00024 #define AGZ_BASE_C_FROM_ROBOT_ID    16
00025 #define AGZ_BASE_C_TO_ROBOT_ID      23 
00026 
00027 //about joy-stick
00028 #define AGZ_FROM_JOY    48
00029 #define AGZ_TO_JOY    55
00030 
00031 /*----------------------------------------------------------
00032     data of Xbee
00033 -----------------------------------------------------------*/
00034 //Addres List 
00035 extern XBeeAddress64 Agz_XBee_Remote_Address[AGZ_NUM_ROBOTS];
00036 
00037 
00038 
00039 /*----------------------------------------------------------
00040     data of ROBOT
00041 -----------------------------------------------------------*/
00042 union AGZ_UNION_INT8_LONG{
00043     uint8_t value_ch[4];
00044     long    value_long;   
00045 };
00046 
00047 class AGZ_ROBOT{
00048 private:
00049     uint8_t state;
00050     AGZ_UNION_INT8_LONG LatitudeH,LatitudeL, LongitudeH,LongitudeL;  
00051     AGZ_UNION_INT8_LONG LatitudeKH,LatitudeKL, LongitudeKH,LongitudeKL;  
00052 public:
00053     AGZ_ROBOT();
00054     void set_state(uint8_t);
00055     void set_LatitudeH(uint8_t*);    
00056     void set_LatitudeL(uint8_t*);    
00057     void set_LongitudeH(uint8_t*);    
00058     void set_LongitudeL(uint8_t*);    
00059     uint8_t get_state();
00060     long get_LatitudeH();    
00061     long get_LatitudeL();    
00062     long get_LongitudeH();    
00063     long get_LongitudeL();    
00064     void set_LatitudeKH(uint8_t*);    
00065     void set_LatitudeKL(uint8_t*);    
00066     void set_LongitudeKH(uint8_t*);    
00067     void set_LongitudeKL(uint8_t*);    
00068     long get_LatitudeKH();    
00069     long get_LatitudeKL();    
00070     long get_LongitudeKH();    
00071     long get_LongitudeKL();    
00072 };
00073 
00074 /*----------------------------------------------------------
00075     data of BASE
00076 -----------------------------------------------------------*/
00077 
00078 
00079 /*----------------------------------------------------------
00080     data of JOY-STICK
00081 -----------------------------------------------------------*/
00082 
00083 
00084 
00085 
00086 #endif