AURobotServers
4
|
#include <uclientfuncbase.h>
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 |
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.
UClientFuncBase::UClientFuncBase | ( | ) |
Constructor
|
virtual |
Destructor
|
virtual |
The server has set (or changed) the namespace
Reimplemented in UClientFuncLaser, and UClientFuncImage.
References MAX_SML_NAME_LENGTH.
Referenced by UClientHandler::gotNewData().
|
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().
|
virtual |
A time tick function that is called evert 0.1 second of the line is idle
Reimplemented in UClientFuncLaserGui, UClientFuncImgGui, and UResCamIfImg.
|
inline |
Get connection pointer for connection functions Get number of handled messages by this data handler resource
|
inline |
Set verbose messages - mostly for debug purpose
|
protected |
Print help messages
References UQevent::consoleReply(), USmlTagIn::getAttValue(), USmlTag::getNextTag(), USmlTagIn::getTagName(), USmlTagIn::isAStartTag(), USmlTagIn::isTagAnEnd(), USmlTagIn::isValid(), USmlTagIn::print(), qevent, and xml2str().
|
virtual |
Got fresh data destined to this function.
tag | is new data to handle |
ifname | is name of interface received tag |
Reimplemented in UResNavIfMan, UResPoly, UResLaserIfRoad, UClientFuncLaser, UResIfVar, UResPcp, UResLaserIfSf, UResLaserIfScan, UResBin, UResLaserIfObst, UClientFuncGmk, UClientFuncImage, UClientFuncObstGrp, UClientFuncPath, UClientFuncCam, UClientFuncPath, UClientFuncSF, and UClientFuncSimScan.
References USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::print(), and USmlTag::skipToEndTag().
Referenced by UClientHandler::gotNewData().
|
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().
|
protected |
Just print reply on console with the prestring
References USmlTagIn::getNextAttribute(), USmlTagIn::getTagName(), USmlTagIn::isAFullTag(), and MAX_SML_NAME_LENGTH.
Referenced by UClientFuncSimScan::handleNewData(), UClientFuncPath::handleNewData(), UClientFuncSF::handleNewData(), UClientFuncCam::handleNewData(), UClientFuncObstGrp::handleNewData(), UClientFuncImage::handleNewData(), UResLaserIfObst::handleNewData(), UResLaserIfScan::handleNewData(), UResLaserIfSf::handleNewData(), UClientFuncLaser::handleNewData(), and UClientFuncPath::handlePathPolygonData().
|
inline |
Send data to the server (thread-safe)
References UClientPort::blockSend().
|
inline |
Send data to the server (thread-safe)
|
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().
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().
|
protected |
Number of messages handled
Referenced by UClientFuncGmk::handleNewData(), UResLaserIfObst::handleNewData(), and UResIfVar::handleNewData().
|
protected |
Server namespace tag
Referenced by UClientFuncImage::changedNamespace(), and UClientFuncLaser::changedNamespace().
|
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().
|
protected |
Pointer to the communication port, where transmissions and data are exchanged with server Print pore information when relevant
Referenced by UClientFuncLaser::handleGetComplexData(), UClientFuncImage::handleImages(), UClientFuncSF::handleNewData(), UClientFuncObstGrp::handleNewData(), UResLaserIfScan::handleNewData(), UResLaserIfSf::handleNewData(), UClientFuncLaser::handleNewData(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncLaser::handlePath(), UClientFuncLaser::handleVarData(), UResCamIfGmk::newDataAvailable(), UClientFuncLaserGui::saveImage(), UResCamIfGmk::UResCamIfGmk(), UResCamIfImg::UResCamIfImg(), UResCamIfPath::UResCamIfPath(), and UResIfVar::UResIfVar().