PlayerCc::ClientProxy Class Reference
[Core functionality]
#include <playerc++.h>
Inherited by PlayerCc::ActArrayProxy, PlayerCc::AioProxy, PlayerCc::BlobfinderProxy, PlayerCc::BumperProxy, PlayerCc::CameraProxy, PlayerCc::DioProxy, PlayerCc::FiducialProxy, PlayerCc::GpsProxy, PlayerCc::Graphics2dProxy, PlayerCc::GripperProxy, PlayerCc::IrProxy, PlayerCc::LaserProxy, PlayerCc::LimbProxy, PlayerCc::LocalizeProxy, PlayerCc::LogProxy, PlayerCc::MapProxy, PlayerCc::PlannerProxy, PlayerCc::Position2dProxy, PlayerCc::Position3dProxy, PlayerCc::PowerProxy, PlayerCc::PtzProxy, PlayerCc::RFIDProxy, PlayerCc::SimulationProxy, PlayerCc::SonarProxy, PlayerCc::SpeechProxy, and PlayerCc::WiFiProxy.
Detailed Description
The client proxy base class.
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.
Since the ConnectReadSignal() and DisconnectReadSignal() member functions are based on the Boost signals library, they are conditionally available depending on Boost's presence in the system. See the configure script for more information.
Public Types | |
typedef int | connection_t |
typedef boost::mutex::scoped_lock | scoped_lock_t |
typedef int | read_signal_t |
Public Member Functions | |
bool | IsValid () const |
Returns true if we have received any data from the device. | |
bool | IsFresh () const |
Fresh is set to true on each new read. It is up to the user to set it to false if the data has already been read. This is most useful when used in conjunction with the PlayerMultiClient. | |
void | NotFresh () |
This states that the data in a client is currently not Fresh. | |
std::string | GetDriverName () const |
Returns the driver name. | |
double | GetDataTime () const |
Returns the received timestamp [s]. | |
double | GetElapsedTime () const |
Returns the received timestamp [s]. | |
uint | GetIndex () const |
Returns device index. | |
uint | GetInterface () const |
Returns device interface. | |
std::string | GetInterfaceStr () const |
Returns device interface. | |
template<typename T> | |
connection_t | ConnectReadSignal (T aSubscriber) |
Connect a signal to this proxy For more information check out Signals & multithreading. | |
void | DisconnectReadSignal (connection_t aSubscriber) |
Disconnect a signal to this proxy. | |
Protected Member Functions | |
ClientProxy (PlayerClient *aPc, uint aIndex) | |
virtual void | Subscribe (uint aIndex) |
virtual void | Unsubscribe () |
template<typename T> | |
T | GetVar (const T &aV) const |
template<typename T> | |
void | GetVarByRef (const T aBegin, const T aEnd, T aDest) const |
Protected Attributes | |
PlayerClient * | mPc |
playerc_client_t * | mClient |
playerc_device_t * | mInfo |
bool | mFresh |
Member Function Documentation
|
Returns the driver name.
|
The documentation for this class was generated from the following file: