00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __PLUGINS_REFBOXCOMM_PROCESSOR_MSL2010_H_
00025 #define __PLUGINS_REFBOXCOMM_PROCESSOR_MSL2010_H_
00026
00027 #include "processor.h"
00028 #include "state_handler.h"
00029
00030 #include <cstddef>
00031
00032 namespace fawkes {
00033 class MulticastDatagramSocket;
00034 class Logger;
00035 }
00036
00037 namespace xmlpp {
00038 class DomParser;
00039 class Node;
00040 }
00041
00042 class Msl2010RefBoxProcessor : public RefBoxProcessor
00043 {
00044 public:
00045 Msl2010RefBoxProcessor(fawkes::Logger *logger,
00046 const char *refbox_host, unsigned short int refbox_port);
00047 ~Msl2010RefBoxProcessor();
00048
00049 bool check_connection();
00050 void refbox_process();
00051
00052 private:
00053 void process_string(char *buf, size_t len);
00054 void reconnect();
00055
00056 private:
00057 fawkes::Logger *__logger;
00058 fawkes::MulticastDatagramSocket *__s;
00059
00060 unsigned int __score_cyan;
00061 unsigned int __score_magenta;
00062
00063 const char *__name;
00064
00065 bool __quit;
00066 bool __connection_died;
00067
00068 char *__refbox_host;
00069 unsigned short int __refbox_port;
00070
00071
00072 xmlpp::DomParser *dom;
00073 xmlpp::Node *root;
00074
00075 };
00076
00077 #endif