AURobotServers
4
|
#include <ureslink.h>
Public Member Functions | |
void | connectionLost (int client) |
bool | isStreamingPoseHist () |
UResPoseHist * | lockPoseHist () |
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 | |
UResPoseHist * | poseHist |
ULock | poseHistLock |
int | poseHistStreamingClient |
Small class to hold ressource link pointer and a lock to ensure that the ressource is valid while used
UResLink::UResLink | ( | ) |
Constructor
References poseHist, and poseHistStreamingClient.
UResLink::~UResLink | ( | ) |
Destructor
void UResLink::connectionLost | ( | int | client | ) |
Connection is lost to this client - if ant cleanup is needed
References poseHistStreamingClient.
Referenced by UServerClient::connectionLost(), and setStreamingPoseHist().
|
inline |
Is pose beeing streamed from MRC
References poseHistStreamingClient.
Referenced by UServerClient::resourceUpdated().
|
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().
|
inline |
Set pose streaming client
References connectionLost(), and poseHistStreamingClient.
Referenced by UServerClient::trapMessage().
|
inline |
Unlock pose histort resource
References poseHistLock, setResource(), and ULock::unlock().
Referenced by UServerClient::resourceUpdated(), and UServerClient::trapMessage().
|
protected |
Link to pose hist ressource
Referenced by lockPoseHist(), setResource(), and UResLink().
|
protected |
Ressource lock for the pose hist ressource link.
Referenced by lockPoseHist(), setResource(), and unlockPoseHist().
|
protected |
Is pose hist streaming beeing received
Referenced by connectionLost(), isStreamingPoseHist(), setStreamingPoseHist(), and UResLink().