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