SphereDriver Class Reference

List of all members.

Public Member Functions

 SphereDriver (ConfigFile *cf, int section)
int Setup ()
 Initialize the driver.
int Shutdown ()
 Finalize the driver.
virtual void Main ()
 Main method for driver thread.
virtual int ProcessMessage (MessageQueue *resp_queue, player_msghdr *hdr, void *data)
 Message handler.
void ProcessCommand (player_msghdr_t *hdr, player_ptz_cmd_t &data)
void RefreshData ()

Constructor & Destructor Documentation


Member Function Documentation

void SphereDriver::Main (  )  [virtual]

Main method for driver thread.

drivers have their own thread of execution, created using StartThread(); this is the entry point for the driver thread, and must be overloaded by all threaded drivers.

Reimplemented from Driver.

References Driver::ProcessMessages().

int SphereDriver::ProcessMessage ( MessageQueue resp_queue,
player_msghdr hdr,
void *  data 
) [virtual]

Message handler.

This function is called once for each message in the incoming queue. Reimplement it to provide message handling. Return 0 if you handled the message and -1 otherwise

Parameters:
resp_queue The queue to which any response should go.
hdr The message header
data The message body

Reimplemented from Driver.

References Message::MatchMessage(), PLAYER_ERROR1, PLAYER_MSGTYPE_CMD, PLAYER_PTZ_CMD_STATE, player_msghdr::size, and player_msghdr::type.

int SphereDriver::Setup (  )  [virtual]

Initialize the driver.

This function is called with the first client subscribes; it MUST be implemented by the driver.

Returns:
Returns 0 on success.

Implements Driver.

References player_camera_data::format, PlayerCc::max(), PlayerCc::min(), PLAYER_CAMERA_FORMAT_MONO8, PLAYER_CAMERA_FORMAT_RGB888, and PLAYER_ERROR.

int SphereDriver::Shutdown (  )  [virtual]

Finalize the driver.

This function is called with the last client unsubscribes; it MUST be implemented by the driver.

Returns:
Returns 0 on success.

Implements Driver.

References Driver::StopThread().


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

Last updated 12 September 2005 21:38:45