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

#include <uclientfuncbase.h>

Inheritance diagram for UClientFuncBase:
Inheritance graph

Public Member Functions

virtual void changedNamespace (const char *newNamespace)
 
virtual const char * commandList ()
 
virtual void doTimeTick ()
 
int getMsgCnt ()
 
bool getVerbose ()
 
virtual void handleNewData (USmlTag *tag, const char *ifname)
 
virtual const char * name ()
 
bool sendMsg (UClientPortSml *cnn, const char *buff, int buffCnt)
 
bool sendMsg (UClientPortSml *cnn, const char *buff)
 
void setVerbose (bool value)
 
 UClientFuncBase ()
 
virtual ~UClientFuncBase ()
 

Public Attributes

ULock decodeLock
 

Protected Member Functions

void handleHelp (USmlTag *tag)
 
void printReply (USmlTagIn *tag, const char *preString)
 

Protected Attributes

int msgHandled
 
char serverNamespace [MAX_SML_NAME_LENGTH]
 
int serverNamespaceValue
 
bool verboseMessages
 

Detailed Description

The client data structure for a given server function is a decendent of this class. The class holds the basic functionality and some basic variables.

Author
Christian Andersen

Constructor & Destructor Documentation

UClientFuncBase::UClientFuncBase ( )

Constructor

UClientFuncBase::~UClientFuncBase ( )
virtual

Destructor

Member Function Documentation

void UClientFuncBase::changedNamespace ( const char *  newNamespace)
virtual

The server has set (or changed) the namespace

Reimplemented in UClientFuncLaser, and UClientFuncImage.

References MAX_SML_NAME_LENGTH.

Referenced by UClientHandler::gotNewData().

const char * UClientFuncBase::commandList ( )
virtual

Function, that shall return a string with all handled commands, i.e. should return "gmk gmk2d guidemark", if commands starting with any of these three keywords are handled by this function

Reimplemented in UResNavIfMan, UResPoly, UResLaserIfRoad, UClientFuncLaser, UResIfVar, UResPcp, UResLaserIfScan, UResLaserIfSf, UResBin, UResLaserIfObst, UClientFuncGmk, UClientFuncImage, UClientFuncObstGrp, UClientFuncPath, UClientFuncCam, UClientFuncPath, UClientFuncSF, and UClientFuncSimScan.

Referenced by UClientHandler::addFunction(), and UClientHandler::gotNewData().

void UClientFuncBase::doTimeTick ( )
virtual

A time tick function that is called evert 0.1 second of the line is idle

Reimplemented in UClientFuncLaserGui, UClientFuncImgGui, and UResCamIfImg.

int UClientFuncBase::getMsgCnt ( )
inline

Get connection pointer for connection functions Get number of handled messages by this data handler resource

bool UClientFuncBase::getVerbose ( )
inline

Set verbose messages - mostly for debug purpose

void UClientFuncBase::handleHelp ( USmlTag tag)
protected
void UClientFuncBase::handleNewData ( USmlTag tag,
const char *  ifname 
)
virtual
const char * UClientFuncBase::name ( )
virtual

Name of function The returned name is intended as informative to clients and should include a version number

Reimplemented in UResNavIfMan, UClientFuncLaser, UResIfVar, UClientFuncGmk, UClientFuncImage, UClientFuncObstGrp, UClientFuncPath, UClientFuncCam, UClientFuncPath, UClientFuncSF, and UClientFuncSimScan.

Referenced by UResPcp::commandList(), UFunctionLaserIfScan::handleLaserIf(), and UResLaserIfObst::print().

void UClientFuncBase::printReply ( USmlTagIn tag,
const char *  preString 
)
protected
bool UClientFuncBase::sendMsg ( UClientPortSml cnn,
const char *  buff,
int  buffCnt 
)
inline

Send data to the server (thread-safe)

References UClientPort::blockSend().

bool UClientFuncBase::sendMsg ( UClientPortSml cnn,
const char *  buff 
)
inline

Send data to the server (thread-safe)

void UClientFuncBase::setVerbose ( bool  value)
inline

Set connection pointer for server communication Set verbose messages - mostly for debug purpose

Referenced by clientCmdLine(), UFunctionIf::createResources(), UFunctionCamData::handleCommand(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), and testSmlClient().

Member Data Documentation

ULock UClientFuncBase::decodeLock

Data decode lock, to ensure that a data handler used by more than one interface is not decoding two messages at the same time. This could be the case for obstacles from laser scanner and vision interfaces. Is locked by the client handler befor the call to 'handleNewData(...)'

Referenced by UClientHandler::gotNewData().

int UClientFuncBase::msgHandled
protected
char UClientFuncBase::serverNamespace[MAX_SML_NAME_LENGTH]
protected
int UClientFuncBase::serverNamespaceValue
protected

Server namespace value legal values are determined by client, E.g. laser scanner server ulmsserver may use value 2, but 2 can be used by e.g. ucamserver too. and is a translation from serverNamespace 0 = not supported

Referenced by UClientFuncImage::changedNamespace(), UClientFuncLaser::changedNamespace(), UClientFuncLaserGui::paintPlannerData(), UClientFuncLaserGui::paintWpc(), and UClientFuncLaserGui::UClientFuncLaserGui().

bool UClientFuncBase::verboseMessages
protected

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