AURobotServers  4
Public Member Functions | Protected Attributes | List of all members
UResLink Class Reference

#include <ureslink.h>

Inheritance diagram for UResLink:
Inheritance graph

Public Member Functions

void connectionLost (int client)
 
bool isStreamingPoseHist ()
 
UResPoseHistlockPoseHist ()
 
bool setResource (UResBase *resource, bool remove)
 
void setStreamingPoseHist (int client)
 
void unlockPoseHist ()
 
 UResLink ()
 
 ~UResLink ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 

Protected Attributes

UResPoseHistposeHist
 
ULock poseHistLock
 
int poseHistStreamingClient
 

Detailed Description

Small class to hold ressource link pointer and a lock to ensure that the ressource is valid while used

Author
Christian Andersen

Constructor & Destructor Documentation

UResLink::UResLink ( )

Constructor

References poseHist, and poseHistStreamingClient.

UResLink::~UResLink ( )

Destructor

Member Function Documentation

void UResLink::connectionLost ( int  client)

Connection is lost to this client - if ant cleanup is needed

References poseHistStreamingClient.

Referenced by UServerClient::connectionLost(), and setStreamingPoseHist().

bool UResLink::isStreamingPoseHist ( )
inline

Is pose beeing streamed from MRC

References poseHistStreamingClient.

Referenced by UServerClient::resourceUpdated().

UResPoseHist* UResLink::lockPoseHist ( )
inline

Get link to pose hist in a locked state

References ULock::lock(), poseHist, and poseHistLock.

Referenced by UServerClient::resourceUpdated(), and UServerClient::trapMessage().

bool UResLink::setResource ( UResBase resource,
bool  remove 
)

Set ressource (or remove) ressource link. Returns true if the ressource situation is changed.

References UResPoseHist::getOdoPoseID(), UResBase::isA(), ULock::lock(), poseHist, poseHistLock, and ULock::unlock().

Referenced by UServerPort::setResource(), and unlockPoseHist().

void UResLink::setStreamingPoseHist ( int  client)
inline

Set pose streaming client

References connectionLost(), and poseHistStreamingClient.

Referenced by UServerClient::trapMessage().

void UResLink::unlockPoseHist ( )
inline

Unlock pose histort resource

References poseHistLock, setResource(), and ULock::unlock().

Referenced by UServerClient::resourceUpdated(), and UServerClient::trapMessage().

Member Data Documentation

UResPoseHist* UResLink::poseHist
protected

Link to pose hist ressource

Referenced by lockPoseHist(), setResource(), and UResLink().

ULock UResLink::poseHistLock
protected

Ressource lock for the pose hist ressource link.

Referenced by lockPoseHist(), setResource(), and unlockPoseHist().

int UResLink::poseHistStreamingClient
protected

Is pose hist streaming beeing received

Referenced by connectionLost(), isStreamingPoseHist(), setStreamingPoseHist(), and UResLink().


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