AURobotServers
4
|
#include <ureslaserifscan.h>
Public Member Functions | |
virtual const char * | commandList () |
ULaserDataHistory * | getScanHist () |
virtual bool | gotAllResources (char *missingThese, int missingTheseCnt) |
virtual void | handleNewData (USmlTag *tag, const char *ifname) |
virtual const char * | print (const char *preString, char *buff, int buffCnt) |
virtual bool | setResource (UResBase *resource, bool remove) |
virtual const char * | snprint (const char *preString, char *buff, int buffCnt) |
UResLaserIfScan () | |
virtual | ~UResLaserIfScan () |
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 () |
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) |
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 | |
void | createBaseVar () |
virtual void | gotNewData (ULaserDataSet *scan) |
bool | handleLaserScan (USmlTag *tag) |
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 |
char | dataSourceName [MAX_DATA_SOURCE_NAME] |
UResPoseHist * | poseHist |
ULaserDataHistory | scanHist |
UVariable * | varScan |
UVariable * | varSensorOmega |
UVariable * | varSensorX |
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 |
Static Protected Attributes | |
static const int | MAX_DATA_SOURCE_NAME = 10 |
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... | |
Additional Inherited Members | |
Public Attributes inherited from UClientFuncBase | |
ULock | decodeLock |
Public Attributes inherited from UReplay | |
bool | replayTimeAdvancePending |
UTime | replayTimeNow |
Client interface for basic scan data
@author Christian Andersen <jca@elektro.dtu.dk>
|
inline |
Constructor
References callDispOnNewData, commandList(), createBaseVar(), dataSourceName, getResClassID(), UResBase::getResVersion(), handleNewData(), MAX_DATA_SOURCE_NAME, poseHist, UResBase::resVersion, UResBase::setResID(), and ~UResLaserIfScan().
|
virtual |
Destructor
Referenced by UResLaserIfScan().
|
virtual |
Name of function The returned name is intended as informative to clients and should include a version number 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 snprint(), and UResLaserIfScan().
|
protected |
Create variables for this resource
References UResVarPool::addVar(), UResBase::getResVersion(), varScan, varSensorOmega, and varSensorX.
Referenced by getScanHist(), and UResLaserIfScan().
|
inlinestatic |
Fixed name of this resource type
References snprint().
Referenced by UNavPaint::setResource(), UFunctionLaserIfScan::setResource(), UNavView::setResource(), and UResLaserIfScan().
|
inline |
Get pointer to the scan history data
References createBaseVar(), gotNewData(), handleLaserScan(), scan, and scanHist.
Referenced by UFunctionLaserIfScan::handleLaserIf(), and UNavPaint::setResource().
|
virtual |
Is this resource missing any base ressources
Reimplemented from UResVarPool.
References UResPoseHist::getOdoPoseID(), UResVarPool::gotAllResources(), and poseHist.
Referenced by print().
|
protectedvirtual |
The varPool has methods, and a call to one of these are needed. Do the call now and return (a double sized) result in 'value' and return true if the method call is allowed. If the returnStruct and returnStructCnt is not NULL, then a number (no more than initial value of returnStructCnt) of structures based on UDataBase may be returned into returnStruct array of pointers. The returnStructCnt should be modified to the actual number of used pointers (if needed). Called when a new scan is received
References callDispOnNewData, UResVarPool::callGlobal(), and ULaserDataSet::getSerial().
Referenced by getScanHist(), and handleLaserScan().
|
protected |
Decode laser scan parameters
References ULaserDataSet::addPassableInterval(), UPose::clear(), ULaserDataSet::clear(), dataSourceName, ULaserDataSet::getData(), USmlTag::getIfName(), USmlTag::getNBytes(), ULaserDataHistory::getNewScan(), USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), USmlTag::getPose(), USmlTag::getPosition(), USmlTag::getRotation(), ULaserDataSet::getSensorPose(), USmlTagIn::getTagName(), gotNewData(), UPose::h, HEX, hex2int(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), MAX_DATA_SOURCE_NAME, MAX_SML_NAME_LENGTH, mini(), ULaserDataHistory::newBufferValid(), scan, scanHist, UPosRot::set(), UVariable::set6D(), ULaserDataSet::setData(), UClientLaserData::setFromTag(), UClientLaserPi::setFromTag(), UVariable::setInt(), UPosRot::setPos(), ULaserDataSet::setPose(), UPosRot::setRot(), UVariable::setRot(), UTime::setTime(), UClientLaserData::setValue(), USmlTag::skipToEndTag(), str2bool(), varScan, varSensorOmega, varSensorX, UPose::x, and UPose::y.
Referenced by getScanHist(), and handleNewData().
|
virtual |
Got fresh data destined to this function.
Reimplemented from UClientFuncBase.
References USmlTagIn::getNextAttribute(), handleLaserScan(), USmlTagIn::isTagA(), MAX_SML_NAME_LENGTH, USmlTagIn::print(), UClientFuncBase::printReply(), USmlTagIn::reset(), and UClientFuncBase::verboseMessages.
Referenced by UResLaserIfScan().
|
inlinevirtual |
Print status for this resource
Reimplemented from UResVarPool.
References gotAllResources(), setResource(), and snprint().
|
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 print().
|
virtual |
Fixed varsion number for this resource type. Should follow release version, i.e. version 1.28 gives number 128. Should be incremented only when there is change to this class definition, i.e new or changed functions or variables. Print status for this resource
References commandList(), dataSourceName, UVariable::getInt(), ULaserDataHistory::getNewest(), ULaserDataHistory::getScansCnt(), UTime::getTimeAsString(), UPose::h, scanHist, varScan, UPose::x, and UPose::y.
Referenced by getResClassID(), UFunctionLaserIfScan::handleLaserIf(), and print().
|
protected |
Call display dunction when new data is available
Referenced by gotNewData(), and UResLaserIfScan().
|
protected |
Data source name
Referenced by handleLaserScan(), snprint(), and UResLaserIfScan().
|
staticprotected |
Length of data source name
Referenced by handleLaserScan(), and UResLaserIfScan().
|
protected |
Pointer to pose history resource
Referenced by gotAllResources(), setResource(), and UResLaserIfScan().
|
protected |
Data buffer for received data
Referenced by getScanHist(), handleLaserScan(), and snprint().
|
protected |
Index to scannumber
Referenced by createBaseVar(), handleLaserScan(), and snprint().
|
protected |
Index to variable with laser scanner rotation (orientation) (latest sensor)
Referenced by createBaseVar(), and handleLaserScan().
|
protected |
Index to variable with laser scanner position (latest sensor)
Referenced by createBaseVar(), and handleLaserScan().