|
#include <playerclient.h>
Inherited by AIOProxy, AudioDSPProxy, AudioMixerProxy, AudioProxy, BlinkenlightProxy, BlobfinderProxy, BumperProxy, CameraProxy, DIOProxy, EnergyProxy, FiducialProxy, GpsProxy, GripperProxy, IRProxy, LaserProxy, LocalizeProxy, LogProxy, MapProxy, MComProxy, MotorProxy, PlannerProxy, Position2DProxy, Position3DProxy, PositionProxy, PowerProxy, PtzProxy, SimulationProxy, SonarProxy, SoundProxy, SpeechProxy, SpeechRecognitionProxy, TruthProxy, WaveformProxy, and WiFiProxy.
List of all members.
Detailed Description
Base class for all proxy devices. Access to a device is provided by a device-specific proxy class. These classes all inherit from the ClientProxy class which defines an interface for device proxies. As such, a few methods are common to all devices and we explain them here.
Constructor & Destructor Documentation
ClientProxy::ClientProxy |
( |
PlayerClient * |
pc, |
|
|
unsigned short |
req_device, |
|
|
unsigned short |
req_index, |
|
|
unsigned char |
req_access = 'c' |
|
) |
|
|
|
This constructor will try to get access to the device, unless req_device is 0 or req_access is 'c'. The pointer pc must refer to an already connected PlayerClient proxy. The index indicates which one of the devices to use (usually 0). Note that a request executed by this the constructor can fail, but the constructor cannot indicate the failure. Thus, if you request a particular access mode, you should verify that the current access is identical to your requested access using GetAccess() . In any case, you can use ChangeAccess() later to change your access mode for the device. |
Member Function Documentation
unsigned char ClientProxy::GetAccess |
( |
|
) |
[inline] |
|
|
Returns the current access mode for the device. |
int ClientProxy::ChangeAccess |
( |
unsigned char |
req_access, |
|
|
unsigned char * |
grant_access = NULL |
|
) |
|
|
|
Request different access for the device. If grant_access is non-NULL, then it is filled in with the granted access. Returns 0 on success, -1 otherwise. |
int ClientProxy::Close |
( |
|
) |
[inline] |
|
|
Convenience method for requesting 'c' access. |
virtual void ClientProxy::FillData |
( |
player_msghdr_t |
hdr, |
|
|
const char * |
buffer |
|
) |
[virtual] |
|
|
All proxies must provide this method. It is used internally to parse new data when it is received.
Reimplemented in AIOProxy, GpsProxy, GripperProxy, SoundProxy, FiducialProxy, LaserProxy, LocalizeProxy, MotorProxy, PositionProxy, Position2DProxy, Position3DProxy, PtzProxy, SonarProxy, TruthProxy, BlobfinderProxy, IRProxy, WiFiProxy, PowerProxy, AudioProxy, AudioDSPProxy, AudioMixerProxy, BumperProxy, DIOProxy, WaveformProxy, MComProxy, BlinkenlightProxy, CameraProxy, PlannerProxy, EnergyProxy, MapProxy, SpeechRecognitionProxy, SimulationProxy, and LogProxy. |
virtual void ClientProxy::Print |
( |
|
) |
[virtual] |
|
|
All proxies SHOULD provide this method, which should print out, in a human-readable form, the device's current state.
Reimplemented in AIOProxy, GpsProxy, GripperProxy, SoundProxy, FiducialProxy, LaserProxy, LocalizeProxy, MotorProxy, PositionProxy, Position2DProxy, Position3DProxy, PtzProxy, SonarProxy, TruthProxy, BlobfinderProxy, IRProxy, WiFiProxy, PowerProxy, AudioProxy, AudioDSPProxy, AudioMixerProxy, BumperProxy, DIOProxy, WaveformProxy, MComProxy, BlinkenlightProxy, CameraProxy, EnergyProxy, SimulationProxy, and LogProxy. |
int ClientProxy::Lock |
( |
|
) |
|
|
|
Methods for providing the ability to achieve thread safety, the class is not thread safe without additional protection in the client app. if PLAYERCLIENT_THREAD is not defined then Lock and Unlock do nothing and always succeed These are called by the playerclient during a read if data is to be updated |
int ClientProxy::Unlock |
( |
|
) |
|
|
Friends And Related Function Documentation
Member Data Documentation
|
The controlling client object. |
|
Have we yet received any data from this device? |
|
Flag set if data has just been read into this device. If you use it, you must set it to false yourself after examining the data. |
|
the last message header and body will be copied here by StoreData(), so that it's available for later use. |
|
The name of the driver used to implement this device in the server. |
|
Time at which this data was generated by the device. |
|
Time at which this data was sent by the server. |
|
Time at which this data was received by the client. |
The documentation for this class was generated from the following file:
Generated on Tue May 3 14:15:48 2005 for Player by 1.3.6
|