AURobotServers
4
|
#include <ureslaserifsf.h>
Public Member Functions | |
void | clear () |
virtual const char * | commandList () |
void | createBaseVar () |
UFeaturePool * | getSfPool () |
virtual void | handleNewData (USmlTag *tag, const char *ifname) |
virtual bool | setResource (UResBase *resource, bool remove) |
virtual void | snprint (const char *preString, char *buff, int buffCnt) |
UResLaserIfSf () | |
virtual | ~UResLaserIfSf () |
Public Member Functions inherited from UResIfBase | |
UResIfBase () | |
~UResIfBase () | |
Public Member Functions inherited from UClientFuncBase | |
virtual void | changedNamespace (const char *newNamespace) |
virtual void | doTimeTick () |
int | getMsgCnt () |
bool | getVerbose () |
virtual const char * | name () |
bool | sendMsg (UClientPortSml *cnn, const char *buff, int buffCnt) |
bool | sendMsg (UClientPortSml *cnn, const char *buff) |
void | setVerbose (bool value) |
UClientFuncBase () | |
virtual | ~UClientFuncBase () |
Public 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 () |
virtual bool | gotAllResources (char *missingThese, int missingTheseCnt) |
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) |
virtual void | createResources () |
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 | print (const char *preString) |
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 () |
Static Public Member Functions | |
static const char * | getResClassID () |
Static Public Member Functions inherited from UResVarPool | |
static const char * | getResClassID () |
Protected Member Functions | |
bool | handlePass (USmlTag *tag) |
bool | handleRoad (USmlTag *sfTag) |
bool | handleSF (USmlTag *tag) |
virtual void | newDataAvailable () |
Protected Member Functions inherited from UClientFuncBase | |
void | handleHelp (USmlTag *tag) |
void | printReply (USmlTagIn *tag, const char *preString) |
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 | |
bool | callDispOnNewData |
UResPoseHist * | poseHist |
UFeaturePool * | sfPool |
UVariable * | varSerial |
UVariable * | varSfGrps |
UVariable * | varTime |
Protected Attributes inherited from UClientFuncBase | |
int | msgHandled |
char | serverNamespace [MAX_SML_NAME_LENGTH] |
int | serverNamespaceValue |
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 |
Additional Inherited Members | |
Public Attributes inherited from UClientFuncBase | |
ULock | decodeLock |
Public Attributes inherited from UReplay | |
bool | replayTimeAdvancePending |
UTime | replayTimeNow |
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... | |
Extract scanfeature lines
@author Christian Andersen <jca@elektro.dtu.dk>
|
inline |
Constructor
References callDispOnNewData, createBaseVar(), UResVarPool::createVarSpace(), getResClassID(), poseHist, UResBase::setResID(), sfPool, and ~UResLaserIfSf().
|
virtual |
|
inline |
Clear all data in simple data pool
References UFeaturePool::clear(), handlePass(), handleRoad(), handleSF(), newDataAvailable(), and sfPool.
Referenced by UFunctionLaserIfData::handleLaserIf().
|
virtual |
Function, that shall return a string with all handled commands, i.e. should return "gmk gmk2d guidemark", if commands starting with any of these three keywords are handled by this function
Reimplemented from UClientFuncBase.
Referenced by getResClassID(), and snprint().
void UResLaserIfSf::createBaseVar | ( | ) |
Create base variables and methods for var-pool
References UVarPool::addVar(), UResBase::getResVersion(), UResVarPool::getVarPool(), varSerial, varSfGrps, and varTime.
Referenced by getSfPool(), and UResLaserIfSf().
|
inlinestatic |
Name of function The returned name is intended as informative to clients and should include a version number Fixed name of this resource type
References commandList(), handleNewData(), and setResource().
Referenced by UNavPaint::setResource(), UFunctionLaserIfData::setResource(), UNavView::setResource(), and UResLaserIfSf().
|
inline |
Get a pointer to the scan feature pool
References createBaseVar(), sfPool, and snprint().
Referenced by UFunctionLaserIfData::handleLaserIf(), and UNavPaint::paint().
|
virtual |
Got fresh data destined to this function.
Reimplemented from UClientFuncBase.
References USmlTagIn::getNextAttribute(), handlePass(), handleRoad(), handleSF(), USmlTagIn::isTagA(), MAX_SML_NAME_LENGTH, USmlTagIn::print(), UClientFuncBase::printReply(), USmlTagIn::reset(), and UClientFuncBase::verboseMessages.
Referenced by getResClassID().
|
protected |
Decode the received Passable interval message
References UFeaturePool::addData(), UFeatureData::addSegment(), UOnEvent::event(), USmlTagIn::getAttValue(), USmlTag::getLineSegment(), USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), UPosRot::getPos(), USmlTag::getPose(), USmlTag::getPosition(), UPosRot::getRot(), USmlTag::getRotation(), UFeaturePool::getScansCnt(), UFeaturePool::getSensorPose(), USmlTagIn::getTagName(), UFeaturePool::gotSensorPose(), USmlTagIn::isAnEndTag(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), MAX_SML_NAME_LENGTH, UFeatureData::MAX_TYPE_LENGTH, UFeatureData::moveLocalToOdo(), newDataAvailable(), UFeatureData::pose, UFeatureData::scanTime, UVariable::setInt(), UFeaturePool::setSensorPose(), UVariable::setTime(), UTime::setTimeTod(), sfPool, USmlTag::skipToEndTag(), UFeatureData::type, varSerial, varTime, and UClientFuncBase::verboseMessages.
Referenced by clear(), and handleNewData().
|
protected |
Decode road edge lines
References UFeaturePool::addData(), UFeatureData::addSegment(), UOnEvent::event(), USmlTagIn::getAttValue(), USmlTag::getLineSegment(), USmlTag::getNextTag(), UFeaturePool::getScansCnt(), USmlTagIn::getTagName(), USmlTagIn::isAnEndTag(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), UFeatureData::MAX_SEG_STR_LENGTH, UFeatureData::MAX_TYPE_LENGTH, newDataAvailable(), UFeatureData::scanTime, UVariable::setInt(), UVariable::setTime(), UTime::setTimeTod(), sfPool, USmlTag::skipToEndTag(), str2bool(), UFeatureData::type, varSfGrps, and varTime.
Referenced by clear(), and handleNewData().
|
protected |
Decode the received ScanFeature message
References UFeaturePool::addData(), UFeatureData::addSegment(), UPosRot::clear(), UFeatureData::coordinateRef, UOnEvent::event(), USmlTagIn::getAttValue(), USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), UPosRot::getPos(), USmlTag::getPose(), UResPoseHist::getPoseAtTime(), USmlTag::getPosition(), UPosRot::getRot(), USmlTag::getRotation(), UFeaturePool::getScansCnt(), UFeaturePool::getSensorPose(), USmlTagIn::getTagName(), UFeaturePool::gotSensorPose(), USmlTagIn::isAnEndTag(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), ULineSegment::length, UFeatureData::MAX_SEG_STR_LENGTH, MAX_SML_NAME_LENGTH, UFeatureData::MAX_TYPE_LENGTH, UFeatureData::moveLocalToOdo(), newDataAvailable(), UTime::now(), UFeatureData::pose, poseHist, UFeatureData::scanTime, ULine::set2D(), UVariable::setInt(), UFeaturePool::setSensorPose(), UVariable::setTime(), UTime::setTimeTod(), sfPool, USmlTag::skipToEndTag(), UFeatureData::type, varSfGrps, and varTime.
Referenced by clear(), and handleNewData().
|
protectedvirtual |
Called after decode of a set of obstacle updates
References callDispOnNewData, UResVarPool::callGlobal(), UVariable::getValued(), and varSerial.
Referenced by clear(), handlePass(), handleRoad(), and handleSF().
|
virtual |
Set ressource as needed (probably not used by this resource)
Reimplemented from UResVarPool.
References UResPoseHist::getOdoPoseID(), UResBase::isA(), poseHist, and UResVarPool::setResource().
Referenced by getResClassID().
|
virtual |
Print status for this resource
References commandList(), UFeaturePool::getScansCnt(), UTime::getTimeAsString(), UVariable::getValued(), UTime::setTime(), sfPool, and varTime.
Referenced by getSfPool(), UFunctionLaserIfData::handleLaserIf(), and UFunctionLaserIfData::handleLaserObst().
|
protected |
Call display dunction when new data is available
Referenced by newDataAvailable(), and UResLaserIfSf().
|
protected |
Group of line segments from scanfeatures
Referenced by handleSF(), setResource(), and UResLaserIfSf().
|
protected |
Group of line segments from scanfeatures
Referenced by clear(), getSfPool(), handlePass(), handleRoad(), handleSF(), snprint(), UResLaserIfSf(), and ~UResLaserIfSf().
|
protected |
Index to lastest related scan serial number
Referenced by createBaseVar(), handlePass(), and newDataAvailable().
|
protected |
Index to count of fature groups
Referenced by createBaseVar(), handleRoad(), and handleSF().
|
protected |
Index to latest update time
Referenced by createBaseVar(), handlePass(), handleRoad(), handleSF(), and snprint().