StgDriver Class Reference
#include <p_driver.h>
Public Member Functions | |
| stg_model_t * | LocateModel (const char *basename, stg_model_type_t mod_type) |
| StgModel * | LocateModel (char *basename, player_devaddr_t *addr, char *typestr) |
| Interface * | LookupDevice (player_device_id_t id) |
| find the device record with this Player id | |
| Interface * | LookupDevice (player_devaddr_t addr) |
| find the device record with this Player id | |
| void | Main () |
| Main function for device thread. | |
| virtual int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
| int | Setup () |
| virtual int | Setup () |
| int | Shutdown () |
| virtual int | Shutdown () |
| StgDriver (ConfigFile *cf, int section) | |
| StgDriver (ConfigFile *cf, int section) | |
| int | Subscribe (player_device_id_t id) |
| virtual int | Subscribe (player_devaddr_t addr) |
| int | Unsubscribe (player_device_id_t id) |
| virtual int | Unsubscribe (player_devaddr_t addr) |
| void | Update () |
| virtual void | Update () |
| ~StgDriver (void) | |
| ~StgDriver (void) | |
Static Public Attributes | |
| static stg_world_t * | world |
| all player devices share the same Stage world | |
| static StgWorld * | world = NULL |
| all player devices share the same Stage world (for now) | |
Protected Attributes | |
| GPtrArray * | devices |
| an array of pointers to device_record_t structs, defined below | |
| GPtrArray * | devices |
| an array of pointers to Interface objects, defined below | |
Constructor & Destructor Documentation
| StgDriver::StgDriver | ( | ConfigFile * | cf, | |
| int | section | |||
| ) |
References Interface::addr, devices, DRIVER_ERROR, player_quiet_startup, PRINT_ERR1, and PRINT_ERR3.
| StgDriver::~StgDriver | ( | void | ) |
| StgDriver::StgDriver | ( | ConfigFile * | cf, | |
| int | section | |||
| ) |
| StgDriver::~StgDriver | ( | void | ) |
Member Function Documentation
| stg_model_t* StgDriver::LocateModel | ( | const char * | basename, | |
| stg_model_type_t | mod_type | |||
| ) |
| StgModel * StgDriver::LocateModel | ( | char * | basename, | |
| player_devaddr_t * | addr, | |||
| char * | typestr | |||
| ) |
References Stg::StgWorld::GetModel(), Stg::StgModel::GetUnsubscribedModelOfType(), PRINT_ERR1, and world.
Referenced by InterfaceModel::InterfaceModel().
| Interface* StgDriver::LookupDevice | ( | player_device_id_t | id | ) |
find the device record with this Player id
| Interface * StgDriver::LookupDevice | ( | player_devaddr_t | addr | ) |
find the device record with this Player id
References Interface::addr, and devices.
Referenced by ProcessMessage(), Subscribe(), and Unsubscribe().
| void StgDriver::Main | ( | ) |
Main function for device thread.
| int StgDriver::ProcessMessage | ( | QueuePointer & | resp_queue, | |
| player_msghdr * | hdr, | |||
| void * | data | |||
| ) | [virtual] |
References LookupDevice(), PRINT_WARN3, and Interface::ProcessMessage().
| int StgDriver::Setup | ( | ) |
| int StgDriver::Setup | ( | ) | [virtual] |
| int StgDriver::Shutdown | ( | ) |
| int StgDriver::Shutdown | ( | void | ) | [virtual] |
| int StgDriver::Subscribe | ( | player_device_id_t | id | ) |
| int StgDriver::Subscribe | ( | player_devaddr_t | addr | ) | [virtual] |
References LookupDevice(), and Interface::Subscribe().
| int StgDriver::Unsubscribe | ( | player_device_id_t | id | ) |
| int StgDriver::Unsubscribe | ( | player_devaddr_t | addr | ) | [virtual] |
References LookupDevice(), and Interface::Unsubscribe().
| void StgDriver::Update | ( | ) |
The server thread calls this method frequently. We use it to check for new commands and configs
| void StgDriver::Update | ( | void | ) | [virtual] |
The server thread calls this method frequently. We use it to check for new commands and configs
References Interface::addr, devices, GlobalTime, Interface::last_publish_time, Interface::Publish(), Interface::publish_interval_msec, Stg::StgWorld::RealTimeUpdate(), and world.
Member Data Documentation
GPtrArray* StgDriver::devices [protected] |
an array of pointers to device_record_t structs, defined below
GPtrArray* StgDriver::devices [protected] |
an array of pointers to Interface objects, defined below
Referenced by LookupDevice(), StgDriver(), and Update().
stg_world_t* StgDriver::world [static] |
all player devices share the same Stage world
StgWorld * StgDriver::world = NULL [static] |
all player devices share the same Stage world (for now)
Referenced by StTime::GetTime(), StTime::GetTimeDouble(), InterfaceSimulation::InterfaceSimulation(), LocateModel(), InterfaceSimulation::ProcessMessage(), and Update().
The documentation for this class was generated from the following files:
Generated on Thu Jan 7 17:42:17 2010 for Stage by
1.5.5
