player_driver.h

Go to the documentation of this file.
00001 #ifndef _STAGE_PLAYER_DRIVER_H
00002 #define _STAGE_PLAYER_DRIVER_H
00003 
00004 #include <unistd.h>
00005 #include <string.h>
00006 #include <netinet/in.h>
00007 #include <math.h>
00008 
00009 #include "player.h"
00010 #include "player/device.h"
00011 #include "player/driver.h"
00012 #include "player/configfile.h"
00013 #include "player/drivertable.h"
00014 #include <player/drivertable.h>
00015 #include <player/driver.h>
00016 #include <player/error.h>
00017 #include "playercommon.h"
00018 
00019 #include "stage_internal.h"
00020 #include "stg_time.h"
00021 
00022 // foward declare;
00023 class Interface;
00024 
00025 class StgDriver : public Driver
00026 {
00027  public:
00028   // Constructor; need that
00029   StgDriver(ConfigFile* cf, int section);
00030   
00031   // Destructor
00032   ~StgDriver(void);
00033   
00034   // Must implement the following methods.
00035   int Setup();
00036   int Shutdown();
00037   
00038   int Subscribe(player_device_id_t id);
00039   int Unsubscribe(player_device_id_t id);
00040   
00042   void Main();
00043   
00046   void Update();
00047   
00048   // override the Driver method to grab configs inside the server thread
00049   //int PutConfig(player_device_id_t id, void *client, 
00050   //            void* src, size_t len,
00051   //            struct timeval* timestamp);
00052   
00054   static stg_world_t* world;
00055   
00057   Interface* LookupDevice( player_device_id_t id );
00058   
00059   stg_model_t* LocateModel( const char* basename, 
00060                             stg_model_type_t mod_type );
00061   
00062  protected: 
00063   
00065   GPtrArray* devices;  
00066 };
00067 
00068 
00069 #endif

Generated on Thu Dec 13 14:35:18 2007 for Stage by  doxygen 1.4.6