AURobotServers
4
|
#include <ufunctionbase.h>
Public Member Functions | |
bool | addResource (UResBase *resource, UFunctionBase *owner) |
void | closeLogfile () |
virtual const char * | commandList () |
virtual void | createResources () |
const char * | getAliasName () |
const char * | getLoadedFileName () |
void * | getLoadedModuleRef () |
virtual bool | gotAllResources (char *missingThese, int missingTheseCnt) |
bool | isMine (const char *cmdName) |
bool | isStatic () |
is the module loaded as static A module is static if the ldFilename has a length of zero. More... | |
virtual const char * | name () |
bool | newCmd (UServerInMsg *newMsg, UDataBase *extra) |
bool | newCommand (UServerInMsg *newMsg, void *extra) |
bool | openLogfile (const char *name) |
void | print (const char *preString) |
virtual void | resourceUpdated () |
bool | sendEndTag (UServerInMsg *msg) |
bool | sendEndTag () |
bool | sendFullTag (const char *attributes) |
bool | sendHelpDone (UServerInMsg *msg) |
bool | sendHelpDone () |
bool | sendHelpStart (UServerInMsg *msg, const char *subject) |
bool | sendHelpStart (const char *subject) |
bool | sendHelpStart () |
bool | sendMsg (UServerInMsg *msg, const char *message, int size) |
bool | sendMsg (const char *message) |
bool | sendMsg (UServerInMsg *msg, const char *message) |
bool | sendMsg (int clientIdx, const char *message, int size) |
bool | sendMsgInt (int clientIdx, const char *message) |
bool | sendStartTag (const char *attributes) |
bool | sendText (UServerInMsg *msg, const char *text) |
bool | sendText (const char *text) |
virtual void | setAliasName (const char *name) |
virtual void | setCommand (const char *cmdList, const char *name, const char *note) |
void | setLoadedModuleRef (void *module, const char *moduleFileName) |
virtual void | setLoadTime (UTime) |
void | setName (const char *name) |
virtual bool | setResource (UResBase *resource, bool remove) |
void | setVerbose (bool value) |
UFunctionBase () | |
virtual | ~UFunctionBase () |
Public Member Functions inherited from UCallBack | |
bool | addOnEvent (UOnEvent *dataObject) |
virtual bool | onEvent (const char *interface, const char *dataType, void *data) |
UCallBack () | |
virtual | ~UCallBack () |
Public Member Functions inherited from UResVarPool | |
int | addMethod (const char *formalName, const char *paramTypes, const char *comment) |
int | addMethodV (const char *formalName, const char *paramTypes, const char *comment) |
UVarPool * | addStruct (const char *name, const char *comment, bool copy=false) |
UVariable * | addVar (const char *name, const double initialValue, const char *type, const char *comment) |
UVariable * | addVar (const char *name, const char *initialValue, const char *type, const char *comment) |
UVariable * | addVarA (const char *name, const char *initialValue, const char *type, const char *comment) |
bool | callGlobal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt) |
bool | callGlobalV (const char *name, const char *paramOrder, UVariable **params, UDataBase **returnStruct, int *returnStructCnt) |
Call a method from the root var pool scope It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More... | |
bool | callLocal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt) |
bool | callVS (const char *function, const char *stringParam) |
int | callVSCD (const char *function, const char *strPar, UDataBase *data, int cooSys) |
void | createBaseVar () |
virtual bool | createVarSpace (const int varCnt, const int structCnt, const int methCnt, const char *note, bool copy=false) |
bool | getGlobalString (const char *name, const char **value) |
bool | getGlobalValue (const char *name, double *value) |
bool | getGlobalValue (const char *name, const char **value) |
bool | getGlobalValue (const char *name, bool *value) |
bool | getGlobalValue (const char *name, UTime *value) |
bool | getLocalValue (const char *name, double *value) |
get a value in this variable tree More... | |
bool | getLocalValue (const char *name, bool *value) |
bool | getLocalValue (const char *name, UTime *value) |
double | getLocalValue (int idx) |
UPosition | getLocalValue3D (int idx) |
UPosRot | getLocalValue6D (int idx) |
bool | getLocalValueBool (int idx) |
int | getLocalValueInt (int idx) |
UTime | getLocalValueTime (int idx) |
const char * | getLogFileName () |
const char * | getVarDescription (int idx) |
UVarCalc * | getVarPool () |
bool | isLogFileOpen () |
bool | isLogFileOpen (const char *structName) |
bool | isVarPoolUpdated (int lastCnt, int *newCnt) |
void | logFileClose () |
bool | logFileOpen () |
void | logFileStart (const char *structName, bool open) |
virtual bool | methodCall (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct=NULL, int *returnStructCnt=NULL) |
virtual const char * | print (const char *preString, char *buff, int buffCnt) |
bool | setGlobalVar (const char *name, const double value, bool mayAdd) |
Assigns a value to a variable. The variable may be a part of a structure. More... | |
bool | setLocalVar (int idx, double value, const int element) |
bool | setLocalVar (const char *name, const double value, bool mayAdd) |
Assigns a value to a variable. The variable may be a part of a structure. More... | |
bool | setLocalVar3D (int idx, UPosition *value) |
bool | setLocalVar6D (int idx, UPosRot *value) |
bool | setLocalVarAdd (int idx, double value, const int element) |
bool | setLocalVarPose (int idx, UPose *value) |
void | setVarPool (UVarCalc *sharedVarPool) |
int | updateQTvars (int structIdx) |
UResVarPool () | |
virtual | ~UResVarPool () |
Public Member Functions inherited from UResBase | |
void | createReplayVar (UVarPool *pool) |
UCmdExe * | getCorePointer () |
char * | getLogFileName (char *fn, const int fnCnt) |
int | getResFuncIdx () |
const char * | getResID () |
int | getResVersion () |
bool | isA (const char *idStr) |
bool | isAlsoA (const char *id) |
virtual void | saveSettings () |
void | setCorePointer (UCmdExe *serverCore) |
void | setResFuncIdx (int idx) |
virtual void | setResID (const char *id, const int version) |
virtual void | stop (bool) |
virtual void | updateReplayStatus () |
UResBase () | |
virtual | ~UResBase () |
Public Member Functions inherited from UReplay | |
void | addChild (UReplay *child) |
virtual bool | decodeReplayLine (char *) |
char * | getLogFileName (char *fn, const int fnCnt) |
char * | getReplayFileName (char *fn, const int fnCnt) |
int | getReplayLogLine () |
bool | isReplay () |
bool | isReplayFileOpen () |
void | removeChild (UReplay *child) |
virtual void | replayAdvanceTime (UTime untilTime) |
void | replaySetBaseFileName (const char *name, const char *preName="") |
void | replaySetFileName (const char *name) |
virtual bool | replayStep () |
int | replayStep (int steps) |
virtual bool | replayToTime (UTime untilTime) |
void | setParent (UReplay *parent) |
bool | setReplay (bool value) |
UReplay () | |
virtual | ~UReplay () |
Public Member Functions inherited from ULock | |
bool | lock () |
void | lockInit () |
void | post () |
bool | tryLock () |
bool | tryWait () |
ULock () | |
void | unlock () |
bool | wait () |
~ULock () | |
Public Member Functions inherited from UVarMethodImplement | |
virtual bool | methodCallV (const char *name, const char *paramOrder, UVariable *params[], UDataBase **returnStruct, int *returnStructCnt) |
virtual | ~UVarMethodImplement () |
Public Attributes | |
bool | silent |
is reply to client and console to be limited More... | |
Public Attributes inherited from UReplay | |
bool | replayTimeAdvancePending |
UTime | replayTimeNow |
Static Public Attributes | |
static const int | MAX_ID_LENGTH = 30 |
static const int | MAX_RESOURCE_LIST_SIZE = 250 |
Protected Member Functions | |
int | getCmdIndex () |
UResBase * | getStaticResource (const char *resName, bool mayCreate, bool staticOnly=true) |
get a pointer to a static resource. More... | |
virtual bool | handleCommand (UServerInMsg *msg, void *extra) |
bool | isClientAlive (int clientIdx, double holdOffTime) |
bool | sendDebug (UServerInMsg *msg, const char *debugText) |
bool | sendDebug (const char *debugText) |
bool | sendError (UServerInMsg *msg, const char *errorText) |
bool | sendError (const char *errorText) |
bool | sendHelp (UServerInMsg *msg, const char *infoText) |
bool | sendHelp (const char *infoText) |
bool | sendInfo (UServerInMsg *msg, const char *infoText) |
bool | sendInfo (const char *infoText) |
bool | sendWarning (UServerInMsg *msg, const char *warningText) |
bool | sendWarning (const char *warningText) |
UResBase * | setThisResource (const char *ID, UResBase *resource, bool remove, bool *changed, UResBase *currentResPtr, bool *isLocal) |
Protected Member Functions inherited from UResVarPool | |
void | setDescription (const char *note, bool copy=false) |
Protected Member Functions inherited from UResBase | |
UResBase * | getStaticResource (const char *resName, bool mayCreate, bool staticOnly=true) |
get a pointer to a static resource. More... | |
Protected Attributes | |
char | aliasName [MAX_ID_LENGTH] |
UCmdExe * | cmdHandler |
char * | cmdToks [20] |
int | cmdToksCnt |
char | commandsHandled [MAX_RESOURCE_LIST_SIZE] |
UServerInMsg * | msg |
char | pluginName [MAX_RESOURCE_LIST_SIZE] |
bool | verboseMessages |
Protected Attributes inherited from UResBase | |
int | resFuncIdx |
char | resID [MAX_RESOURCE_ID_LENGTH] |
char | resIsAlso [MAX_RESOURCE_ISALSO_LENGTH] |
int | resVersion |
Protected Attributes inherited from UReplay | |
bool | replay |
FILE * | replayFile |
char | replayFileName [REPLAY_FILE_NAME_LENGTH] |
replay filename More... | |
char | replayLine [MAX_LOG_LINE_LENGTH] |
int | replayLogLine |
UReplay * | replayParent |
UTime | replayTimeNext |
Private Attributes | |
int | cmdIndex |
char | ldFileName [MAX_FILENAME_LENGTH] |
void * | ldModule |
Additional Inherited Members | |
Static Public Member Functions inherited from UResVarPool | |
static const char * | getResClassID () |
Static Protected Attributes inherited from UReplay | |
static const int | MAX_LOG_LINE_LENGTH = 10000 |
static const int | REPLAY_FILE_NAME_LENGTH = 264 |
max length of replay filename More... | |
Basic class for loadable functions for this component server.
UFunctionBase::UFunctionBase | ( | ) |
Constructor
References aliasName, cmdHandler, commandsHandled, ldFileName, ldModule, MAX_RESOURCE_LIST_SIZE, msg, UResBase::setResID(), silent, and verboseMessages.
|
virtual |
Destructor
bool UFunctionBase::addResource | ( | UResBase * | resource, |
UFunctionBase * | owner | ||
) |
Add one resource into the resource structure with this parent module true if added (false if no more space or core pointer is not valid).
References UCmdExe::addResource(), cmdHandler, and UResBase::getResID().
Referenced by commandList(), UFunctionCamBase::createResources(), UFunctionImgPool::createResources(), UFunctionVarPool::createResources(), UFunctionLaser::createResources(), UFunctionPoseHist::createResources(), UFuncV360::createResources(), UFunctionDisp::createResources(), UFuncObj3d::createResources(), UFuncRoseBot::createResources(), UFunctionGps::createResources(), UFunctionIf::createResources(), UFuncFile::createResources(), UFunctionLocater::createResources(), UFuncLobst::createResources(), UFuncCron::createResources(), UFuncMapObst::createResources(), UFuncKeep::createResources(), UFuncPoly::createResources(), UFuncBin::createResources(), UFunctionDrivePos::createResources(), UFuncRhdIf::createResources(), UFuncPcp::createResources(), UFuncRule::createResources(), UFunctionLaserIfScan::createResources(), UFunctionPassable::createResources(), UFunctionSmrIf::createResources(), UFuncEfLine::createResources(), UFunctionAvoid::createResources(), UFunctionRoadDrive::createResources(), UFunctionCamData::handleCommand(), UFunctionLaserIfData::handleLaserIf(), and UFunctionLaserIfData::handleLaserObst().
void UFunctionBase::closeLogfile | ( | ) |
Close logfile
Referenced by setVerbose().
|
inlinevirtual |
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 UFunctionSmrIf.
References addResource(), commandsHandled, and setResource().
Referenced by print(), and UCmdExe::sysModuleCmd().
|
inlinevirtual |
Create any resources that this modules needs and add these to the resource pool to be integrated in the global variable pool and method sharing.
Reimplemented from UResBase.
Reimplemented in UFuncLaserBox, UFuncTOF, UFuncTOF, UFuncPTgrey, UFuncV4lGst, UFunctionAvoid, UFunctionRoadDrive, UFuncKinect, UFuncEfLine, UFunctionSmrIf, UFunctionPassable, UFunctionLaserIfScan, UFuncRule, UFuncPcp, UFuncRhdIf, UFunctionDrivePos, UFuncPlan, UFuncGndAna, UFuncKeep, UFuncPiCam, UFuncPoly, UFuncBin, UFuncCron, UFuncLobst, UFuncMapObst, UFuncFile, UFunctionLocater, UFunctionIf, UFunctionGps, UFuncObj3d, UFuncRoseBot, UFunctionDisp, UFuncV360, UFunctionPoseHist, UFunctionVarPool, UFunctionCamGmk, UFunctionLaser, UFunctionImgPool, UFuncStereo, UFunctionCamBase, and UFuncImu.
Referenced by UFunctionCamBase::createResources().
|
inline |
Get the alias name. An alias name renames some generic plugins to give a new command keyword and a new resource and plugin name. This is especially used for the generic server interface plugin, as this can handle plugins from more than one server, the base name is if, but the alias name could be "laser" for an interface to the laser server or "cam" for tnterface to the camera server. Both plugins loaded into e.g. a behaviour server.
References aliasName.
Referenced by UFuncPiCam::callGotNewDataWithObject(), UFuncPiCam::createResources(), UFuncKinect::createResources(), UFuncPTgrey::createResources(), UFuncPTgrey::handlePTgrey(), UFuncPTgrey::logImageToFile(), UFuncPTgrey::PrintCameraInfo(), UFuncPTgrey::Receiver(), UFuncPTgrey::runSetting(), setCommand(), UFuncPTgrey::stop(), UCmdExe::sysModuleCmd(), and UCmdExe::unloadFunctionModule().
|
inlineprotected |
Get the command index
References cmdIndex.
Referenced by UFunctionImgPool::handleCommand(), UFuncPiCam::handleCommand(), UFuncKinect::handleCommand(), UFunctionIf::handleCommand(), and UFuncPTgrey::handleCommand().
|
inline |
Get loaded module name. Returns an empty string if not a dynamic loaded module
References gotAllResources(), ldFileName, sendEndTag(), sendFullTag(), sendStartTag(), sendText(), and setAliasName().
Referenced by UCmdExe::sysModuleCmd(), UCmdExe::unloadFunctionModule(), and UCmdExe::unloadThisModule().
|
inline |
Get loadable module pointer for further symbol ref
References ldModule.
Referenced by UCmdExe::getLoadedModuleRef(), and UCmdExe::sysModuleCmd().
|
protected |
get a pointer to a static resource.
resName | The name of the resource to be acquired. |
mayCreate | if set to true, then the resource will be created if it do not exist. |
staticOnly | if true, then static resources - like 'odoPose' - are searched only. |
References cmdHandler, and UCmdExe::getStaticResource().
Referenced by UFuncKinect::callGotNewDataWithObject(), UFuncLoca2::correlateLines(), UFuncKinect::decodeReplayLine(), UFuncPpl::drawPolygons(), UFuncBallKL::filterMask(), UFuncPiPi::filterMask(), UFuncCropRow::filterMask(), UFuncBall::filterMask(), UFuncBall_improved::filterMask(), UFuncLinefinder::filterMask(), UFuncBallKL::findBall(), UFuncPiPi::findBall(), UFuncBall::findBall(), UFuncBall_improved::findBall(), UFuncCropRow::findPlants(), UFuncImSeg::findSegments(), UFuncTracking::FirstImage(), UFuncEfLine::getCurrentOdoPose(), UFuncLaserBase::getDevice(), UFuncLaserBase::getScan(), UFuncLobst::getScan(), UFuncEfLine::getScan(), UFuncKinect::GetXYZCoordinates(), UFuncLocalize::handleAddLine(), UFuncLoca2::handleAddLine(), UFunctionAvoid::handleAvoid(), Funcavoid::handleCommand(), UFuncRectify::handleCommand(), UFuncObj3d::handleCommand(), UFuncRoseBot::handleCommand(), UFuncCropRow::handleCommand(), UFuncPpl::handleCommand(), UFuncLoca2::handleCommand(), UFuncLocalize::handleLocalize(), UFunctionAvoid::handlePoseToPose(), UFuncLinefinder::houghTest(), UFuncImgPoly::initializeFindPath(), UFuncPiCam::logImageToFile(), UFuncPTgrey::logImageToFile(), UFuncKinect::logImageToFile(), UFuncTOF::logImageToFile(), UFuncBall::makeDisplayPolygon(), UFuncImSeg::makeDisplayPolygon(), UFuncImSeg::makeLBPimage(), UFuncPCLTest::MakeMap(), UFuncKinect::makeObj3Dcloud(), UFuncStraightLine::polygonToPolyPlugin(), UFuncTOF::processChannel8(), UFuncKinect::processDepthImages(), UFuncStereo::processImages(), UFuncTOF::processImages(), UFuncPTgrey::Receiver(), UFuncPiCam::run(), UFuncKinect::run(), setLoadTime(), UFuncStraightLine::toRobot(), UFuncStraightLine::toWorld(), UFuncTracking::TrackObjects(), UFuncKinect::updateCloud(), UFuncLoca2::updateStatus(), and UFuncLocalize::updateStatus().
|
virtual |
Test if all resources are loaded as intended
Reimplemented from UResVarPool.
References cmdHandler, and UCmdExe::getResClassID().
Referenced by UFuncCog::centerOfGravity(), getLoadedFileName(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageListCommand(), UFunctionPoseHist::handlePoseHistCommand(), and UFuncV360::handleV360Command().
|
protectedvirtual |
Handle command from client (or console). Return true if command is handles and alle needed actions are taken. Return false if command is not known (due to syntax error or that it belongs to another function)
Reimplemented in UFuncLaserBox, UFuncTracking, UFuncTOF, UFuncTOF, UFuncImgPoly, UFuncLocalize, UFuncFz, UFuncPTgrey, UFuncV4lGst, UFunctionAvoid, UFunctionRoadDrive, UFunctionPassable, UFunctionIf, UFunctionLaserIfData, UFunctionLaserIfScan, UFuncPCLTest, UFuncCog, UFunctionDrivePos, UFuncLinefinder, UFuncKinect, UFuncEfLine, UFuncPcp, UFunctionSmrIf, UFuncLoca2, UFuncRule, UFuncFocus, UFuncStraightLine, UFuncImSeg, UFunctionLaser, UFuncRadar, UFuncRhdIf, UFuncPpl, UFuncGndAna, UFuncCron, UFuncKeep, UFuncMapObst, UFuncPiCam, UFuncPoly, UFuncBin, UFunctionLocater, UFuncCropRow, UFuncLobst, UFunctionCam, UFuncFile, UFuncBall, UFunctionGps, UFuncRoseBot, UFuncObj3d, UFunctionCamGmk, UFuncBallKL, UFuncPlan, UFuncPiPi, UFuncView, UFunctionDisp, UFunctionCamData, UFuncV360, UFunctionVarPool, UFuncBall_improved, UFunctionCamPath, UFuncStereo, UFunctionPoseHist, UFunctionImgPool, UFunctionImage, UFuncRectify, UFuncVarMrc, Funcavoid, and UFuncImu.
References sendDebug().
Referenced by newCommand(), and setLoadTime().
|
protected |
Test to see if client is active. Especially for event push messages.
References cmdHandler, and UCmdExe::isClientAlive().
Referenced by setLoadTime().
bool UFunctionBase::isMine | ( | const char * | cmdName | ) |
if a command with this name mine.
cmdName | is the searched command name. |
References cmdIndex, cmdToks, and cmdToksCnt.
Referenced by UCmdExe::executeFunction(), and setLoadTime().
|
inline |
is the module loaded as static A module is static if the ldFilename has a length of zero.
References ldFileName.
Referenced by UCmdExe::isModuleStatic().
|
inlinevirtual |
Name of function The returned name is intended as informative to clients and should include a version number
Reimplemented in UFunctionSmrIf, and UFunctionIf.
References pluginName.
Referenced by UCmdExe::addFunction(), UCmdExe::addResource(), UFuncTracking::call_tree_cluster(), UFuncLocalize::handleAddLine(), UFuncLoca2::handleAddLine(), UFuncFile::handleCommand(), UFuncPoly::handleCommand(), UFuncPcp::handleCommand(), UFuncKeep::handleKeep(), UFuncKinect::makeObj3Dcloud(), print(), UFunctionPoseHist::setAliasName(), setVerbose(), UCmdExe::sysModuleCmd(), testPlugBase(), UFuncKinect::UFuncKinect(), UFuncPiCam::UFuncPiCam(), UFuncPpl::UFuncPpl(), UFuncRule::UFuncRule(), UFuncView::UFuncView(), UCmdExe::unloadFunctionModule(), and UCmdExe::unloadThisModule().
bool UFunctionBase::newCmd | ( | UServerInMsg * | newMsg, |
UDataBase * | extra | ||
) |
New command to be handled by this module - NB!
msg | is a pointer to the queue element with the command |
extra | is an optional data element acheived form a push command casted to type UDataBase |
References msg.
Referenced by setLoadTime().
bool UFunctionBase::newCommand | ( | UServerInMsg * | newMsg, |
void * | extra | ||
) |
New command to be handled by this module
msg | is a pointer to the queue element with the command |
extra | is an optional void pointer to a data element acheived form a push command |
References handleCommand(), and msg.
Referenced by UCmdExe::executeFunction(), UCmdExe::handleOneServerPushMessage(), and setLoadTime().
bool UFunctionBase::openLogfile | ( | const char * | name | ) |
Open logfile - in default image directory
Referenced by setVerbose().
|
virtual |
Print information on this object to console.
Reimplemented from UResBase.
References commandList(), ldFileName, ldModule, and name().
Referenced by setVerbose().
|
inlinevirtual |
This function is called if a resource for this function is updated - this could be used to verify that all resources are available and full functionality may be available.
References msg, sendHelpDone(), sendHelpStart(), sendMsg(), and sendMsgInt().
Referenced by UCmdExe::deleteFunction(), and UCmdExe::resourcesUpdate().
|
protected |
Send a standard warning reply of the form: <'tagname' debug="'warning text'"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). Returns true if send.
References cmdHandler, UQevent::consoleReply(), qevent, UCmdExe::sendDebug(), and silent.
Referenced by UFunctionPoseHist::handleCommand(), UFuncStereo::handleCommand(), UFunctionCamPath::handleCommand(), UFunctionVarPool::handleCommand(), UFuncV360::handleCommand(), UFuncPlan::handleCommand(), UFunctionCam::handleCommand(), UFuncKeep::handleCommand(), UFuncPiCam::handleCommand(), UFunctionLocater::handleCommand(), UFuncPpl::handleCommand(), UFuncRhdIf::handleCommand(), UFunctionLaser::handleCommand(), UFuncFocus::handleCommand(), UFunctionSmrIf::handleCommand(), UFuncKinect::handleCommand(), UFunctionDrivePos::handleCommand(), UFuncCog::handleCommand(), UFunctionLaserIfData::handleCommand(), UFunctionLaserIfScan::handleCommand(), UFunctionIf::handleCommand(), UFunctionPassable::handleCommand(), UFunctionAvoid::handleCommand(), UFuncPTgrey::handleCommand(), UFuncLocalize::handleCommand(), UFuncImgPoly::handleCommand(), UFuncTOF::handleCommand(), handleCommand(), and setLoadTime().
|
protected |
Send a standard warning reply of the form: <'tagname' debug="'warning text'"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), msg, qevent, UCmdExe::sendDebug(), and silent.
bool UFunctionBase::sendEndTag | ( | UServerInMsg * | msg | ) |
Send a closing end-tag for this message. Returns true if the message was send.
References USmlTagIn::getTagName(), sendMsg(), and UServerInMsg::tag.
bool UFunctionBase::sendEndTag | ( | ) |
Send a closing end-tag for this message. Returns true if the message was send.
References USmlTagIn::getTagName(), msg, sendMsg(), and UServerInMsg::tag.
Referenced by getLoadedFileName(), UFuncFile::handleCommand(), UFunctionRoadDrive::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFunctionAvoid::handlePoseToPose(), UFuncRule::listMission(), UFuncRule::listState(), UFunctionVarPool::makeAMethodCall(), UFuncEfLine::sendAllLines(), and UFuncEfLine::sendBoxLines().
|
protected |
Send a standard error reply of the form: < 'tagname' debug="warning text"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), qevent, and UCmdExe::sendError().
Referenced by UFunctionDisp::handleCommand(), UFunctionVarPool::handleVar(), setLoadTime(), and UFuncRule::unloadRule().
|
protected |
Send a standard error reply of the form: < 'tagname' debug="warning text"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), msg, qevent, and UCmdExe::sendError().
bool UFunctionBase::sendFullTag | ( | const char * | attributes | ) |
send a full tag message with these attributes. I.e. a "<tagname attributes/>\n" The tag name is the same as the command name (the command tag name)
attributes | is a string with all additional attributes to be placed inside the tag. |
References USmlTagIn::getTagName(), msg, sendMsg(), and UServerInMsg::tag.
Referenced by getLoadedFileName().
|
protected |
Send a standard warning reply of the form: <'tagname' info="'warning text'"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). Returns true if send.
References cmdHandler, UQevent::consoleReply(), qevent, and UCmdExe::sendHelp().
Referenced by UFunctionCamGmk::handleGmkGetCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionLaser::handleSetCommand(), and setLoadTime().
|
protected |
Send a standard warning reply of the form: <'tagname' info="'warning text'"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), msg, qevent, and UCmdExe::sendHelp().
bool UFunctionBase::sendHelpDone | ( | UServerInMsg * | msg | ) |
Send an help close tag and an info message matching the message in msg
msg | reference to client connection |
References cmdHandler, and UCmdExe::sendHelpDone().
bool UFunctionBase::sendHelpDone | ( | ) |
Send an help close tag and an info message matching the message in msg
References cmdHandler, msg, and UCmdExe::sendHelpDone().
Referenced by UFuncCog::centerOfGravity(), UFuncPlan::handleAddCon(), UFuncLocalize::handleAddLine(), UFuncPlan::handleAddPoint(), UFunctionAvoid::handleAvoid(), UFuncPlan::handlecalculatecost(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncImu::handleCommand(), Funcavoid::handleCommand(), UFuncVarMrc::handleCommand(), UFuncRectify::handleCommand(), UFuncBall_improved::handleCommand(), UFuncBallKL::handleCommand(), UFuncPiPi::handleCommand(), UFuncObj3d::handleCommand(), UFuncBall::handleCommand(), UFuncRoseBot::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncCropRow::handleCommand(), UFuncLobst::handleCommand(), UFuncMapObst::handleCommand(), UFuncPoly::handleCommand(), UFuncBin::handleCommand(), UFuncCron::handleCommand(), UFuncPpl::handleCommand(), UFuncRadar::handleCommand(), UFuncImSeg::handleCommand(), UFuncStraightLine::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionImgPool::handleImageSetCommand(), UFuncKeep::handleKeep(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFuncPiCam::handleNormal(), UFunctionPassable::handleObstGet(), UFuncLocalize::handleOutputDist(), UFunctionAvoid::handlePoseToPose(), UFuncPTgrey::handlePTgrey(), UFuncLocalize::handleResample(), UFuncLocalize::handleResetLocalizer(), UFuncPlan::handleResetPlan(), UFuncRhdIf::handleRhd(), UFuncRule::handleRuleSet(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFuncLocalize::handleSetTable(), UFuncStereo::handleStereo(), UFuncTOF::handleTOF(), UFuncV360::handleV360Command(), UFunctionVarPool::handleVar(), UFunctionVarPool::handleVarPush(), UFuncRule::listAllMissions(), UFunctionPoseHist::listPoses(), UFuncRule::listState(), resourceUpdated(), and UFunctionVarPool::sendVar().
bool UFunctionBase::sendHelpStart | ( | UServerInMsg * | msg, |
const char * | subject | ||
) |
Send an help open tag with the provided subject, like <help subject="subject">
msg | reference to client connection |
subject | help subject |
References cmdHandler, and UCmdExe::sendHelpStart().
bool UFunctionBase::sendHelpStart | ( | const char * | subject | ) |
Send an help open tag with the provided subject, like <help subject="subject">
subject | help subject |
References cmdHandler, msg, and UCmdExe::sendHelpStart().
bool UFunctionBase::sendHelpStart | ( | ) |
Send an help open tag with the provided subject, like <help subject="subject"> where subject is the plug-in (alias) name
References aliasName, cmdHandler, msg, and UCmdExe::sendHelpStart().
Referenced by UFuncCog::centerOfGravity(), UFuncPlan::handleAddCon(), UFuncLocalize::handleAddLine(), UFuncPlan::handleAddPoint(), UFunctionAvoid::handleAvoid(), UFuncPlan::handlecalculatecost(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncImu::handleCommand(), Funcavoid::handleCommand(), UFuncVarMrc::handleCommand(), UFuncRectify::handleCommand(), UFuncBall_improved::handleCommand(), UFuncBallKL::handleCommand(), UFuncPiPi::handleCommand(), UFuncObj3d::handleCommand(), UFuncBall::handleCommand(), UFuncRoseBot::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncCropRow::handleCommand(), UFuncLobst::handleCommand(), UFuncMapObst::handleCommand(), UFuncPoly::handleCommand(), UFuncBin::handleCommand(), UFuncCron::handleCommand(), UFuncPpl::handleCommand(), UFuncRadar::handleCommand(), UFuncImSeg::handleCommand(), UFuncStraightLine::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionImgPool::handleImageSetCommand(), UFuncKeep::handleKeep(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFuncPiCam::handleNormal(), UFunctionPassable::handleObstGet(), UFuncLocalize::handleOutputDist(), UFunctionAvoid::handlePoseToPose(), UFuncPTgrey::handlePTgrey(), UFuncLocalize::handleResample(), UFuncLocalize::handleResetLocalizer(), UFuncPlan::handleResetPlan(), UFuncRhdIf::handleRhd(), UFuncRule::handleRuleSet(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFuncLocalize::handleSetTable(), UFuncStereo::handleStereo(), UFuncTOF::handleTOF(), UFuncV360::handleV360Command(), UFunctionVarPool::handleVar(), UFunctionVarPool::handleVarPush(), UFuncRule::listAllMissions(), UFunctionPoseHist::listPoses(), UFuncRule::listState(), resourceUpdated(), and UFunctionVarPool::sendVar().
|
protected |
Send a standard warning reply of the form: <'tagname' info="warning text"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), USmlTagIn::getAttBool(), qevent, UCmdExe::sendInfo(), silent, and UServerInMsg::tag.
Referenced by UFuncFocus::doFocus(), UFuncRule::editRule(), UFuncImgPoly::findAreaFromSeedRGB(), UFunctionCamPath::findPath(), UFuncLocalize::handleAddLine(), UFunctionAvoid::handleAvoid(), UFunctionCam::handleCamSetCommand(), UFuncObj3d::handleCloud(), UFuncImu::handleCommand(), UFuncRectify::handleCommand(), UFuncBall_improved::handleCommand(), UFunctionCamData::handleCommand(), UFunctionDisp::handleCommand(), UFuncView::handleCommand(), UFuncBallKL::handleCommand(), UFuncPiPi::handleCommand(), UFuncObj3d::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncLobst::handleCommand(), UFuncCropRow::handleCommand(), UFuncPoly::handleCommand(), UFuncCron::handleCommand(), UFuncBin::handleCommand(), UFuncMapObst::handleCommand(), UFuncRadar::handleCommand(), UFuncImSeg::handleCommand(), UFuncStraightLine::handleCommand(), UFuncLoca2::handleCommand(), UFuncEfLine::handleCommand(), UFuncPcp::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFunctionRoadDrive::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFunctionCamGmk::handleGmkGetCommand(), UFunctionIf::handleIf(), UFunctionIf::handleIfPush(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageSetCommand(), UFuncImgPoly::handleImgPolyCommand(), UFuncKeep::handleKeep(), UFuncKeep::handleKeepPush(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UFunctionLaserIfData::handleLaserObst(), UFuncLoca2::handleLocalize(), UFunctionLocater::handleLocater(), UFuncPiCam::handleNormal(), UFunctionPassable::handleObstGet(), UFunctionPassable::handlePass(), UFunctionCamPath::handlePathGetCommand(), UFunctionImgPool::handlePoolPushCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionPoseHist::handlePoseHistPush(), UFuncPlugBasePush::handlePush(), UFuncRhdIf::handlePushCommand(), UFuncLocalize::handleResetLocalizer(), UFuncRhdIf::handleRhd(), UFunctionPassable::handleRoad(), UFuncRule::handleRuleSet(), UFunctionLaser::handleScanGetCommand(), UFunctionLaser::handleScanPushCommand(), UFunctionLaser::handleSetCommand(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFunctionSmrIf::handleSmr(), UFunctionSmrIf::handleSmrPush(), UFuncStereo::handleStereo(), UFuncV360::handleV360Command(), UFuncV360::handleV360Push(), UFunctionVarPool::handleVar(), UFunctionVarPool::handleVarPush(), UFunctionVarPool::handleVarValues(), UFuncRule::listAllMissions(), UFuncRule::listMission(), UFuncRule::listState(), UFuncRule::loadRuleFile(), UFuncRule::openLog(), UFuncRule::runStep(), UFunctionVarPool::sendVarList(), setLoadTime(), UFuncRule::startStopRule(), and UFuncRule::unloadRule().
|
protected |
Send a standard warning reply of the form: <'tagname' info="warning text"/>, where 'tagname' is that tagname of the command and 'warning text' is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), msg, qevent, UCmdExe::sendInfo(), and silent.
bool UFunctionBase::sendMsg | ( | UServerInMsg * | msg, |
const char * | message, | ||
int | size | ||
) |
Send reply message to client with specific length
References cmdHandler, and UCmdExe::sendMsg().
Referenced by UFuncCog::centerOfGravity(), UFunctionIf::dataTrap(), UFuncCog::doBark(), UFuncFocus::doFocus(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncObj3d::handleCloud(), Funcavoid::handleCommand(), UFuncVarMrc::handleCommand(), UFuncBall_improved::handleCommand(), UFunctionDisp::handleCommand(), UFunctionCamData::handleCommand(), UFuncBallKL::handleCommand(), UFuncView::handleCommand(), UFuncPiPi::handleCommand(), UFuncBall::handleCommand(), UFuncRoseBot::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncCropRow::handleCommand(), UFuncLobst::handleCommand(), UFuncPoly::handleCommand(), UFuncCron::handleCommand(), UFuncPpl::handleCommand(), UFuncImSeg::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFuncLinefinder::handleCommand(), UFunctionRoadDrive::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionCamGmk::handleGmkGetCommand(), UFunctionIf::handleIf(), UFunctionIf::handleIfPush(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageListCommand(), UFuncImgPoly::handleImgPolyCommand(), UFuncKeep::handleKeepPush(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLoca2::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UFunctionPassable::handlePass(), UFunctionCamPath::handlePathGetCommand(), UFunctionImgPool::handlePoolPushCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionPoseHist::handlePoseHistPush(), UFuncPlugBasePush::handlePush(), UFuncRhdIf::handlePushCommand(), UFunctionPassable::handleRoad(), UFunctionLaser::handleScanGetCommand(), UFunctionLaser::handleScanPushCommand(), UFunctionLaser::handleSetCommand(), UFunctionSmrIf::handleSmr(), UFunctionSmrIf::handleSmrPush(), UFuncStereo::handleStereo(), UFuncV360::handleV360Push(), UFunctionVarPool::handleVarPush(), UFunctionVarPool::handleVarValues(), UFuncRule::listMission(), UFuncRule::listState(), UFuncRule::loadRuleFile(), UFunctionVarPool::makeAMethodCall(), resourceUpdated(), UFuncEfLine::sendAllLines(), UFuncEfLine::sendBoxLines(), UFuncEfLine::sendBoxPose(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionAvoid::sendCurrentPath(), UFunctionVarPool::sendDescription(), sendEndTag(), UFunctionPassable::sendFullScan(), sendFullTag(), UFunctionCamGmk::sendGmk(), UFunctionImgBase::sendImage(), UFunctionAvoid::sendManSeq(), UFuncObj3d::sendObjects(), UFunctionPassable::sendObstacles(), UFunctionPassable::sendRoadLines(), UFuncEfLine::sendRobotPoseAndSensorPosition(), UFunctionLaser::sendScan(), sendStartTag(), UFuncRule::sendStateMessage(), UFunctionCam::sendStatusReply(), UFunctionVarPool::sendVar(), UFunctionVarPool::sendVarList(), and UFuncStraightLine::toWorld().
bool UFunctionBase::sendMsg | ( | const char * | message | ) |
Send text reply mesage to client. Returns true if send. Returns false if client (or server) has gone.
References cmdHandler, msg, and UCmdExe::sendMsg().
bool UFunctionBase::sendMsg | ( | UServerInMsg * | msg, |
const char * | message | ||
) |
Send text reply mesage to client. Returns true if send. Returns false if client (or server) has gone.
References cmdHandler, and UCmdExe::sendMsg().
bool UFunctionBase::sendMsg | ( | int | clientIdx, |
const char * | message, | ||
int | size | ||
) |
Send reply message to client with specific length
References cmdHandler, and UCmdExe::sendMsg().
bool UFunctionBase::sendMsgInt | ( | int | clientIdx, |
const char * | message | ||
) |
Send text reply mesage to client. Returns true if send. Returns false if client (or server) has gone. NB! call is depricated, as connection can not be locked during long transmissions.
References cmdHandler, and UCmdExe::sendMsg().
Referenced by UFunctionIf::dataTrap(), and resourceUpdated().
bool UFunctionBase::sendStartTag | ( | const char * | attributes | ) |
send a tag start message with these attributes. The tag name is the same as the command name (the command tag name) I.e. like "<tagname attributes>\n" The tag can be closed by a call to sendEndTag()
attributes | is a string with all additional attributes to be placed inside the tag open message. |
References USmlTagIn::getTagName(), msg, sendMsg(), and UServerInMsg::tag.
Referenced by getLoadedFileName(), and UFunctionAvoid::handlePoseToPose().
bool UFunctionBase::sendText | ( | UServerInMsg * | msg, |
const char * | text | ||
) |
Send a text that may contain XML reserver characters '<"'&>'. The text will be converted, so that no reserver characters remain in the transmitted text. Returns true if send.
References cmdHandler, and UCmdExe::sendText().
Referenced by UFuncCog::centerOfGravity(), UFuncFocus::doFocus(), getLoadedFileName(), UFuncPlan::handleAddCon(), UFuncLocalize::handleAddLine(), UFuncPlan::handleAddPoint(), UFunctionAvoid::handleAvoid(), UFuncPlan::handlecalculatecost(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncImu::handleCommand(), Funcavoid::handleCommand(), UFuncVarMrc::handleCommand(), UFuncRectify::handleCommand(), UFuncBall_improved::handleCommand(), UFunctionCamData::handleCommand(), UFunctionDisp::handleCommand(), UFuncBallKL::handleCommand(), UFuncPiPi::handleCommand(), UFuncView::handleCommand(), UFuncObj3d::handleCommand(), UFuncBall::handleCommand(), UFunctionGps::handleCommand(), UFuncRoseBot::handleCommand(), UFuncFile::handleCommand(), UFuncCropRow::handleCommand(), UFuncLobst::handleCommand(), UFuncMapObst::handleCommand(), UFuncBin::handleCommand(), UFuncPoly::handleCommand(), UFuncCron::handleCommand(), UFuncPpl::handleCommand(), UFuncRadar::handleCommand(), UFuncImSeg::handleCommand(), UFuncStraightLine::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFunctionRoadDrive::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionCamGmk::handleGmkGetCommand(), UFunctionIf::handleIf(), UFunctionIf::handleIfPush(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageSetCommand(), UFuncImgPoly::handleImgPolyCommand(), UFuncKeep::handleKeep(), UFuncKeep::handleKeepPush(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UFuncPiCam::handleNormal(), UFunctionPassable::handleObstGet(), UFuncLocalize::handleOutputDist(), UFunctionPassable::handlePass(), UFunctionCamPath::handlePathGetCommand(), UFunctionImgPool::handlePoolPushCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionPoseHist::handlePoseHistPush(), UFunctionAvoid::handlePoseToPose(), UFuncPTgrey::handlePTgrey(), UFuncPlugBasePush::handlePush(), UFuncRhdIf::handlePushCommand(), UFuncLocalize::handleResample(), UFuncLocalize::handleResetLocalizer(), UFuncPlan::handleResetPlan(), UFuncRhdIf::handleRhd(), UFunctionPassable::handleRoad(), UFuncRule::handleRuleSet(), UFunctionLaser::handleScanGetCommand(), UFunctionLaser::handleScanPushCommand(), UFunctionLaser::handleSetCommand(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFuncLocalize::handleSetTable(), UFunctionSmrIf::handleSmr(), UFunctionSmrIf::handleSmrPush(), UFuncStereo::handleStereo(), UFuncTOF::handleTOF(), UFuncV360::handleV360Command(), UFuncV360::handleV360Push(), UFunctionVarPool::handleVar(), UFunctionVarPool::handleVarPush(), UFuncRule::listAllMissions(), UFuncRule::listMission(), UFunctionPoseHist::listPoses(), UFuncRule::listState(), UFuncRule::loadRuleFile(), UFunctionVarPool::makeAMethodCall(), UFuncRule::sendStateMessage(), and UFunctionVarPool::sendVar().
bool UFunctionBase::sendText | ( | const char * | text | ) |
Send a text that may contain XML reserver characters '<"'&>'. The text will be converted, so that no reserver characters remain in the transmitted text. Returns true if send.
References cmdHandler, msg, and UCmdExe::sendText().
|
protected |
Send a standard warning reply of the form: <'tagname' warning="warning text"/>, where 'tagname' is that tagname of the command and 'warning text'; is the provided reply text (quotes are added by the function). Returns true if send.
References cmdHandler, UQevent::consoleReply(), qevent, UCmdExe::sendWarning(), and silent.
Referenced by UFuncCog::centerOfGravity(), UFuncFocus::doFocus(), UFuncRule::editRule(), UFuncPlan::handleAddCon(), UFuncPlan::handleAddPoint(), UFunctionAvoid::handleAvoid(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncObj3d::handleCloud(), UFuncVarMrc::handleCommand(), UFuncRectify::handleCommand(), UFunctionImage::handleCommand(), UFunctionImgPool::handleCommand(), UFuncBall_improved::handleCommand(), UFunctionCamData::handleCommand(), UFunctionDisp::handleCommand(), UFuncView::handleCommand(), UFuncBallKL::handleCommand(), UFuncObj3d::handleCommand(), UFuncBall::handleCommand(), UFuncRoseBot::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncLobst::handleCommand(), UFuncCropRow::handleCommand(), UFuncPoly::handleCommand(), UFuncCron::handleCommand(), UFuncMapObst::handleCommand(), UFuncPpl::handleCommand(), UFuncRadar::handleCommand(), UFuncStraightLine::handleCommand(), UFuncImSeg::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFunctionRoadDrive::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionCamGmk::handleGmkGetCommand(), UFunctionIf::handleIf(), UFunctionIf::handleIfPush(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageListCommand(), UFunctionImgPool::handleImageSetCommand(), UFuncImgPoly::handleImgPolyCommand(), UFuncKeep::handleKeep(), UFuncKeep::handleKeepPush(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLoca2::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UFunctionPassable::handleObstGet(), UFunctionPassable::handlePass(), UFunctionCamPath::handlePathGetCommand(), UFunctionImgPool::handlePoolPushCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionPoseHist::handlePoseHistPush(), UFunctionAvoid::handlePoseToPose(), UFuncPlugBasePush::handlePush(), UFuncRhdIf::handlePushCommand(), UFuncRhdIf::handleRhd(), UFunctionPassable::handleRoad(), UFuncRule::handleRuleSet(), UFunctionLaser::handleScanGetCommand(), UFunctionLaser::handleScanPushCommand(), UFunctionLaser::handleSetCommand(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFunctionSmrIf::handleSmr(), UFunctionSmrIf::handleSmrPush(), UFuncStereo::handleStereo(), UFuncV360::handleV360Command(), UFuncV360::handleV360Push(), UFunctionVarPool::handleVar(), UFunctionVarPool::handleVarPush(), UFuncRule::listAllMissions(), UFuncRule::listMission(), UFuncRule::listState(), UFuncRule::loadRuleFile(), UFunctionVarPool::makeAMethodCall(), UFunctionVarPool::sendVar(), UFunctionVarPool::sendVarList(), setLoadTime(), UFuncRule::startStopRule(), and UFuncRule::unloadRule().
|
protected |
Send a standard warning reply of the form: <'tagname' warning="warning text"/>, where 'tagname' is that tagname of the command and 'warning text'; is the provided reply text (quotes are added by the function). true if send.
References cmdHandler, UQevent::consoleReply(), msg, qevent, UCmdExe::sendWarning(), and silent.
|
virtual |
Set alias name - default is empty
aliasName | is the new name for the plugin - this is used for the resource and the new single command handled. |
Reimplemented in UFunctionPoseHist.
References aliasName, UResBase::getResID(), MAX_ID_LENGTH, and setCommand().
Referenced by getLoadedFileName(), UCmdExe::loadFunctionModule(), UServerStatic::loadStaticModule(), UFunctionPoseHist::setAliasName(), and UFunctionIf::UFunctionIf().
|
virtual |
Set command list and optional version information e.g. setCommand("ball door", "ballfinder", "finds balls in images (by author)"); to set the commands "ball" and "door" to be handled by this plugin, and add some author initial and a coompile date and time for the plugin.
cmdList | is a space separated list of commands to be handled by this plugin |
name | is the resource name of the plugin, and the name of the base structure for local variables. |
note | an optional text string shown in the module list - could also hold author name (shown in variable list and other places). |
References aliasName, cmdToks, cmdToksCnt, commandsHandled, getAliasName(), MAX_ID_LENGTH, MAX_RESOURCE_LIST_SIZE, pluginName, UResVarPool::setDescription(), and UResBase::setResID().
Referenced by Funcavoid::Funcavoid(), setAliasName(), setName(), UFuncBall::UFuncBall(), UFuncBall_improved::UFuncBall_improved(), UFuncBallKL::UFuncBallKL(), UFuncBin::UFuncBin(), UFuncCron::UFuncCron(), UFuncCropRow::UFuncCropRow(), UFuncEfLine::UFuncEfLine(), UFuncFile::UFuncFile(), UFuncFocus::UFuncFocus(), UFuncFz::UFuncFz(), UFuncImgPoly::UFuncImgPoly(), UFuncImSeg::UFuncImSeg(), UFuncImu::UFuncImu(), UFuncKeep::UFuncKeep(), UFuncKinect::UFuncKinect(), UFuncLinefinder::UFuncLinefinder(), UFuncLobst::UFuncLobst(), UFuncLoca2::UFuncLoca2(), UFuncLocalize::UFuncLocalize(), UFuncMapObst::UFuncMapObst(), UFuncObj3d::UFuncObj3d(), UFuncPCLTest::UFuncPCLTest(), UFuncPcp::UFuncPcp(), UFuncPiCam::UFuncPiCam(), UFuncPiPi::UFuncPiPi(), UFuncPlan::UFuncPlan(), UFuncPoly::UFuncPoly(), UFuncPpl::UFuncPpl(), UFuncPTgrey::UFuncPTgrey(), UFuncRadar::UFuncRadar(), UFuncRectify::UFuncRectify(), UFuncRhdIf::UFuncRhdIf(), UFuncRoseBot::UFuncRoseBot(), UFuncRule::UFuncRule(), UFuncStereo::UFuncStereo(), UFuncStraightLine::UFuncStraightLine(), UFunctionAvoid::UFunctionAvoid(), UFunctionCam::UFunctionCam(), UFunctionCamData::UFunctionCamData(), UFunctionCamGmk::UFunctionCamGmk(), UFunctionCamPath::UFunctionCamPath(), UFunctionDisp::UFunctionDisp(), UFunctionDrivePos::UFunctionDrivePos(), UFunctionGps::UFunctionGps(), UFunctionIf::UFunctionIf(), UFunctionImage::UFunctionImage(), UFunctionImgPool::UFunctionImgPool(), UFunctionLaser::UFunctionLaser(), UFunctionLaserIfData::UFunctionLaserIfData(), UFunctionLaserIfScan::UFunctionLaserIfScan(), UFunctionLocater::UFunctionLocater(), UFunctionPassable::UFunctionPassable(), UFunctionPoseHist::UFunctionPoseHist(), UFunctionRoadDrive::UFunctionRoadDrive(), UFunctionSmrIf::UFunctionSmrIf(), UFunctionVarPool::UFunctionVarPool(), UFuncV360::UFuncV360(), UFuncV4lGst::UFuncV4lGst(), UFuncVarMrc::UFuncVarMrc(), and UFuncView::UFuncView().
void UFunctionBase::setLoadedModuleRef | ( | void * | module, |
const char * | moduleFileName | ||
) |
Set loaded module and filename
References ldFileName, ldModule, and MAX_FILENAME_LENGTH.
Referenced by UCmdExe::loadFunctionModule(), and setVerbose().
|
inlinevirtual |
Set module load time, i.e. just befor call to open file This is needed by the svs-library function, as image times are relative to start of module
References getStaticResource(), handleCommand(), isClientAlive(), isMine(), newCmd(), newCommand(), sendDebug(), sendError(), sendHelp(), sendInfo(), sendWarning(), and setThisResource().
Referenced by UCmdExe::loadFunctionModule().
|
inline |
Set plugin name - the compile time will be added
References MAX_RESOURCE_LIST_SIZE, UResVarPool::note, pluginName, and setCommand().
|
virtual |
List (space separated) of shared resources provided by this function. Must be an empty string if no resources are to be shared. Each resource ID must be no longer than 20 characters long. Get a pointer to the resource with this ID string. The match should be case sensitive. A pointer should be returned for each of the ISs in the resource ID list. Set a resource pointer as appropriate for this class. NB! this base class needs a pointer to the core for core functionality.
Reimplemented from UResVarPool.
Reimplemented in UFuncLaserBox, UFuncLocalize, UFunctionPassable, UFunctionLaserIfData, UFunctionLaserIfScan, UFuncView, UFuncLoca2, UFunctionPoseHist, UFuncPlugBasePush, UFunctionCamData, UFunctionImgBase, UFunctionVarPool, UFunctionCamBase, and UFunctionLaser.
References cmdHandler, UCmdExe::getResClassID(), and UResBase::isA().
Referenced by commandList(), UCmdExe::deleteFunction(), UCmdExe::resourcesUpdate(), UFunctionLaser::setResource(), UFunctionImgBase::setResource(), UFunctionVarPool::setResource(), UFunctionCamData::setResource(), UFuncPlugBasePush::setResource(), UFunctionPoseHist::setResource(), UFuncLoca2::setResource(), UFuncView::setResource(), UFunctionLaserIfData::setResource(), UFunctionLaserIfScan::setResource(), UFunctionPassable::setResource(), UFuncLocalize::setResource(), and UFuncLaserBox::setResource().
|
protected |
Test if the resource has this ID, and if so set the resource pointer 'currentResPtr' to the new resource and adjust the local flag as appropriate. Returns 'changed' true if the resource pointer is changed.
References UResBase::getResID().
Referenced by setLoadTime(), UFunctionCamData::setResource(), UFunctionLaserIfData::setResource(), and UFunctionLaserIfScan::setResource().
|
inline |
Set verbose messages - mostly for debug purpose
References closeLogfile(), name(), openLogfile(), print(), setLoadedModuleRef(), and verboseMessages.
Referenced by runCameraServerComponent(), and testServerGen().
|
protected |
Alias name - if a module can be loaded multible times with different names
Referenced by UFunctionPoseHist::createResources(), UFunctionGps::createResources(), UFunctionIf::createResources(), UFuncBin::createResources(), getAliasName(), UFunctionPoseHist::handleCommand(), UFunctionGps::handleCommand(), UFunctionIf::handleIf(), UFuncKinect::handleKinect(), UFuncPiCam::handleNormal(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionPoseHist::handlePoseHistPush(), UFunctionPoseHist::listPoses(), UFuncPiCam::run(), UFuncKinect::run(), UFuncV4lGst::run(), sendHelpStart(), UFunctionPoseHist::setAliasName(), setAliasName(), setCommand(), UFunctionPoseHist::setResource(), and UFunctionBase().
|
protected |
Communication server to handle outgoing messages
Referenced by addResource(), UFuncImgPoly::findAreaFromSeedRGB(), UFunctionCamPath::findPath(), getStaticResource(), gotAllResources(), UFunctionVarPool::handleVarPush(), isClientAlive(), sendDebug(), sendError(), sendHelp(), sendHelpDone(), sendHelpStart(), sendInfo(), sendMsg(), sendMsgInt(), sendText(), sendWarning(), UFunctionImgBase::setCmdHandler(), setResource(), and UFunctionBase().
|
private |
function index - the command number in the command list
Referenced by getCmdIndex(), and isMine().
|
protected |
Pointers to start of each command
Referenced by isMine(), and setCommand().
|
protected |
number of command tokens
Referenced by isMine(), and setCommand().
|
protected |
Space separated list of handled commands
Referenced by commandList(), setCommand(), and UFunctionBase().
|
private |
Filename for loaded module
Referenced by getLoadedFileName(), isStatic(), print(), setLoadedModuleRef(), and UFunctionBase().
|
private |
Handle for loaded module
Referenced by getLoadedModuleRef(), print(), setLoadedModuleRef(), and UFunctionBase().
|
static |
Max size of one command ID string
Referenced by UFunctionPoseHist::setAliasName(), setAliasName(), setCommand(), and UCmdExe::sysModuleCmd().
|
static |
Maximum length of resource list
Referenced by UFunctionPoseHist::setAliasName(), setCommand(), setName(), and UFunctionBase().
|
protected |
Command queue element to be handled
Referenced by UFuncImgPoly::findAreaFromSeedRGB(), Funcavoid::Funcavoid(), newCmd(), newCommand(), UFunctionAvoid::resourceList(), resourceUpdated(), UFuncV4lGst::run(), sendDebug(), sendEndTag(), sendError(), sendFullTag(), sendHelp(), sendHelpDone(), sendHelpStart(), sendInfo(), sendMsg(), sendStartTag(), sendText(), sendWarning(), UFunctionImgBase::showImagesAsDefault(), UFuncBallKL::UFuncBallKL(), UFuncBin::UFuncBin(), UFuncCron::UFuncCron(), UFuncFile::UFuncFile(), UFuncFocus::UFuncFocus(), UFuncImu::UFuncImu(), UFuncKeep::UFuncKeep(), UFuncKinect::UFuncKinect(), UFuncLobst::UFuncLobst(), UFuncMapObst::UFuncMapObst(), UFuncPCLTest::UFuncPCLTest(), UFuncPiCam::UFuncPiCam(), UFuncPoly::UFuncPoly(), UFuncPpl::UFuncPpl(), UFuncPTgrey::UFuncPTgrey(), UFuncRhdIf::UFuncRhdIf(), UFuncRoseBot::UFuncRoseBot(), UFuncRule::UFuncRule(), UFuncStereo::UFuncStereo(), UFunctionBase(), UFunctionDisp::UFunctionDisp(), UFunctionImgPool::UFunctionImgPool(), UFunctionLocater::UFunctionLocater(), and UFuncView::UFuncView().
|
protected |
Plugin name - if a module can be loaded multible times with different names
Referenced by name(), setCommand(), and setName().
bool UFunctionBase::silent |
is reply to client and console to be limited
Referenced by UFuncLoca2::correlateLines(), UFunctionCam::handleCamSetCommand(), UFuncRectify::handleCommand(), UFunctionGps::handleCommand(), UFuncLoca2::handleCommand(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageSetCommand(), UFuncKinect::handleKinect(), UFuncLocalize::handleLocalize(), UFuncLoca2::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UFuncPiCam::handleNormal(), UFunctionLaser::handleScanGetCommand(), UFunctionLaser::handleSetCommand(), UFuncStereo::handleStereo(), UFunctionVarPool::handleVarValues(), UFuncLoca2::markBestJointMatches(), UFuncPiCam::run(), sendDebug(), sendInfo(), UFunctionVarPool::sendVar(), sendWarning(), UFunctionImgBase::showImagesAsDefault(), and UFunctionBase().
|
protected |
Print more status messages to console, when 'verboseMessages' are true. Mostly for debug.
Referenced by UFuncCropRow::findPlants(), setVerbose(), and UFunctionBase().