00001 /* 00002 DASI Library Copyright (C) 2004-2007 Derek Jones 00003 This software is free for educational use only--no commercial use allowed. 00004 00005 This library is distributed in the hope that it will be useful, 00006 but WITHOUT ANY WARRANTY; without even the implied warranty of 00007 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00008 */ 00009 #ifndef COMMUNICATOR_H 00010 #define COMMUNICATOR_H 00011 #include <jaus/jaus_message.h> 00012 #include <motion_chain.h> 00013 00014 enum DASI_SID { MAP_STORE, VEHICLE_STATUS_STORE, LAST_STORE}; 00015 /* 00016 // Shortcuts 00017 #define IS_MAP_WIDTH communicator::IS_query(MAP_STORE,MAP_WIDTH) 00018 #define IS_MAP_HEIGHT communicator::IS_query(MAP_STORE,MAP_HEIGHT) 00019 #define IS_SET_CELL(t,x,y) communicator::IS_set(MAP_STORE,MAP_CELL,t,x,y) 00020 #define IS_GET_CELL(x,y) communicator::IS_query(MAP_STORE,MAP_CELL,x,y) 00021 */ 00022 /* I believe originally, I was going to use IS_query for all data, but soon realized 00023 how inefficient this would really be. Thus even if you have several nodes that all need 00024 the same data, most likely, the data would be replicated across all nodes with one node 00025 serving as a central repository. 00026 */ 00027 class communicator 00028 { 00029 public: 00030 communicator(void); 00031 static void initialize(void); 00033 // static int IS_query(DASI_SID sid, PID pid, motion& start, motion& goal, atomic_rotation r,motion_chain&); 00034 // static int IS_query(DASI_SID sid, PID pid, short x=0, short y=0); 00035 // static int IS_set(DASI_SID sid, PID pid, int value, short x=0, short y=0, int layer=255); 00037 static void get_message(void); 00038 //xxx uses node-manager static void send(jaus_message* imsg); 00039 static bool check(void); 00040 00041 // static void bluetooth(oEB500* blue); // provide bluetooth communication link. 00042 // static oEB500* bluetooth(void); // returns wether link is bluetooth enabled. 00043 // static oEB500* _eb500; // Bluetooth link if available. 00044 static void bluetooth(void* blue); // provide bluetooth communication link. 00045 static void* bluetooth(void); // returns wether link is bluetooth enabled. 00046 static void* _eb500; // Bluetooth link if available. 00047 00048 private: 00049 }; 00050 00051 #endif
1.3