AURobotServers
4
|
#include <usmltagin.h>
Public Member Functions | |
void | allowTagEndInString () |
int | findEndTag (const char *data, const int dataCnt) |
bool | getAttBool (const char *name, bool *value, bool defaultValue=true) |
int | getAttCnt () |
bool | getAttDouble (const char *name, double *value, double defaultValue=0.0) |
bool | getAttInteger (const char *name, int *value, int defaultValue=0) |
bool | getAttTime (const char *name, UTime *value) |
bool | getAttTime (const char *name, UTime *value, double defaultValue) |
bool | getAttTime (const char *name, UTime *value, UTime defaultValue) |
bool | getAttUnsignedLong (const char *name, unsigned long *value, unsigned long defaultValue=0) |
bool | getAttValue (const char *name, char *value, const int bufLength) |
bool | getAttValueBool (const char *name, bool *value, bool defValue) |
bool | getAttValueD (const char *name, double *value) |
bool | getAttValueInt (const char *name, int *value) |
const char * | getNext () |
bool | getNextAttribute (char *name, char *value, const int valBufLength, const int nameMaxCnt=MAX_SML_NAME_LENGTH, bool *overflow=NULL) |
int | getTagCnt () |
const char * | getTagName () |
const char * | getTagStart () |
bool | getTime (UTime *time) |
const char * | getToEnd () |
bool | isAFullTag () |
bool | isAnEndTag () |
bool | isAPhonyTag () |
bool | isAStartTag () |
bool | isTagA (const char *tag) |
bool | isTagAnEnd (const char *tag) |
bool | isTagEndFound () |
bool | isValid () |
void | print (const char *preString) |
bool | reset () |
void | setBinaryTag (const char *name, const char *data, int dataCnt) |
bool | setTag (const char *tagString) |
bool | setTag (const char *tagString, int tagStringCnt) |
void | setValid (bool value) |
USmlTagIn () | |
~USmlTagIn () | |
Protected Attributes | |
bool | ignoreTagEndInString |
bool | isEndTag |
bool | isFullTag |
bool | isStartTag |
const char * | next |
const char * | tag |
int | tagCnt |
bool | tagEndFound |
char | tagName [MAX_SML_NAME_LENGTH] |
const char * | toEnd |
bool | valid |
A class for analysis and construction of an Sml tag. Sml is a minor implementation of XML.
USmlTagIn::USmlTagIn | ( | ) |
Constructor
References ignoreTagEndInString, next, tag, tagCnt, tagEndFound, tagName, and valid.
USmlTagIn::~USmlTagIn | ( | ) |
Destructor
|
inline |
Set flag to allow tag end inside a string
References getAttCnt(), ignoreTagEndInString, and setBinaryTag().
int USmlTagIn::findEndTag | ( | const char * | data, |
const int | dataCnt | ||
) |
Find first occurance of the end character '>'. the count form start of data to this character. 'dataCnt' if not found. Sets the 'toEnd' pointer of the object.
References data, findStopChar(), ignoreTagEndInString, tag, and toEnd.
bool USmlTagIn::getAttBool | ( | const char * | name, |
bool * | value, | ||
bool | defaultValue = true |
||
) |
Get boolean value for this named attribute.
name | is the name of the searched attribute |
value | is where the value is returned (may be NULL), if no attribute value (an empty string) is found then set to default value. If no such attribute, then no change to value. |
defaultValue | is used if attribute value is empty (or is an empty string) true if attribute is found and false if attribute is not found. |
Referenced by UGroundPatches::doPatchAnalysis(), getNext(), UFuncPlan::handleAddCon(), UFuncPlan::handleAddPoint(), UFuncPlan::handlecalculatecost(), UFunctionCam::handleCamSetCommand(), UFuncImu::handleCommand(), UFuncRectify::handleCommand(), UFunctionGps::handleCommand(), UFuncLobst::handleCommand(), UFuncGndAna::handleCommand(), UFuncImSeg::handleCommand(), UFuncLoca2::handleCommand(), UFuncV4lGst::handleCommand(), UFuncLaserBox::handleCommand(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionImgPool::handleImageSetCommand(), UFuncImgPoly::handleImgPolyCommand(), UFuncKeep::handleKeep(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UResPcp::handleNewData(), UResPoly::handleNewData(), UFuncPiCam::handleNormal(), UFuncPTgrey::handlePTgrey(), UFuncPlan::handleResetPlan(), UFuncRhdIf::handleRhd(), UFuncStereo::handleStereo(), UFunctionVarPool::handleVarValues(), UFunctionBase::sendInfo(), and UFunctionVarPool::sendVar().
int USmlTagIn::getAttCnt | ( | ) |
Get number of attributes in this tag
References getNextAttribute(), isValid(), and reset().
Referenced by allowTagEndInString(), UFuncKinect::handleKinect(), UFuncPiCam::handleNormal(), UFuncPTgrey::handlePTgrey(), and UFuncTOF::handleTOF().
bool USmlTagIn::getAttDouble | ( | const char * | name, |
double * | value, | ||
double | defaultValue = 0.0 |
||
) |
Get double value for this named attribute.
name | is the name of the searched attribute |
value | is where the value is returned, unchange if no such attribute (may be NULL) |
defaultValue | is used if attribute has no value (or an empty string) false if attribute is not found. |
Referenced by getNext(), UFuncPlan::handleAddCon(), UFuncLoca2::handleAddLine(), UFuncPlan::handleAddPoint(), Funcavoid::handleCommand(), UFuncPoly::handleCommand(), UFuncPpl::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFuncLaserBox::handleCommand(), UFuncKeep::handleKeep(), UResPoly::handleNewData(), UFunctionVarPool::handleVarValues(), and UResIf::interfaceAliveTag().
bool USmlTagIn::getAttInteger | ( | const char * | name, |
int * | value, | ||
int | defaultValue = 0 |
||
) |
Get integer value for this named attribute.
name | is the name of the searched attribute |
value | is where the value is returned (may be NULL). If no such attribute, then no change to value. |
defaultValue | is used if attribute is empty (or is an empty string) false if attribute is not found. |
Referenced by UFuncGndAna::doAnalysis(), getNext(), UFuncPlan::handleAddCon(), UFuncPlan::handleAddPoint(), UFunctionCam::handleCamSetCommand(), UFuncRectify::handleCommand(), UFunctionGps::handleCommand(), UFuncImSeg::handleCommand(), UFuncLaserBox::handleCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageSetCommand(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalizeMHF(), UResPcp::handleNewData(), UResPoly::handleNewData(), UFuncPiCam::handleNormal(), UFuncPTgrey::handlePTgrey(), UFunctionVarPool::handleVarValues(), and UFunctionVarPool::sendVar().
bool USmlTagIn::getAttTime | ( | const char * | name, |
UTime * | value | ||
) |
Get time value for this named attribute – assumed to be in decimal seconds since 1 jan 1970, with up to 6 decimals.
name | is the name of the searched attribute |
value | is where the value is returned (unchanged if no such value or empty value) false if attribute is not found. |
Referenced by getNext(), UResPcp::handleNewData(), and UResIfVar::handleVar().
bool USmlTagIn::getAttTime | ( | const char * | name, |
UTime * | value, | ||
double | defaultValue | ||
) |
Get time value for this named attribute – assumed to be in decimal seconds since 1 jan 1970, with up to 6 decimals.
name | is the name of the searched attribute |
value | is where the value is returned, not changed if no such attribute |
defaultValue | (decimal seconds) is used if attribute has no value (or an empty string) false if attribute is not found. |
Get time value for this named attribute – assumed to be in decimal seconds since 1 jan 1970, with up to 6 decimals.
name | is the name of the searched attribute |
value | is where the value is returned, not changed if no such attribute |
defaultValue | is used if attribute has no value (or an empty string) false if attribute is not found. |
bool USmlTagIn::getAttUnsignedLong | ( | const char * | name, |
unsigned long * | value, | ||
unsigned long | defaultValue = 0 |
||
) |
Get integer value for this named attribute.
name | is the name of the searched attribute |
value | is where the value is returned (may be NULL) |
defaultValue | is used if attribute is empty (or is an empty string) false if attribute is not found. |
Referenced by getNext().
bool USmlTagIn::getAttValue | ( | const char * | name, |
char * | value, | ||
const int | bufLength | ||
) |
Get value for this named attribute.
name | is the name of the searched attribute |
value | is a string buffer for the result. If no such attribute, then no change to buffer |
bufLength | is size of the provided buffer false if no attribute has that name. at maximum bufLength data (NB! hard limit in function too). The value string is returned in value, and optional quotes or apostrophs are removed. |
References getNextAttribute(), isValid(), MAX_SML_NAME_LENGTH, and reset().
Referenced by UServerPush::addPushCommand(), UFunctionIf::dataTrap(), UFuncCog::doBark(), getAttValueBool(), getAttValueD(), getAttValueInt(), UFuncLaserBase::getDevice(), USmlTag::getLineSegment(), USmlTag::getManSeq(), getNext(), USmlTag::getObstacle(), USmlTag::getObstacleGroup(), USmlTag::getPolygon(), USmlTag::getPoseT(), USmlTag::getPoseTime(), USmlTag::getPoseTVQ(), USmlTag::getProbPoly(), UFuncLaserBase::getScan(), USmlTag::getTimeofday(), UClientHandler::gotNewData(), UFuncLocalize::handleAddLine(), UFuncLoca2::handleAddLine(), UCmdExe::handleAlive(), UClientFuncCam::handleCamGet(), UFunctionCam::handleCamGetCommand(), UFuncObj3d::handleCloud(), UFuncImu::handleCommand(), Funcavoid::handleCommand(), UFuncVarMrc::handleCommand(), UFuncRectify::handleCommand(), UFuncBall_improved::handleCommand(), UFuncPiPi::handleCommand(), UFuncBallKL::handleCommand(), UFuncObj3d::handleCommand(), UFuncBall::handleCommand(), UFuncRoseBot::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncLobst::handleCommand(), UFuncCropRow::handleCommand(), UFuncPoly::handleCommand(), UFuncBin::handleCommand(), UFuncCron::handleCommand(), UFuncMapObst::handleCommand(), UFuncGndAna::handleCommand(), UFuncPpl::handleCommand(), UFuncRadar::handleCommand(), UFuncStraightLine::handleCommand(), UFuncImSeg::handleCommand(), UFuncLoca2::handleCommand(), UFuncEfLine::handleCommand(), UFuncPcp::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), UFuncLaserBox::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFuncPlan::handleFindRoute(), UClientFuncLaser::handleGetComplexData(), UFuncPlan::handleGetPoint(), UClientFuncGmk::handleGmkGet(), UClientFuncBase::handleHelp(), UFunctionIf::handleIfPush(), UFuncKeep::handleKeep(), UFuncKeep::handleKeepPush(), UFuncKinect::handleKinect(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UResNavIfMan::handleManData(), UResPcp::handleNewData(), UResPoly::handleNewData(), UFuncPiCam::handleNormal(), UResLaserIfObst::handleObstGrp(), UFuncLocalize::handleOutputDist(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UFunctionPassable::handlePass(), UClientFuncLaser::handlePath(), UFunctionImgPool::handlePoolPushCommand(), UResIfVar::handlePoseHist(), UFunctionPoseHist::handlePoseHistPush(), UFuncPTgrey::handlePTgrey(), UFuncPlugBasePush::handlePush(), UFuncRhdIf::handlePushCommand(), UCmdExe::handleQuit(), UFuncLocalize::handleResample(), UFuncLocalize::handleResetLocalizer(), UFuncRhdIf::handleRhd(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UFunctionLaser::handleScanPushCommand(), UCmdExe::handleServerCommand(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFuncLocalize::handleSetTable(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UCmdExe::handleShellCmd(), UFunctionSmrIf::handleSmr(), UFunctionSmrIf::handleSmrPush(), UFuncStereo::handleStereo(), UFuncTOF::handleTOF(), UFuncV360::handleV360Push(), UFunctionVarPool::handleVar(), UResIfVar::handleVar(), UClientFuncLaser::handleVarData(), UFunctionVarPool::handleVarPush(), UFunctionVarPool::handleVarValues(), UFunctionImgBase::sendImage(), UFunctionVarPool::sendVar(), UClientManSeq::setFromTag(), UResRule::unpackMissionRule(), and UMisRule::unpackRule().
bool USmlTagIn::getAttValueBool | ( | const char * | name, |
bool * | value, | ||
bool | defValue | ||
) |
Get boolean attribute value for the attribute with this name. The allowed values are "0" or "false" for false, "1" or "true" for true, if not one of these, then the default value apply. if attribute do not exist, the value is not changed.
name | of the attribute to be found |
value | pointer to where the value are to be stored (not NULL), unchanged if no such attribute. |
defValue | is the value if attribute string is empty or not one of the allowed values |
References getAttValue(), and str2bool2().
Referenced by UFuncGndAna::doAnalysis(), getNext(), UFuncBall_improved::handleCommand(), UFuncBallKL::handleCommand(), UFuncPiPi::handleCommand(), UFuncObj3d::handleCommand(), UFuncBall::handleCommand(), UFuncCropRow::handleCommand(), UFuncBin::handleCommand(), UFuncGndAna::handleCommand(), UFuncRadar::handleCommand(), UFuncStraightLine::handleCommand(), UFuncImSeg::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), and UMisRule::unpackRule().
bool USmlTagIn::getAttValueD | ( | const char * | name, |
double * | value | ||
) |
Get double attribute value for the attribute with this name.
name | of the attribute to be found |
value | pointer to where the value are to be stored (not NULL). If value of attribute is empty, then 'value' is unchanged (to allow a default value) |
References getAttValue().
Referenced by getNext(), and UFuncObj3d::handleCommand().
bool USmlTagIn::getAttValueInt | ( | const char * | name, |
int * | value | ||
) |
Get integer attribute value for the attribute with this name.
name | of the attribute to be found |
value | pointer to where the value are to be stored (not NULL) If value of attribute is empty, then 'value' is unchanged (to allow a default value) |
References getAttValue().
Referenced by UFunctionCamBase::getImage(), getNext(), UFuncBall_improved::handleCommand(), UFuncPiPi::handleCommand(), UFuncBallKL::handleCommand(), UFuncObj3d::handleCommand(), UFuncCropRow::handleCommand(), UFuncStraightLine::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFuncPCLTest::handleCommand(), UFuncFz::handleCommand(), UFuncTracking::handleCommand(), and UMisRule::unpackRule().
|
inline |
Get a pointer to the start of the next attribute in the list
References data, findEndTag(), getAttBool(), getAttDouble(), getAttInteger(), getAttTime(), getAttUnsignedLong(), getAttValue(), getAttValueBool(), getAttValueD(), getAttValueInt(), getNextAttribute(), getTime(), MAX_SML_NAME_LENGTH, next, print(), and reset().
Referenced by UFunctionCamData::handleCommand(), UFunctionIf::handleIf(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UCmdExe::handleShellCmd(), and UMisRule::unpackRule().
bool USmlTagIn::getNextAttribute | ( | char * | name, |
char * | value, | ||
const int | valBufLength, | ||
const int | nameMaxCnt = MAX_SML_NAME_LENGTH , |
||
bool * | overflow = NULL |
||
) |
Get next attribute and value to these buffers starting from provided 'start' position. e.g. if buffer is: matrix name="A_matrix" rows="3" cols="3" and start is after matrix, then name-> will contain "name" and value-> will contain "A_matrix" (but no quotation marks) and start will point to first character after value.
name | is the name is not filled with more than MAX_SML_NAME_LENGTH characters (or as specified in optional nameMaxCnt parameter). |
value | If there is no value, i.e. a attribute name only, then value will be an empty sthring. value may be NULL (value data ignored). |
valMaxCnt | is the length of the val buffer. |
nameMaxCnt | is the length of the name buffer, default is MAX_SML_NAME_LENGTH true if a name were found before end of start string. |
References next, stringGet(), tag, tagCnt, and valid.
Referenced by UPush::addPushCommand(), UFuncCog::centerOfGravity(), UMisRuleState::createParameterVar(), UFuncFocus::doFocus(), getAttCnt(), getAttValue(), USmlTag::getGmk(), USmlTag::getManSeq(), getNext(), USmlTag::getPose(), USmlTag::getPoseV(), USmlTag::getPosition(), USmlTag::getProbPoly(), USmlTag::getRotation(), UFunctionAvoid::handleAvoid(), UClientCamData::handleCamGet(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamsGetCommand(), UFunctionDisp::handleCommand(), UFunctionCamData::handleCommand(), UFuncView::handleCommand(), UFunctionRoadDrive::handleCommand(), UClientFuncLaser::handleEkf(), UFunctionCamGmk::handleGmkGetCommand(), UFunctionIf::handleIf(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UClientFuncImage::handleImages(), UFunctionImgPool::handleImageSetCommand(), UFuncImgPoly::handleImgPolyCommand(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UFunctionLocater::handleLocater(), UResNavIfMan::handleManData(), UClientFuncSF::handleNewData(), UClientFuncObstGrp::handleNewData(), UResLaserIfScan::handleNewData(), UResLaserIfSf::handleNewData(), UResPcp::handleNewData(), UClientFuncLaser::handleNewData(), UResPoly::handleNewData(), UResNavIfMan::handleNewData(), UResLaserIfObst::handleObst(), UFunctionPassable::handleObstGet(), UClientFuncLaser::handleOdo(), UResIfVar::handleOther(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncLaser::handlePath(), UFunctionCamPath::handlePathGetCommand(), UClientFuncPath::handlePathGetMsg(), UClientFuncPath::handlePathPolygonData(), UClientHandler::handlePingReply(), UClientFuncLaser::handlePlan(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionAvoid::handlePoseToPose(), UFunctionPassable::handleRoad(), UResLaserIfRoad::handleRoad(), UFuncRule::handleRuleSet(), UFunctionLaser::handleScanGetCommand(), UCmdExe::handleServerCommand(), UCmdExe::handleServerPushCommand(), UFunctionLaser::handleSetCommand(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UFuncV360::handleV360Command(), UFunctionVarPool::handleVar(), UClientFuncLaser::handleWpc(), UClientFuncLaser::handleWpf(), UClientFuncBase::printReply(), reset(), UServerClient::sendPingReply(), UClientManSeq::setFromTag(), UClientLaserData::setFromTag(), ULaserData::setFromTag(), UClientLaserPi::setFromTag(), ULaserPi::setFromTag(), ULaserPathResult::setFromTag(), UPlannerValue::setFromTag(), USmlSource::skipToEndTag(), UCmdExe::sysModuleCmd(), UComCamSml::unpack(), and UMisRule::unpackRule().
|
inline |
Return the tag length in characters. The end-tag character is at this position if an end-tag is found at all.
References tagCnt.
Referenced by UFunctionIf::dataTrap(), USmlSource::getNextTag(), UClientFuncGmk::handleGmkGet(), UResBin::handleNewData(), and UClientHandler::threadRunLoop().
|
inline |
Get last read tagname by function getNextTag(); Returns pointer to read string.
References tagName.
Referenced by UFunctionIf::dataTrap(), UFuncGndAna::doAnalysis(), UFuncCog::doBark(), UFuncFocus::doFocus(), UCmdExe::executeFunction(), UServerPushImplement::getFunctionOwner(), USmlTag::getGmk(), USmlTag::getLineSegment(), USmlTag::getManSeq(), UServerClient::getNamespace(), USmlSource::getNextTag(), USmlTag::getObstacle(), USmlTag::getObstacleGroup(), USmlTag::getPolygon(), USmlTag::getPoseTime(), USmlTag::getProbPoly(), USmlSource::getToEndTag(), UClientHandler::gotNewData(), UServerClient::gotNewMessage(), UCmdExe::handleAlive(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncObj3d::handleCloud(), UFuncBall_improved::handleCommand(), UFuncBallKL::handleCommand(), UFuncBall::handleCommand(), UFunctionGps::handleCommand(), UFuncFile::handleCommand(), UFuncPoly::handleCommand(), UFuncImSeg::handleCommand(), UFuncPcp::handleCommand(), UFunctionRoadDrive::handleCommand(), UFunctionDrivePos::handleDrivePos(), UClientFuncLaser::handleGetComplexData(), UClientFuncGmk::handleGmkGet(), UFunctionCamGmk::handleGmkGetCommand(), UClientFuncBase::handleHelp(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageListCommand(), UClientFuncImage::handleImages(), UFunctionLaserIfData::handleLaserIf(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UResNavIfMan::handleManData(), UResPcp::handleNewData(), UResPoly::handleNewData(), UResLaserIfObst::handleObst(), UClientFuncLaser::handleOdo(), UResIfVar::handleOther(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UFunctionPassable::handlePass(), UClientFuncLaser::handlePath(), UClientFuncLaser::handlePlan(), UFunctionImgPool::handlePoolPushCommand(), UResIfVar::handlePoseHist(), UFunctionPoseHist::handlePoseHistCommand(), UFuncPlugBasePush::handlePush(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UFuncRule::handleRuleSet(), UCmdExe::handleServerCommand(), UCmdExe::handleServerPushCommand(), UFunctionLaser::handleSetCommand(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UFunctionSmrIf::handleSmr(), UClientFuncLaser::handleVarData(), UFunctionVarPool::handleVarPush(), UFunctionVarPool::handleVarValues(), UClientFuncLaser::handleWpc(), UFuncRule::listMission(), UFuncRule::listState(), UFunctionVarPool::makeAMethodCall(), UClientFuncBase::printReply(), UFuncEfLine::sendAllLines(), UFuncEfLine::sendBoxLines(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionAvoid::sendCurrentPath(), UCmdExe::sendDebug(), UFunctionBase::sendEndTag(), UCmdExe::sendError(), UFunctionBase::sendFullTag(), UCmdExe::sendInfo(), UFuncObj3d::sendObjects(), UFunctionPassable::sendObstacles(), UServerClient::sendPingReply(), USmlTag::sendProbPoly(), UFunctionPassable::sendRoadLines(), UFunctionLaser::sendScan(), UFunctionBase::sendStartTag(), UFunctionCam::sendStatusReply(), UFunctionVarPool::sendVar(), UCmdExe::sendWarning(), UClientManSeq::setFromTag(), ULaserPathResult::setFromTag(), USmlSource::skipToEndTag(), UCmdExe::sysModuleCmd(), UCmdExe::systemFunction(), UServerPushQueue::systemQueueflush(), UMisRule::unpackInitPostBlock(), and UMisRule::unpackRule().
|
inline |
Get the pointer to the start of the tag - i.e. the '<' character in the source data stream
References tag.
Referenced by UFunctionIf::dataTrap(), USmlSource::getNextTag(), USmlSource::getToEndTag(), UFunctionDisp::handleCommand(), UFuncView::handleCommand(), UClientFuncGmk::handleGmkGet(), UResBin::handleNewData(), UResLaserIfObst::handleObst(), and UResIfVar::handleVar().
bool USmlTagIn::getTime | ( | UTime * | time | ) |
Decode this tag as a time tag. Returns true if both 'sec' and 'usec' attributes are present in tag. All attributes in tag are read at return.
Referenced by USmlTag::getGmk(), getNext(), USmlTag::getProbPoly(), and UClientFuncPath::handlePathPolygonData().
|
inline |
Get a pointer to the last character in the tag, i.e. the '>' character.
References toEnd.
Referenced by USmlSource::getNextTag(), and UMisRule::unpackRule().
|
inline |
Is last read tag (by getNextTag) a group end tag - e.g. < pos3D x=1.1 y=5.5 z=8.8/>
References isFullTag, and valid.
Referenced by UClientHandler::gotNewData(), UClientFuncBase::printReply(), and UMisRule::unpackRule().
|
inline |
Is last read tag (by getNextTag) a group end tag - e.g. < /matrix>
References isEndTag, and valid.
Referenced by UClientHandler::gotNewData(), UResIfVar::handleOther(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncPath::handlePathPolygonData(), UResIfVar::handlePoseHist(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), and UResIfVar::handleVar().
|
inline |
Is tag a phony tag starting with a ?. Returns true if so
References tagName, and valid.
Referenced by UClientHandler::gotNewData(), and UResRule::loadFile().
|
inline |
Is last read tag (by getNextTag) a group start tag - e.g. < matrix>
References isStartTag, and valid.
Referenced by UFunctionIf::dataTrap(), USmlTag::getGmk(), USmlTag::getLineSegment(), USmlTag::getManSeq(), USmlTag::getObstacle(), USmlTag::getObstacleGroup(), USmlTag::getPolygon(), USmlTag::getPoseTime(), USmlTag::getProbPoly(), USmlSource::getToEndTag(), UClientHandler::gotNewData(), UServerClient::gotNewMessage(), UClientFuncLaser::handleGetComplexData(), UClientFuncGmk::handleGmkGet(), UClientFuncBase::handleHelp(), UClientFuncImage::handleImages(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UResNavIfMan::handleManData(), UResPcp::handleNewData(), UClientFuncLaser::handleNewData(), UClientFuncBase::handleNewData(), UResPoly::handleNewData(), UClientFuncObstGrp::handleObst(), UResLaserIfObst::handleObst(), UResLaserIfObst::handleObstGrp(), UClientFuncLaser::handleOdo(), UResIfVar::handleOther(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncLaser::handlePath(), UClientFuncPath::handlePathPolygonData(), UClientFuncLaser::handlePlan(), UResIfVar::handlePoseHist(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UClientFuncLaser::handleVarData(), UClientFuncLaser::handleWpc(), UClientFuncLaser::handleWpf(), UResRule::loadFile(), UClientManSeq::setFromTag(), ULaserPathResult::setFromTag(), USmlSource::skipToEndTag(), UMisRule::unpackInitPostBlock(), and UMisRule::unpackRule().
|
inline |
Compare the tagname with this string
References tagName, and valid.
Referenced by UFunctionIf::dataTrap(), USmlTag::getGmk(), USmlTag::getLineSegment(), USmlTag::getManSeq(), USmlTag::getObstacle(), USmlTag::getObstacleGroup(), USmlTag::getPolygon(), USmlTag::getPoseTime(), USmlTag::getProbPoly(), UClientHandler::gotNewData(), UFunctionImage::handleCommand(), UFunctionPoseHist::handleCommand(), UFuncStereo::handleCommand(), UFunctionCamPath::handleCommand(), UFunctionVarPool::handleCommand(), UFuncV360::handleCommand(), UFuncPlan::handleCommand(), UFunctionCam::handleCommand(), UFunctionLocater::handleCommand(), UFuncKeep::handleCommand(), UFuncRhdIf::handleCommand(), UFunctionLaser::handleCommand(), UFuncFocus::handleCommand(), UFunctionSmrIf::handleCommand(), UFunctionDrivePos::handleCommand(), UFuncCog::handleCommand(), UFunctionLaserIfData::handleCommand(), UFunctionLaserIfScan::handleCommand(), UFunctionAvoid::handleCommand(), UFunctionPassable::handleCommand(), UFuncLocalize::handleCommand(), UFuncImgPoly::handleCommand(), UFuncTOF::handleCommand(), UClientFuncLaser::handleGetComplexData(), UClientFuncGmk::handleGmkGet(), UClientFuncImage::handleImages(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UResNavIfMan::handleManData(), UClientFuncSimScan::handleNewData(), UClientFuncPath::handleNewData(), UClientFuncSF::handleNewData(), UClientFuncCam::handleNewData(), UClientFuncObstGrp::handleNewData(), UClientFuncImage::handleNewData(), UClientFuncGmk::handleNewData(), UResLaserIfObst::handleNewData(), UResLaserIfScan::handleNewData(), UResLaserIfSf::handleNewData(), UResPcp::handleNewData(), UResIfVar::handleNewData(), UClientFuncLaser::handleNewData(), UResLaserIfRoad::handleNewData(), UClientFuncBase::handleNewData(), UResPoly::handleNewData(), UResNavIfMan::handleNewData(), UClientFuncObstGrp::handleObst(), UResLaserIfObst::handleObst(), UClientFuncLaser::handleOdo(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncLaser::handlePath(), UClientFuncPath::handlePathPolygonData(), UClientFuncLaser::handlePlan(), UResIfVar::handlePoseHist(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UClientFuncLaser::handleVarData(), UClientFuncLaser::handleWpc(), UResRule::loadFile(), UClientManSeq::setFromTag(), ULaserPathResult::setFromTag(), UPlannerValue::setFromTag(), USmlSource::skipToEndTag(), UCmdExe::systemFunction(), UServerClient::trapMessage(), UMisRule::unpackInitPostBlock(), and UMisRule::unpackRule().
|
inline |
Compare the tagname with this string. And return true if it is the right end tag. An '/' is appended to the provided tag.
References tagName, and valid.
Referenced by UFunctionIf::dataTrap(), USmlTag::getGmk(), USmlTag::getLineSegment(), USmlTag::getManSeq(), USmlSource::getNextTag(), USmlTag::getObstacle(), USmlTag::getObstacleGroup(), USmlTag::getPolygon(), USmlTag::getPoseTime(), USmlTag::getProbPoly(), USmlSource::getToEndTag(), UClientHandler::gotNewData(), UClientFuncLaser::handleGetComplexData(), UClientFuncGmk::handleGmkGet(), UClientFuncBase::handleHelp(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UResNavIfMan::handleManData(), UResPcp::handleNewData(), UResPoly::handleNewData(), UResLaserIfObst::handleObst(), UClientFuncLaser::handleOdo(), UClientFuncLaser::handlePath(), UClientFuncLaser::handlePlan(), UResIfVar::handlePoseHist(), UResLaserIfRoad::handleRoad(), UClientFuncLaser::handleVarData(), UClientFuncLaser::handleWpc(), UClientManSeq::setFromTag(), ULaserPathResult::setFromTag(), USmlSource::skipToEndTag(), UMisRule::unpackInitPostBlock(), and UMisRule::unpackRule().
|
inline |
Is the buffer holding a full tag, then the endtag '>' is at position tagCnt. Returns true if buffer holds a full tag.
References tagEndFound, and valid.
Referenced by USmlSource::getNextTag().
|
inline |
It the tag valid. Returns true if valid - i.e. has a name.
References valid.
Referenced by UFunctionIf::dataTrap(), getAttCnt(), getAttValue(), USmlSource::getNextTag(), UClientFuncBase::handleHelp(), UClientFuncPath::handlePathPolygonData(), UServerInMsg::operator=(), UCmdExe::sysModuleCmd(), and UCmdExe::systemFunction().
void USmlTagIn::print | ( | const char * | preString | ) |
Print tag - or the first 100 characters if it is longer
References UQevent::consoleReply(), qevent, tag, tagCnt, and xml2str().
Referenced by USmlTag::getGmk(), USmlTag::getLineSegment(), USmlTag::getManSeq(), getNext(), USmlTag::getObstacle(), USmlTag::getObstacleGroup(), USmlTag::getPolygon(), USmlTag::getPoseTime(), USmlTag::getProbPoly(), UClientHandler::gotNewData(), UClientFuncCam::handleCamGet(), UClientFuncGmk::handleGmkGet(), UClientFuncBase::handleHelp(), UClientFuncImage::handleImageList(), UClientFuncImage::handleImages(), UClientFuncSF::handleNewData(), UClientFuncObstGrp::handleNewData(), UResLaserIfScan::handleNewData(), UResLaserIfSf::handleNewData(), UClientFuncLaser::handleNewData(), UClientFuncBase::handleNewData(), UResNavIfMan::handleNewData(), UClientFuncLaser::handleOdo(), UResIfVar::handleOther(), UClientFuncPath::handlePathPolygonData(), UClientHandler::handlePingReply(), UClientFuncLaser::handlePlan(), UResIfVar::handleVar(), and UClientFuncLaser::handleWpc().
bool USmlTagIn::reset | ( | ) |
Reset to the state, where no attributes are read, i.e. ready to get next attribute after the tag name. true if the tag is valid.
References getNextAttribute(), isEndTag, isFullTag, isStartTag, next, tag, tagCnt, tagName, and valid.
Referenced by UPush::addPushCommand(), UServerPush::addPushCommand(), getAttCnt(), getAttValue(), USmlTag::getGmk(), USmlTag::getLineSegment(), USmlTag::getManSeq(), getNext(), UServerPushQueue::getNextTimedPushElement(), USmlTag::getObstacleGroup(), USmlTag::getPose(), USmlTag::getPoseTime(), USmlTag::getPoseV(), USmlTag::getPosition(), USmlTag::getProbPoly(), USmlTag::getRotation(), USmlTag::getTimeofday(), UClientCamData::handleCamGet(), UClientFuncSF::handleNewData(), UClientFuncObstGrp::handleNewData(), UResLaserIfScan::handleNewData(), UResLaserIfSf::handleNewData(), UClientFuncLaser::handleNewData(), UResNavIfMan::handleNewData(), UResIfVar::handleOther(), UResIfVar::handlePoseHist(), UCmdExe::handleShellCmd(), UFunctionVarPool::handleVar(), UResIfVar::handleVar(), UClientManSeq::setFromTag(), ULaserPathResult::setFromTag(), UPlannerValue::setFromTag(), setTag(), UComCamSml::unpack(), and UMisRule::unpackRule().
void USmlTagIn::setBinaryTag | ( | const char * | name, |
const char * | data, | ||
int | dataCnt | ||
) |
Set binary tag
name | is a string with the name of the user of the binary data. |
data | is the rx-buffer with the binary data. |
dataCnt | is the number of data received. |
Referenced by allowTagEndInString(), and UClientHandler::threadRunLoop().
bool USmlTagIn::setTag | ( | const char * | tagString | ) |
Set and analyze tag initially. Tags may start with an '<', if not the first non-white space is assumed to be tag name.
References maxi(), reset(), tag, tagCnt, tagEndFound, toEnd, and valid.
Referenced by UMisRuleState::createParameterVar(), USmlSource::getNextTag(), UServerClient::gotNewMessage(), UServerInMsg::setMessage(), UServerClient::trapMessage(), and UServerClient::UServerClient().
bool USmlTagIn::setTag | ( | const char * | tagString, |
int | tagStringCnt | ||
) |
Set tag, when also specifying the buffer length. NB! requires that the brackets is available, e.g. a message MUST start with a '<'. Returns true if tag-name is found.
References findEndTag(), reset(), tag, tagCnt, tagEndFound, and valid.
|
inline |
Set valid flag
References valid.
Referenced by UFunctionIf::dataTrap(), USmlSource::getNextTag(), and UServerInMsg::setMessage().
|
protected |
Allow tag end to be inside a string - strict XML allows this
Referenced by allowTagEndInString(), findEndTag(), and USmlTagIn().
|
protected |
Is a group end tag - e.g. < /matrix>
Referenced by isAnEndTag(), and reset().
|
protected |
is a full tag - e.g. < pos3D x="1.1" y="5.5" z="8.8"/>
Referenced by isAFullTag(), and reset().
|
protected |
Is a group start tag - e.g. < matrix>
Referenced by isAStartTag(), and reset().
|
protected |
Pointer to next character to analyse
Referenced by getNext(), getNextAttribute(), reset(), and USmlTagIn().
|
protected |
Buffer for the complete tag
Referenced by findEndTag(), getNextAttribute(), getTagStart(), print(), reset(), setTag(), USmlTag::skipToEndTag(), and USmlTagIn().
|
protected |
Length of tag buffer
Referenced by getNextAttribute(), getTagCnt(), print(), reset(), setTag(), and USmlTagIn().
|
protected |
True if tagCnt is the '>' character in the tag
Referenced by isTagEndFound(), setTag(), and USmlTagIn().
|
protected |
Name of last read tag - by getNextTag function
Referenced by getTagName(), isAPhonyTag(), isTagA(), isTagAnEnd(), reset(), and USmlTagIn().
|
protected |
Pointer to the end (close) character if found otherwise a NULL pointer
Referenced by findEndTag(), getToEnd(), and setTag().
|
protected |
Is SML tag valid - i.e. has a name
Referenced by getNextAttribute(), isAFullTag(), isAnEndTag(), isAPhonyTag(), isAStartTag(), isTagA(), isTagAnEnd(), isTagEndFound(), isValid(), reset(), setTag(), setValid(), and USmlTagIn().