AURobotServers
4
|
#include <usmltag.h>
Public Member Functions | |
bool | cnnVerbose () |
bool | codeLineSegment (ULineSegment *seg, char *s, const unsigned int bufferLength, const char *name, const char *extra=NULL) |
char * | codeManoeuvre (UManoeuvre *man, char *buf, int bufCnt, char *name) |
bool | codeManPPSeq (UManPPSeq *manseq, char *buf, int bufCnt, char *name) |
const char * | codeObstacle (UObstacle *obst, char *buf, int bufCnt, char *name) |
const char * | codePolygon (UPolygon *poly, char *buf, int bufCnt, char *name, const char *extra) |
char * | codePose (UPose pose, char *buf, int bufCnt, const char *name, const char *extraAtt=NULL) |
char * | codePoseTime (UPoseTime pt, char *buf, int bufCnt, const char *name) |
char * | codePoseTime1 (UPoseTime pt, char *buf, int bufCnt, const char *name, const char *extraAtt=NULL) |
char * | codePoseV (UPoseV pv, char *buf, int bufCnt, const char *name) |
const char * | codePosition (UPosition *pos, char *s, const unsigned int bufferLength, const char *name, const char *extra=NULL) |
const char * | codePosition (UPosition pos, char *s, const unsigned int bufferLength, const char *name, const char *extra=NULL) |
const char * | codeRotation (URotation *rot, char *s, const unsigned int bufferLength, const char *name) |
const char * | codeRotation (URotation rot, char *s, const unsigned int bufferLength, const char *name) |
const char * | codeTime (const UTime time, char *s, const unsigned int bufferLength, const char *name) |
bool | getGmk (UGmk *gmk) |
const char * | getIfName () |
bool | getLineSegment (ULineSegment *seg) |
bool | getManSeq (UManSeq *man) |
int | getNBytes (char *buffer, int n, int msTimeout) |
bool | getNextTag (USmlTag *tag, int msTimeout, USmlTagIn *failEndTag=NULL, char *beforeTagBuffer=NULL, int *beforeTagCnt=NULL) |
bool | getObstacle (UObstacle *obst, char *name) |
bool | getObstacleGroup (UObstacleGroup *oGrp, char *name) |
bool | getPolygon (UPolygon *poly, char *name) |
bool | getPose (UPose *pose) |
bool | getPoseT (UPoseTime *pose) |
bool | getPoseTime (UPoseTime *pose, char *name) |
bool | getPoseTVQ (UPoseTVQ *pose) |
bool | getPoseV (UPoseV *pose) |
bool | getPosition (UPosition *pos) |
bool | getProbPoly (UProbPoly *poly) |
bool | getRotation (URotation *rot) |
bool | getTimeofday (UTime *time, char *name) |
bool | outputData (const char *message) |
bool | sendProbPoly (UProbPoly *poly, UServerInMsg *msg, const char *name, const char *extraAtt, UCmdExe *exe) |
void | setCnn (USmlSource *connection) |
bool | skipNBytes (int n, int msTimeout) |
bool | skipToEndTag (int msTimeout) |
USmlTag () | |
Public Member Functions inherited from USmlTagIn | |
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 | |
USmlSource * | cnn |
Protected Attributes inherited from USmlTagIn | |
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 |
Class that codes and decodes more complex structores to and from the SML format
|
inline |
Constructor
References cnn.
|
inline |
Is connection verbose
References cnn, codePosition(), and USmlSource::isVerbose().
Referenced by UClientFuncCam::handleCamGet(), UClientFuncGmk::handleGmkGet(), UClientFuncImage::handleImages(), UResLaserIfObst::handleObst(), UResIfVar::handleOther(), and UClientFuncPath::handlePathPolygonData().
bool USmlTag::codeLineSegment | ( | ULineSegment * | seg, |
char * | s, | ||
const unsigned int | bufferLength, | ||
const char * | name, | ||
const char * | extra = NULL |
||
) |
Code the line segment to in a XML like text of the form <lineSeg name="name" legngth=1.234 extra/> <pos3d name="start" x=1.0e12 y=2.0 z=2.0/> <pos3d name="vec" x=9.9 y=9.9 z=9.9/> </lineSeg>. If extra is not NULL, then the extra string info is inserted as 'extra' into start tag. Returns true if data is fitted into buffer.
References codePosition(), ULineSegment::length, ULine::pos, and ULine::vec.
Referenced by codeRotation(), UFunctionPassable::handlePass(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionPassable::sendRoadLines(), and testSmlEncoding().
char * USmlTag::codeManoeuvre | ( | UManoeuvre * | man, |
char * | buf, | ||
int | bufCnt, | ||
char * | name | ||
) |
Code a manoeuvre. Returns a pointer to the coded string (buf).
References a, buf, UManoeuvre::getAcc(), UManoeuvre::getDistance(), UManoeuvre::getManType(), UManoeuvre::getVel(), UManoeuvre::MAN_ARC, UManoeuvre::MAN_LINE, and UManoeuvre::MAN_STOP.
Referenced by codeManPPSeq(), and codeRotation().
bool USmlTag::codeManPPSeq | ( | UManPPSeq * | manseq, |
char * | buf, | ||
int | bufCnt, | ||
char * | name | ||
) |
Code a small sequence of manoeuvres to d a pose-to-pose manoeuvre. Returns a pointer to the coded string (buf).
References codeManoeuvre(), codePoseV(), UManPPSeq::getEndPoseV(), UManPPSeq::getEndVel(), UManPPSeq::getMan(), UManPPSeq::getManTime(), UManPPSeq::getSeqCnt(), and UManPPSeq::getStartPoseV().
Referenced by codeRotation(), UFunctionRoadDrive::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionAvoid::sendCurrentPath(), and UFunctionAvoid::sendManSeq().
const char * USmlTag::codeObstacle | ( | UObstacle * | obst, |
char * | buf, | ||
int | bufCnt, | ||
char * | name | ||
) |
Code an obstacle polygon including start and end pose etc. Requires approc 90 bytes per vertice plus about 400 characters for other values
References buf, codePolygon(), codePoseTime(), UObstacle::codeXmlAttributes(), UObstacle::getDataType(), UObstacle::getPoseFirst(), UObstacle::getPoseLast(), and mini().
Referenced by codeRotation(), UFuncObj3d::sendObjects(), and UFunctionPassable::sendObstacles().
const char * USmlTag::codePolygon | ( | UPolygon * | poly, |
char * | buf, | ||
int | bufCnt, | ||
char * | name, | ||
const char * | extra | ||
) |
Code a polygon using the tagname 'polygon'. Handles any number of vertices, but require a buffer of about 90 characters per vertice (+ about 50 for frame)
poly | is the polygon to code, |
buf | is the buffer to code to, |
bufCnt | is the length of the buffer, |
name | is an optional extra name attribute value - is added as name value in quotes. |
extra | is a full string of extra attributes (assumed to be coded to legal xml standard, i.e. aaa="bbb" ccc="555" .... |
References UPolygon::codeXml().
Referenced by codeObstacle(), codeRotation(), and UPolyItem::codeXML().
char * USmlTag::codePose | ( | UPose | pose, |
char * | buf, | ||
int | bufCnt, | ||
const char * | name, | ||
const char * | extraAtt = NULL |
||
) |
Code a pose to this string, and include a name attribute, if name holds a name. Additional attributes (like time, velocity may be placed in 'extraAtt'
References buf, UPose::h, UPose::x, and UPose::y.
Referenced by codePoseTime(), codePoseTime1(), codeRotation(), UFunctionPassable::handlePass(), UFunctionAvoid::sendCurrentPath(), UFunctionPassable::sendFullScan(), UFuncEfLine::sendRobotPoseAndSensorPosition(), and UFunctionLaser::sendScan().
char * USmlTag::codePoseTime | ( | UPoseTime | pt, |
char * | buf, | ||
int | bufCnt, | ||
const char * | name | ||
) |
Code a pose-time structure as a combination of pose and time tags
References buf, codePose(), codeTime(), UPoseTime::getPose(), and UPoseTime::t.
Referenced by codeObstacle(), codeRotation(), UFuncObj3d::sendObjects(), and UFunctionPassable::sendObstacles().
char * USmlTag::codePoseTime1 | ( | UPoseTime | pt, |
char * | buf, | ||
int | bufCnt, | ||
const char * | name, | ||
const char * | extraAtt = NULL |
||
) |
Code pose time as one tag. Extra attributes may be added in 'extraAtt'
References codePose(), UTime::getMicrosec(), UPoseTime::getPose(), UTime::getSec(), and UPoseTime::t.
Referenced by codeRotation(), and UFunctionPoseHist::handlePoseHistCommand().
char * USmlTag::codePoseV | ( | UPoseV | pv, |
char * | buf, | ||
int | bufCnt, | ||
const char * | name | ||
) |
Code a robot pose including velocity. All is in metric units, meter and radians Returns a pointer to the coded string (buf).
References buf, UPoseV::getVel(), UPose::h, UPose::x, and UPose::y.
Referenced by codeManPPSeq(), codeRotation(), and UFunctionRoadDrive::handleCommand().
const char * USmlTag::codePosition | ( | UPosition * | pos, |
char * | s, | ||
const unsigned int | bufferLength, | ||
const char * | name, | ||
const char * | extra = NULL |
||
) |
Make position to SML string <pos3d name="name" x="123.456" y="123.456" z="123.2"/ [extra]> Returns pointer to the buffer string 's', if buffer is too short the message will be truncated. If name is NULL or an empty string, the name attribute will be omitted. The 'extra' is extra attributes appended before the '/>' close tag.
References UPosition::codeXml().
Referenced by cnnVerbose(), codeLineSegment(), codePosition(), UFuncBall_improved::handleCommand(), UFuncBall::handleCommand(), UFunctionPassable::handlePass(), UFunctionPassable::sendFullScan(), UFunctionCamGmk::sendGmk(), UFuncEfLine::sendRobotPoseAndSensorPosition(), UFunctionLaser::sendScan(), and testSmlEncoding().
|
inline |
Slight variation of the main function with the same name
References codePosition(), and codeRotation().
const char * USmlTag::codeRotation | ( | URotation * | rot, |
char * | s, | ||
const unsigned int | bufferLength, | ||
const char * | name | ||
) |
Code a rotation structore into string s of length 'buffer length. Returns a pointer to s, if buffer length is sufficient, else NULL is returned
References URotation::Kappa, URotation::Omega, and URotation::Phi.
Referenced by codePosition(), codeRotation(), UFunctionPassable::handlePass(), UFunctionPassable::sendFullScan(), UFunctionCamGmk::sendGmk(), UFuncEfLine::sendRobotPoseAndSensorPosition(), and UFunctionLaser::sendScan().
|
inline |
Slight variation of the main function with the same name
References buf, codeLineSegment(), codeManoeuvre(), codeManPPSeq(), codeObstacle(), codePolygon(), codePose(), codePoseTime(), codePoseTime1(), codePoseV(), codeRotation(), codeTime(), getGmk(), getLineSegment(), getManSeq(), getObstacle(), getObstacleGroup(), getPolygon(), getPose(), getPoseT(), getPoseTime(), getPoseV(), getPosition(), getProbPoly(), getRotation(), getTimeofday(), and sendProbPoly().
const char * USmlTag::codeTime | ( | const UTime | time, |
char * | s, | ||
const unsigned int | bufferLength, | ||
const char * | name | ||
) |
Code a time of dat as a single tag. Returns a pointer to s, if buffer length is sufficient, else NULL is returned
References UTime::getMicrosec(), and UTime::getSec().
Referenced by codePoseTime(), codeRotation(), and UFunctionCamGmk::sendGmk().
bool USmlTag::getGmk | ( | UGmk * | gmk | ) |
decode a guidemark and store result in the provided structure. Returns true if full guidemari is obtained.
References cnn, USmlTagIn::getNextAttribute(), USmlSource::getNextTag(), UPosRot::getPos(), getPosition(), UPosRot::getRot(), getRotation(), USmlTagIn::getTagName(), USmlTagIn::getTime(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), UGmk::MAX_CODE_LENGTH, MAX_SML_NAME_LENGTH, USmlTagIn::print(), USmlTagIn::reset(), UGmk::set(), UGmk::setPosValid(), UGmk::setTime(), and USmlSource::skipToEndTag().
Referenced by codeRotation(), and UClientFuncGmk::handleGmkGet().
|
inline |
Get interface name - if set
References cnn, getPoseTVQ(), and USmlSource::ifName.
Referenced by UResLaserIfScan::handleLaserScan().
bool USmlTag::getLineSegment | ( | ULineSegment * | seg | ) |
Decode line segment from a SML-string. Returns true if all data were present.
References cnn, USmlTagIn::getAttValue(), USmlSource::getNextTag(), getPosition(), USmlTagIn::getTagName(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), ULineSegment::length, ULine::pos, USmlTagIn::print(), USmlTagIn::reset(), USmlSource::skipToEndTag(), and ULine::vec.
Referenced by codeRotation(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UClientManSeq::setFromTag(), and ULaserPathResult::setFromTag().
bool USmlTag::getManSeq | ( | UManSeq * | man | ) |
Receive a sequense of manoeuvres
References a, UManPPSeq::add(), UManSeq::addP2P(), cnn, USmlTagIn::getAttValue(), UManSeq::getNewArc(), UManSeq::getNewLine(), UManSeq::getNewStop(), USmlTagIn::getNextAttribute(), USmlSource::getNextTag(), getPoseV(), USmlTagIn::getTagName(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), MAX_SML_NAME_LENGTH, USmlTagIn::print(), USmlTagIn::reset(), UManPPSeq::setEndPoseV(), UManPPSeq::setEndVel(), UManPPSeq::setManTime(), UManPPSeq::setStartPoseV(), and USmlSource::skipToEndTag().
Referenced by codeRotation(), UClientManSeq::setFromTag(), and ULaserPathResult::setFromTag().
|
inline |
Shortcut to cnn (UClientPortSml) function
References cnn, and USmlSource::getNBytes().
Referenced by UClientFuncImage::handleImages(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), and UClientFuncLaser::handleLaserScan().
bool USmlTag::getNextTag | ( | USmlTag * | tag, |
int | msTimeout, | ||
USmlTagIn * | failEndTag = NULL , |
||
char * | beforeTagBuffer = NULL , |
||
int * | beforeTagCnt = NULL |
||
) |
Shortcut to cnn (UClientPortSml) function Read the next available tag into the provided buffer.
tag,The | found tag is loaded into the 'tag' buffer. |
int | timeout in ms |
failEndTag | The search is also stopped if an end-tag is found matching the 'failEndTag' (makes the function return false). |
beforeTagBuffer | is (if != NULL) filled with the data before the next tag. |
beforeTagCnt | is on entry the buffer size. The number of bytes filled into the buffer returned into 'beforeTagCnt'. If there is more data before the next tag than the space in 'beforeTagBuffer' then the function returns with 'beforeTagBuffer' equal to the buffer size and the function returnes true. Note the buffer is NOT nul-terminated (to allow binary data), so the user must add a nul at the 'beforeTagCnt' position if the result is used as a string. true if tag is valid (and the beforeTagBuffer has no overflow). |
References cnn, and USmlSource::getNextTag().
Referenced by UClientFuncLaser::handleGetComplexData(), UClientFuncGmk::handleGmkGet(), UClientFuncBase::handleHelp(), UClientFuncImage::handleImages(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UResNavIfMan::handleManData(), UResPcp::handleNewData(), UResPoly::handleNewData(), UClientFuncObstGrp::handleObst(), UResLaserIfObst::handleObst(), UClientFuncLaser::handleOdo(), UResIfVar::handleOther(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncLaser::handlePath(), UClientFuncPath::handlePathGetMsg(), UClientFuncPath::handlePathPolygonData(), UClientFuncLaser::handlePlan(), UResIfVar::handlePoseHist(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UClientFuncLaser::handleVarData(), UClientFuncLaser::handleWpc(), UClientManSeq::setFromTag(), ULaserPathResult::setFromTag(), and skipToEndTag().
bool USmlTag::getObstacle | ( | UObstacle * | obst, |
char * | name | ||
) |
Decode an obstacle for connection stream
References cnn, USmlTagIn::getAttValue(), USmlSource::getNextTag(), getPolygon(), getPoseTime(), UObstacle::getPPoseFirst(), UObstacle::getPPoseLast(), USmlTagIn::getTagName(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), USmlTagIn::print(), UObstacle::setHits(), UObstacle::setValid(), USmlSource::skipToEndTag(), and str2bool().
Referenced by codeRotation(), and getObstacleGroup().
bool USmlTag::getObstacleGroup | ( | UObstacleGroup * | oGrp, |
char * | name | ||
) |
Decode an obstacle group
References cnn, USmlTagIn::getAttValue(), UObstacleGroup::getNewObst(), USmlSource::getNextTag(), getObstacle(), UObstacleGroup::getObstacle(), UObstacleGroup::getObstsCnt(), getPoseTime(), UObstacleGroup::getPPoseFirst(), UObstacleGroup::getPPoseLast(), USmlTagIn::getTagName(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), ULock::lock(), UObstacleGroup::MAX_OBSTACLES, USmlTagIn::print(), UObstacleGroup::removeObst(), USmlTagIn::reset(), USmlSource::skipToEndTag(), str2bool(), and ULock::unlock().
Referenced by codeRotation(), UClientFuncObstGrp::handleObst(), and UResLaserIfObst::handleObstGrp().
bool USmlTag::getPolygon | ( | UPolygon * | poly, |
char * | name | ||
) |
Decode polygon from this start tag and place result in 'poly' structure. Return any name in 'name', and get additional charracters from 'cnn' connection.
References UPolygon::add(), cnn, UPolygon::color, USmlTagIn::getAttValue(), USmlSource::getNextTag(), UPolygon::getPointsCnt(), UPolygon::getPointsMax(), getPosition(), USmlTagIn::getTagName(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), USmlTagIn::print(), UPolygon::setAsPolygon(), USmlSource::skipToEndTag(), and str2bool2().
Referenced by codeRotation(), getObstacle(), and UResPoly::handleNewData().
bool USmlTag::getPose | ( | UPose * | pose | ) |
Extract pose attributes from this tag.
References USmlTagIn::getNextAttribute(), UPose::h, MAX_SML_NAME_LENGTH, USmlTagIn::reset(), UPose::x, and UPose::y.
Referenced by codeRotation(), getPoseT(), getPoseTime(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UClientManSeq::setFromTag(), and ULaserPathResult::setFromTag().
bool USmlTag::getPoseT | ( | UPoseTime * | pose | ) |
Get pose time in compact form. <pt od="1234567890.123456" x=0.123 y="1.234" th="0.0123"/>. Returns true if all needed attributes were present.
References USmlTagIn::getAttValue(), getPose(), UTime::setTimeU(), and UPoseTime::t.
Referenced by codeRotation(), getPoseTVQ(), and UResIfVar::handlePoseHist().
bool USmlTag::getPoseTime | ( | UPoseTime * | pose, |
char * | name | ||
) |
Get a pose-time structure. If there is a name attribute, then set it to the name structure (name buffer must be able to hold 30 characters).
References cnn, USmlTagIn::getAttValue(), USmlSource::getNextTag(), getPose(), USmlTagIn::getTagName(), getTimeofday(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), USmlSource::isVerbose(), USmlTagIn::print(), USmlTagIn::reset(), USmlSource::skipToEndTag(), and UPoseTime::t.
Referenced by codeRotation(), getObstacle(), and getObstacleGroup().
bool USmlTag::getPoseTVQ | ( | UPoseTVQ * | pose | ) |
DEcode a pose with time and potentiallt velocity and quality figure.
References USmlTagIn::getAttValue(), getPoseT(), UPoseTVQ::q, and UPoseTVQ::vel.
Referenced by getIfName(), and UServerClient::trapMessage().
bool USmlTag::getPoseV | ( | UPoseV * | pose | ) |
Get a pose-velocity structure from this tag. Returns true if all fields (x,y,h,v) were present.
References USmlTagIn::getNextAttribute(), UPose::h, MAX_SML_NAME_LENGTH, USmlTagIn::reset(), UPoseV::setVel(), UPose::x, and UPose::y.
Referenced by codeRotation(), and getManSeq().
bool USmlTag::getPosition | ( | UPosition * | pos | ) |
Decode a position tag. Returns true if all valeues were decoded.
References USmlTagIn::getNextAttribute(), UDataBase::isA(), MAX_SML_NAME_LENGTH, USmlTagIn::reset(), UPosition::x, UPosition::y, and UPosition::z.
Referenced by codeRotation(), getGmk(), getLineSegment(), getPolygon(), getProbPoly(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), and ULaserPathResult::setFromTag().
bool USmlTag::getProbPoly | ( | UProbPoly * | poly | ) |
Decode a polygon
References UProbPoly::addPos(), UProbPoly::clear(), cnn, USmlTagIn::getAttValue(), USmlTagIn::getNextAttribute(), USmlSource::getNextTag(), UPolygon::getPointsCnt(), getPosition(), USmlTagIn::getTagName(), USmlTagIn::getTime(), UPose::h, USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), UProbPoly::isValid(), USmlSource::isVerbose(), MAX_SML_NAME_LENGTH, USmlTagIn::print(), USmlTagIn::reset(), UProbPoly::setCromaSD(), UProbPoly::setPoly(), UProbPoly::setPoseOrg(), UProbPoly::setValid(), USmlSource::skipToEndTag(), str2bool(), UPose::x, and UPose::y.
Referenced by codeRotation(), and UClientFuncLaser::handleGetComplexData().
bool USmlTag::getRotation | ( | URotation * | rot | ) |
Decode rotation from this tag. Returns true if all thress parts are present (Omega, Phi and Kappa)
References USmlTagIn::getNextAttribute(), URotation::Kappa, MAX_SML_NAME_LENGTH, URotation::Omega, URotation::Phi, and USmlTagIn::reset().
Referenced by codeRotation(), getGmk(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncSF::handleSF(), and UResLaserIfSf::handleSF().
bool USmlTag::getTimeofday | ( | UTime * | time, |
char * | name | ||
) |
Get time value from this tag.
References USmlTagIn::getAttValue(), USmlTagIn::reset(), and UTime::setTime().
Referenced by codeRotation(), and getPoseTime().
|
inline |
Shortcut to cnn (UClientPortSml) function Shortcut to cnn (UClientPortSml) function
References cnn, and USmlSource::outputData().
Referenced by UResCamIfImg::gotNewImage().
bool USmlTag::sendProbPoly | ( | UProbPoly * | poly, |
UServerInMsg * | msg, | ||
const char * | name, | ||
const char * | extraAtt, | ||
UCmdExe * | exe | ||
) |
Send an UProbPoly structure. Add some extra attributes in start tag if extraAtt is not NULL (or empty).
poly | is the polygon to be send, |
msg | is the message reference for client number etc. |
name | is an optional value for a name attribute |
extraAtt | an additional (optional) string with more attributes for the polygon start tag |
exe | is a server core pointer that implements the send functions Returns true if send. |
References bool2str(), UPose::getAsSml(), UTime::getAsSml(), UProbPoly::getCromaSD(), UProbPoly::getIsObst(), UPolygon::getPoints(), UPolygon::getPointsCnt(), UProbPoly::getPoseOrg(), UProbPoly::getPoseTime(), USmlTagIn::getTagName(), UCmdExe::sendMsg(), UServerInMsg::tag, UPosition::x, and UPosition::y.
Referenced by codeRotation(), UFuncImgPoly::findAreaFromSeedRGB(), and UFunctionCamPath::findPath().
|
inline |
|
inline |
Shortcut to cnn (UClientPortSml) function
References cnn, and USmlSource::skipNBytes().
|
inline |
Shortcut to cnn (UClientPortSml) function
References cnn, getNextTag(), USmlSource::skipToEndTag(), and USmlTagIn::tag.
Referenced by UClientFuncLaser::handleGetComplexData(), UClientFuncGmk::handleGmkGet(), UClientFuncImage::handleImages(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UResPcp::handleNewData(), UClientFuncBase::handleNewData(), UResPoly::handleNewData(), UClientFuncObstGrp::handleObst(), UResLaserIfObst::handleObst(), UResLaserIfObst::handleObstGrp(), UResIfVar::handleOther(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncPath::handlePathPolygonData(), UResIfVar::handlePoseHist(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UResLaserIfRoad::handleRoad(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UClientFuncLaser::handleVarData(), and UClientManSeq::setFromTag().
|
protected |
Client connection from wich to acquire more data - when needed
Referenced by cnnVerbose(), getGmk(), getIfName(), getLineSegment(), getManSeq(), getNBytes(), getNextTag(), getObstacle(), getObstacleGroup(), getPolygon(), getPoseTime(), getProbPoly(), outputData(), setCnn(), skipNBytes(), skipToEndTag(), and USmlTag().