StgDriver Class Reference

#include <p_driver.h>

List of all members.


Public Member Functions

stg_model_t * LocateModel (const char *basename, stg_model_type_t mod_type)
StgModelLocateModel (char *basename, player_devaddr_t *addr, char *typestr)
InterfaceLookupDevice (player_device_id_t id)
 find the device record with this Player id
InterfaceLookupDevice (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 StgWorldworld = 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 
)

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 
)

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]

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]

int StgDriver::Unsubscribe ( player_device_id_t  id  ) 

int StgDriver::Unsubscribe ( player_devaddr_t  addr  )  [virtual]

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


The documentation for this class was generated from the following files:

Generated on Thu Jan 7 17:42:17 2010 for Stage by  doxygen 1.5.5