|
StageDevice Class Reference#include <stagedevice.h>
Inherits Driver.
List of all members.
Constructor & Destructor Documentation
Member Function Documentation
int StageDevice::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. |
int StageDevice::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. |
size_t StageDevice::GetData |
( |
player_device_id_t |
id, |
|
|
void * |
dest, |
|
|
size_t |
len, |
|
|
struct timeval * |
timestamp |
|
) |
[virtual] |
|
|
Read data from the driver.
This function will usually be called by the server. - Parameters:
-
id | Specifies the device to be read. |
dest | Pointer to data destination buffer. |
len | Size of the data destination buffer (bytes). |
timestamp | If non-null, will be filled with the data timestamp. |
- Returns:
- Returns the number of bytes written to the destination buffer.
Reimplemented from Driver. |
void StageDevice::PutCommand |
( |
player_device_id_t |
id, |
|
|
void * |
src, |
|
|
size_t |
len, |
|
|
struct timeval * |
timestamp |
|
) |
[virtual] |
|
|
Write a new command to the driver.
This function will usually be called by the server. - Parameters:
-
id | Specifies the device to be written. |
src | Pointer to command source buffer. |
len | Length of the command (bytes). |
timestamp | Command timestamp; if NULL, the current server time will be used. |
Reimplemented from Driver. |
void StageDevice::Update |
( |
void |
|
) |
[virtual] |
|
|
Update non-threaded drivers.
This method is called once per loop (in Linux, probably either 50Hz or 100Hz) by the server. Threaded drivers can use the default implementation, which does nothing. Non-threaded drivers should do whatever they have to do, and call PutData() when they have new data.
Reimplemented from Driver. |
Member Data Documentation
The documentation for this class was generated from the following files:
Generated on Tue May 3 14:16:07 2005 for Player by 1.3.6
|