player_interfaces.h
Go to the documentation of this file.00001 #ifndef _STAGE_PLAYER_INTERFACES_H 00002 #define _STAGE_PLAYER_INTERFACES_H 00003 00004 #include "player_driver.h" 00005 00006 class Interface 00007 { 00008 public: 00009 Interface( player_device_id_t id, StgDriver* driver,ConfigFile* cf, int section ); 00010 00011 virtual ~Interface( void ){ /* TODO: clean up*/ }; 00012 00013 player_device_id_t id; 00014 stg_model_t* mod; 00015 00016 StgDriver* driver; // the driver instance that created this device 00017 00018 size_t data_len; 00019 size_t cmd_len; 00020 size_t req_qlen; 00021 size_t rep_qlen; 00022 00023 // pure virtual methods 00024 virtual void Command( void* buffer, size_t len ){}; // empty implementation 00025 virtual void Configure( void* client, void* buffer, size_t len ){}; // empty implementation 00026 virtual void Publish( void ){}; // empty implementation 00027 }; 00028 00029 00030 class InterfaceSimulation : public Interface 00031 { 00032 public: 00033 InterfaceSimulation( player_device_id_t id, StgDriver* driver,ConfigFile* cf, int section ); 00034 virtual ~InterfaceSimulation( void ){ /* TODO: clean up*/ }; 00035 00036 //virtual void Command( void* buffer, size_t len ); 00037 virtual void Configure( void* client, void* buffer, size_t len ); 00038 }; 00039 00040 00041 class InterfaceModel : public Interface 00042 { 00043 public: 00044 InterfaceModel( player_device_id_t id, 00045 StgDriver* driver, 00046 ConfigFile* cf, 00047 int section, 00048 stg_model_type_t modtype ); 00049 00050 virtual ~InterfaceModel( void ){ /* TODO: clean up*/ }; 00051 }; 00052 00053 class InterfacePosition : public InterfaceModel 00054 { 00055 public: 00056 InterfacePosition( player_device_id_t id, StgDriver* driver, ConfigFile* cf, int section ); 00057 virtual ~InterfacePosition( void ){ /* TODO: clean up*/ }; 00058 virtual void Command( void* buffer, size_t len ); 00059 virtual void Configure( void* client, void* buffer, size_t len ); 00060 virtual void Publish( void ); 00061 }; 00062 00063 class InterfaceLaser : public InterfaceModel 00064 { 00065 public: 00066 InterfaceLaser( player_device_id_t id, StgDriver* driver, ConfigFile* cf, int section ); 00067 virtual ~InterfaceLaser( void ){ /* TODO: clean up*/ }; 00068 //virtual void Command( void* buffer, size_t len ); 00069 virtual void Configure( void* client, void* buffer, size_t len ); 00070 virtual void Publish( void ); 00071 }; 00072 00073 class InterfaceFiducial : public InterfaceModel 00074 { 00075 public: 00076 InterfaceFiducial( player_device_id_t id, StgDriver* driver, ConfigFile* cf, int section ); 00077 virtual ~InterfaceFiducial( void ){ /* TODO: clean up*/ }; 00078 //virtual void Command( void* buffer, size_t len ); 00079 virtual void Configure( void* client, void* buffer, size_t len ); 00080 virtual void Publish( void ); 00081 }; 00082 00083 class InterfaceBlobfinder : public InterfaceModel 00084 { 00085 public: 00086 InterfaceBlobfinder( player_device_id_t id, StgDriver* driver, ConfigFile* cf, int section ); 00087 virtual ~InterfaceBlobfinder( void ){ /* TODO: clean up*/ }; 00088 //virtual void Command( void* buffer, size_t len ); 00089 virtual void Configure( void* client, void* buffer, size_t len ); 00090 virtual void Publish( void ); 00091 }; 00092 00093 class InterfaceSonar : public InterfaceModel 00094 { 00095 public: 00096 InterfaceSonar( player_device_id_t id, StgDriver* driver, ConfigFile* cf, int section ); 00097 virtual ~InterfaceSonar( void ){ /* TODO: clean up*/ }; 00098 //virtual void Command( void* buffer, size_t len ); 00099 virtual void Configure( void* client, void* buffer, size_t len ); 00100 virtual void Publish( void ); 00101 }; 00102 00103 00104 // declare a raft of functions that interface between Player and Stage interfaces 00105 00106 00107 // POSITION INTERFACE 00108 //void PositionCommand( Interface* device, void* buffer, size_t len ); 00109 //void PositionData( Interface* device, void* data, size_t len ); 00110 //int PositionData( stg_model_t* mod, char* name, void* data, size_t len, void* userp ); 00111 //void PositionConfig( Interface* device, void* client, void* buffer, size_t len ); 00112 00113 // LOCALIZE INTERFACE 00114 //void LocalizeCommand( Interface* device, void* buffer, size_t len ); 00115 //void LocalizeData( Interface* device, void* data, size_t len ); 00116 //void LocalizeConfig( Interface* device, void* client, void* buffer, size_t len ); 00117 00118 // SONAR INTERFACE 00119 //void SonarData( Interface* device, void* data, size_t len ); 00120 //void SonarConfig( Interface* device, void* client, void* buffer, size_t len ); 00121 00122 // ENERGY INTERFACE 00123 //void EnergyData( Interface* device, void* data, size_t len ); 00124 //void EnergyConfig( Interface* device, void* client, void* buffer, size_t len ); 00125 00126 // SIMULATION INTERFACE 00127 //void SimulationData( Interface* device, void* data, size_t len ); 00128 //void SimulationConfig( player_device_id_t id, void* client, void* buffer, size_t len); 00129 00130 // BLOBFINDER INTERFACE 00131 //void BlobfinderData( Interface* device, void* data, size_t len ); 00132 //void BlobfinderConfig( Interface* device, void* client, void* buffer, size_t len); 00133 00134 // LASER INTERFACE 00135 //void LaserConfig( Interface* device, void* client, void* buffer, size_t len ); 00136 //int LaserData( stg_model_t* mod, char* name, void* data, size_t len, void* userp ); 00137 00138 // GRIPPER INTERFACE 00139 //void GripperCommand( Interface* device, void* src, size_t len ); 00140 //void GripperConfig( Interface* device, void* client, void* buffer, size_t len ); 00141 //void GripperData( Interface* device, void* data, size_t len ); 00142 00143 // FIDUCIAL INTERFACE 00144 //void FiducialData( Interface* device, void* data, size_t len ); 00145 //int FiducialData( stg_model_t* mod, char* name, void* data, size_t len, void* userp ); 00146 //void FiducialConfig( Interface* device, void* client, void* buffer, size_t len ); 00147 00148 // MAP INTERFACE 00149 //void MapData( Interface* device, void* data, size_t len ); 00150 //void MapConfig( Interface* device, void* client, void* buffer, size_t len); 00151 //void MapConfigInfo( Interface* device, void* client, void* buffer, size_t len); 00152 //void MapConfigData( Interface* device, void* client, void* buffer, size_t len); 00153 00154 00155 #endif
Generated on Thu Aug 11 13:08:10 2005 for Stage by 1.4.0