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

#include <usmltagin.h>

Inheritance diagram for USmlTagIn:
Inheritance graph

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
 

Detailed Description

A class for analysis and construction of an Sml tag. Sml is a minor implementation of XML.

Author
Christian Andersen

Constructor & Destructor Documentation

USmlTagIn::USmlTagIn ( )

Constructor

References ignoreTagEndInString, next, tag, tagCnt, tagEndFound, tagName, and valid.

USmlTagIn::~USmlTagIn ( )

Destructor

Member Function Documentation

void USmlTagIn::allowTagEndInString ( )
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.

Referenced by getNext(), and setTag().

bool USmlTagIn::getAttBool ( const char *  name,
bool *  value,
bool  defaultValue = true 
)
int USmlTagIn::getAttCnt ( )
bool USmlTagIn::getAttDouble ( const char *  name,
double *  value,
double  defaultValue = 0.0 
)

Get double value for this named attribute.

Parameters
nameis the name of the searched attribute
valueis where the value is returned, unchange if no such attribute (may be NULL)
defaultValueis 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 
)
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.

Parameters
nameis the name of the searched attribute
valueis 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.

Parameters
nameis the name of the searched attribute
valueis 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.
bool USmlTagIn::getAttTime ( const char *  name,
UTime value,
UTime  defaultValue 
)

Get time value for this named attribute – assumed to be in decimal seconds since 1 jan 1970, with up to 6 decimals.

Parameters
nameis the name of the searched attribute
valueis where the value is returned, not changed if no such attribute
defaultValueis 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.

Parameters
nameis the name of the searched attribute
valueis where the value is returned (may be NULL)
defaultValueis 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.

Parameters
nameis the name of the searched attribute
valueis a string buffer for the result. If no such attribute, then no change to buffer
bufLengthis 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.

Parameters
nameof the attribute to be found
valuepointer to where the value are to be stored (not NULL), unchanged if no such attribute.
defValueis the value if attribute string is empty or not one of the allowed values
Returns
true if such attribute exist in the tag.

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.

Parameters
nameof the attribute to be found
valuepointer 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)
Returns
true if such attribute exist in the tag.

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.

Parameters
nameof the attribute to be found
valuepointer 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)
Returns
true if such attribute exist in the tag.

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().

const char* USmlTagIn::getNext ( )
inline
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.

Parameters
nameis the name is not filled with more than MAX_SML_NAME_LENGTH characters (or as specified in optional nameMaxCnt parameter).
valueIf there is no value, i.e. a attribute name only, then value will be an empty sthring. value may be NULL (value data ignored).
valMaxCntis the length of the val buffer.
nameMaxCntis 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().

int USmlTagIn::getTagCnt ( )
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().

const char* USmlTagIn::getTagName ( )
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().

const char* USmlTagIn::getTagStart ( )
inline
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().

const char* USmlTagIn::getToEnd ( )
inline

Get a pointer to the last character in the tag, i.e. the '>' character.

References toEnd.

Referenced by USmlSource::getNextTag(), and UMisRule::unpackRule().

bool USmlTagIn::isAFullTag ( )
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().

bool USmlTagIn::isAnEndTag ( )
inline
bool USmlTagIn::isAPhonyTag ( )
inline

Is tag a phony tag starting with a ?. Returns true if so

References tagName, and valid.

Referenced by UClientHandler::gotNewData(), and UResRule::loadFile().

bool USmlTagIn::isAStartTag ( )
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().

bool USmlTagIn::isTagA ( const char *  tag)
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().

bool USmlTagIn::isTagAnEnd ( const char *  tag)
inline
bool USmlTagIn::isTagEndFound ( )
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().

bool USmlTagIn::isValid ( )
inline
void USmlTagIn::print ( const char *  preString)
bool USmlTagIn::reset ( )
void USmlTagIn::setBinaryTag ( const char *  name,
const char *  data,
int  dataCnt 
)

Set binary tag

Parameters
nameis a string with the name of the user of the binary data.
datais the rx-buffer with the binary data.
dataCntis 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.

void USmlTagIn::setValid ( bool  value)
inline

Set valid flag

References valid.

Referenced by UFunctionIf::dataTrap(), USmlSource::getNextTag(), and UServerInMsg::setMessage().

Member Data Documentation

bool USmlTagIn::ignoreTagEndInString
protected

Allow tag end to be inside a string - strict XML allows this

Referenced by allowTagEndInString(), findEndTag(), and USmlTagIn().

bool USmlTagIn::isEndTag
protected

Is a group end tag - e.g. < /matrix>

Referenced by isAnEndTag(), and reset().

bool USmlTagIn::isFullTag
protected

is a full tag - e.g. < pos3D x="1.1" y="5.5" z="8.8"/>

Referenced by isAFullTag(), and reset().

bool USmlTagIn::isStartTag
protected

Is a group start tag - e.g. < matrix>

Referenced by isAStartTag(), and reset().

const char* USmlTagIn::next
protected

Pointer to next character to analyse

Referenced by getNext(), getNextAttribute(), reset(), and USmlTagIn().

const char* USmlTagIn::tag
protected
int USmlTagIn::tagCnt
protected

Length of tag buffer

Referenced by getNextAttribute(), getTagCnt(), print(), reset(), setTag(), and USmlTagIn().

bool USmlTagIn::tagEndFound
protected

True if tagCnt is the '>' character in the tag

Referenced by isTagEndFound(), setTag(), and USmlTagIn().

char USmlTagIn::tagName[MAX_SML_NAME_LENGTH]
protected

Name of last read tag - by getNextTag function

Referenced by getTagName(), isAPhonyTag(), isTagA(), isTagAnEnd(), reset(), and USmlTagIn().

const char* USmlTagIn::toEnd
protected

Pointer to the end (close) character if found otherwise a NULL pointer

Referenced by findEndTag(), getToEnd(), and setTag().

bool USmlTagIn::valid
protected

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