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 __TOOLS_REFBOXREP_MSL2008_H_
00024 #define __TOOLS_REFBOXREP_MSL2008_H_
00025
00026 #include "refbox_state_sender.h"
00027
00028 #include <cstdlib>
00029 #include <string>
00030 #include <vector>
00031
00032 namespace fawkes {
00033 class MulticastDatagramSocket;
00034 }
00035
00036 namespace xmlpp {
00037 class DomParser;
00038 class Node;
00039 }
00040
00041 class Msl2008RefBoxRepeater
00042 {
00043 public:
00044 Msl2008RefBoxRepeater(RefBoxStateSender &rss,
00045 const char *refbox_host, unsigned short int refbox_port);
00046 ~Msl2008RefBoxRepeater();
00047
00048 void run();
00049
00050 private:
00051 void process_string(char *buf, size_t len);
00052 void reconnect();
00053
00054 private:
00055 RefBoxStateSender &__rss;
00056 fawkes::MulticastDatagramSocket *__s;
00057
00058 unsigned int __score_cyan;
00059 unsigned int __score_magenta;
00060
00061 bool __quit;
00062
00063 char *__refbox_host;
00064 unsigned short int __refbox_port;
00065
00066
00067 xmlpp::DomParser *dom;
00068 xmlpp::Node *root;
00069
00070 };
00071
00072 #endif