00001
00002
00003
00004
00005 #ifndef SONAR2IR_H
00006 #define SONAR2IR_H
00007
00008 #ifdef HAVE_CONFIG_H
00009 #include "config.h"
00010 #endif
00011
00012 #include <sys/types.h>
00013 #include <sys/fcntl.h>
00014 #include <stdio.h>
00015 #include <string.h>
00016 #include <unistd.h>
00017
00018 #include <libplayercore/playercore.h>
00019
00020 class Sonar2IR : public Driver
00021 {
00022 private:
00023
00024 player_devaddr_t ir_id, sonar_id;
00025 player_ir_data_t ir_data;
00026 player_ir_pose_t ir_pose;
00027 int subscriptions;
00028 Device *sonar_dev;
00029 bool republish_data, republish_pose;
00030
00031
00032 int HandleConfig(MessageQueue *queue, player_msghdr *hdr, void *data);
00033
00034
00035 int HandleCommand(player_msghdr *hdr, void *data);
00036
00037
00038 void PutData(void);
00039
00040 public:
00041 Sonar2IR(ConfigFile *cf, int section);
00042 ~Sonar2IR(void);
00043
00044
00045 void Main();
00046 int Setup();
00047 int Shutdown();
00048
00049
00050 int Subscribe(player_devaddr_t id);
00051 int Unsubscribe(player_devaddr_t id);
00052 int ProcessMessage(MessageQueue *queue, player_msghdr *msghdr, void *data);
00053 };
00054
00055 #endif