AURobotServers
4
|
#include <userverqueue.h>
Public Member Functions | |
USmlTagIn * | getTag () |
UServerInMsg | operator= (UServerInMsg source) |
void | print (const char *preStr) |
const char * | print (const char *preStr, char *buff, const int buffCnt) |
bool | setMessage (int client, const char *msg, int size, bool raw) |
Public Attributes | |
int | client |
char | message [MAX_MESSAGE_LENGTH_TO_CAM+1] |
UTime | rxTime |
bool | serverPushCommand |
int | size |
USmlTagIn | tag |
Class structure for one received message
|
inline |
Get pointer to SML-tag structure
Referenced by UFunctionImgPool::handleImageListCommand(), UFunctionVarPool::handleVarValues(), UFunctionVarPool::sendVar(), UServerPushQueue::systemQueueflush(), and UComCamSml::unpack().
UServerInMsg UServerInMsg::operator= | ( | UServerInMsg | source | ) |
Set as a copy of source
References client, USmlTagIn::isValid(), message, serverPushCommand, setMessage(), size, and tag.
void UServerInMsg::print | ( | const char * | preStr | ) |
Print message info on console after the provided prestring 'preStr'.
References client, message, and size.
Referenced by UCmdExe::handleOneMessageFromQueue(), UServerInQueue::list(), UServerInQueue::print(), and testServerPort().
const char * UServerInMsg::print | ( | const char * | preStr, |
char * | buff, | ||
const int | buffCnt | ||
) |
print this queue element to string buffer
preStr | ia text to print at start of message |
buff | is the string buffer to use |
buffCnt | is the max length to use of the string buffer |
References client, UTime::getMicrosec(), UTime::getSec(), MAX_MESSAGE_LENGTH_TO_CAM, message, rxTime, and size.
bool UServerInMsg::setMessage | ( | int | client, |
const char * | msg, | ||
int | size, | ||
bool | raw | ||
) |
Set message data, and trim whitespace if a text message
client | is the index of the client posting the message. |
msg | is the message to be saved in the queue - should be no larger than 1000 (MAX_MESSAGE_LENGTH_TO_CAM). |
size | is the size of the message - a '0' will be placed here so that message will be a terminated string. |
raw | if false, then the message is assumed to be a xml tag - with or without breckets. |
References client, MAX_MESSAGE_LENGTH_TO_CAM, message, UTime::now(), rxTime, serverPushCommand, USmlTagIn::setTag(), USmlTagIn::setValid(), size, and tag.
Referenced by UServerInQueue::addMessage(), UPush::addPushCommand(), UServerPush::addPushCommand(), UCmdExe::handleServerPushCommand(), operator=(), and UResRuleState::run().
int UServerInMsg::client |
Index number for source client
Referenced by UPush::addPushCommand(), UServerPush::addPushCommand(), UCmdExe::executeFunction(), UServerPush::gotNewData(), UFunctionCam::handleCamSetCommand(), UFuncFile::handleCommand(), UFuncLobst::handleCommand(), UFuncMapObst::handleCommand(), UFuncPoly::handleCommand(), UFuncPcp::handleCommand(), UFunctionIf::handleIf(), UFunctionImgPool::handleImageListCommand(), UFuncLocalize::handleLocalize(), UFuncLoca2::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), URawServerPort::handleOneMessageFromQueue(), UCmdExe::handleOneMessageFromQueue(), UResCron::handleOnePushCmd(), UCmdExe::handleOneServerPushMessage(), UFunctionPassable::handlePass(), UFunctionPoseHist::handlePoseHistCommand(), UFuncRule::handleRuleSet(), UCmdExe::handleServerCommand(), UCmdExe::handleServerPushCommand(), UFunctionLaser::handleSetCommand(), UCmdExe::killServer(), UFuncRule::listState(), UServerPush::needNewData(), operator=(), print(), UPush::pushEvent(), UCmdExe::sendDebug(), UCmdExe::sendError(), UCmdExe::sendHelp(), UCmdExe::sendHelpDone(), UCmdExe::sendHelpStart(), UFunctionImgBase::sendImage(), UCmdExe::sendInfo(), UCmdExe::sendMsg(), UFunctionLaser::sendScan(), UFunctionCam::sendStatusReply(), UCmdExe::sendWarning(), setMessage(), UCmdExe::sysModuleCmd(), UCmdExe::systemFunction(), and UServerPushQueue::systemQueueflush().
char UServerInMsg::message[MAX_MESSAGE_LENGTH_TO_CAM+1] |
Message (is zero terminated)
Referenced by UCmdExe::executeFunction(), UFunctionImgPool::handleImageListCommand(), URawServerPort::handleOneMessageFromQueue(), UCmdExe::handleOneMessageFromQueue(), UResCron::handleOnePushCmd(), UCmdExe::handleOneServerPushMessage(), UServerInQueue::list(), operator=(), print(), setMessage(), and UServerPushQueue::systemQueueflush().
UTime UServerInMsg::rxTime |
Queue time
Referenced by URawServerPort::handleOneMessageFromQueue(), UServerInQueue::list(), print(), and setMessage().
bool UServerInMsg::serverPushCommand |
Is this a command generated as a server push command. This type should NOT reply to client if the request can not be fulfilled. (but return false to function handler.
Referenced by UPush::addPushCommand(), UServerPush::addPushCommand(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UCmdExe::handleServerPushCommand(), operator=(), and setMessage().
int UServerInMsg::size |
Reply handler Actual message lemgth
Referenced by UServerInQueue::addMessage(), UServerInQueue::list(), operator=(), print(), and setMessage().
USmlTagIn UServerInMsg::tag |
Command decomposition values (assumed to be a SML tag)
Referenced by UPush::addPushCommand(), UServerPush::addPushCommand(), UFuncCog::centerOfGravity(), UFuncGndAna::doAnalysis(), UFuncCog::doBark(), UFuncFocus::doFocus(), UGroundPatches::doPatchAnalysis(), UCmdExe::executeFunction(), UFuncLaserBase::getDevice(), UServerPushImplement::getFunctionOwner(), UFunctionCamBase::getImage(), UServerPushQueue::getNextTimedPushElement(), UFuncLaserBase::getScan(), UFuncPlan::handleAddCon(), UFuncLocalize::handleAddLine(), UFuncLoca2::handleAddLine(), UFuncPlan::handleAddPoint(), UCmdExe::handleAlive(), UFunctionAvoid::handleAvoid(), UFuncPlan::handlecalculatecost(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamPushCommand(), UFunctionCam::handleCamSetCommand(), UFunctionCam::handleCamsGetCommand(), UFuncObj3d::handleCloud(), UFuncImu::handleCommand(), Funcavoid::handleCommand(), UFuncVarMrc::handleCommand(), UFuncRectify::handleCommand(), UFunctionImage::handleCommand(), UFunctionPoseHist::handleCommand(), UFuncStereo::handleCommand(), UFunctionCamPath::handleCommand(), UFunctionVarPool::handleCommand(), UFuncBall_improved::handleCommand(), UFuncV360::handleCommand(), UFunctionCamData::handleCommand(), UFunctionDisp::handleCommand(), UFuncBallKL::handleCommand(), UFuncPiPi::handleCommand(), UFuncView::handleCommand(), UFuncPlan::handleCommand(), UFuncObj3d::handleCommand(), UFuncRoseBot::handleCommand(), UFunctionGps::handleCommand(), UFuncBall::handleCommand(), UFuncFile::handleCommand(), UFunctionCam::handleCommand(), UFuncCropRow::handleCommand(), UFuncLobst::handleCommand(), UFuncBin::handleCommand(), UFunctionLocater::handleCommand(), UFuncMapObst::handleCommand(), UFuncPoly::handleCommand(), UFuncCron::handleCommand(), UFuncKeep::handleCommand(), UFuncGndAna::handleCommand(), UFuncPpl::handleCommand(), UFuncRadar::handleCommand(), UFuncRhdIf::handleCommand(), UFunctionLaser::handleCommand(), UFuncImSeg::handleCommand(), UFuncStraightLine::handleCommand(), UFuncFocus::handleCommand(), UFuncLoca2::handleCommand(), UFuncPcp::handleCommand(), UFunctionSmrIf::handleCommand(), UFuncEfLine::handleCommand(), UFuncLinefinder::handleCommand(), UFunctionDrivePos::handleCommand(), UFuncCog::handleCommand(), UFuncPCLTest::handleCommand(), UFunctionLaserIfScan::handleCommand(), UFunctionLaserIfData::handleCommand(), UFunctionRoadDrive::handleCommand(), UFunctionPassable::handleCommand(), UFunctionAvoid::handleCommand(), UFuncV4lGst::handleCommand(), UFuncFz::handleCommand(), UFuncLocalize::handleCommand(), UFuncImgPoly::handleCommand(), UFuncTOF::handleCommand(), UFuncTracking::handleCommand(), UFuncLaserBox::handleCommand(), UFunctionDrivePos::handleDrivePos(), UFuncPlan::handleFindRoute(), UFuncPlan::handleGetPoint(), UFunctionCamGmk::handleGmkGetCommand(), UFunctionIf::handleIf(), UFunctionIf::handleIfPush(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UFunctionImgPool::handleImageSetCommand(), UFuncImgPoly::handleImgPolyCommand(), UFuncKeep::handleKeep(), UFuncKeep::handleKeepPush(), UFuncKinect::handleKinect(), UFunctionLaserIfData::handleLaserIf(), UFunctionLaserIfScan::handleLaserIf(), UFunctionLaserIfData::handleLaserObst(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionLocater::handleLocater(), UFuncPiCam::handleNormal(), UFunctionPassable::handleObstGet(), UFuncLocalize::handleOutputDist(), UFunctionPassable::handlePass(), UFunctionCamPath::handlePathGetCommand(), UFunctionImgPool::handlePoolPushCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionPoseHist::handlePoseHistPush(), UFunctionAvoid::handlePoseToPose(), UFuncPTgrey::handlePTgrey(), UFuncPlugBasePush::handlePush(), UFuncRhdIf::handlePushCommand(), UCmdExe::handleQuit(), UFuncLocalize::handleResample(), UFuncLocalize::handleResetLocalizer(), UFuncPlan::handleResetPlan(), UFuncRhdIf::handleRhd(), UFunctionPassable::handleRoad(), UFuncRule::handleRuleSet(), UFunctionLaser::handleScanGetCommand(), UFunctionLaser::handleScanPushCommand(), UCmdExe::handleServerCommand(), UCmdExe::handleServerPushCommand(), UFunctionLaser::handleSetCommand(), UFuncLocalize::handleSetInitCov(), UFuncLocalize::handleSetInitPose(), UFuncLocalize::handleSetTable(), UCmdExe::handleShellCmd(), UFunctionSmrIf::handleSmr(), UFunctionSmrIf::handleSmrPush(), UFuncStereo::handleStereo(), UFuncTOF::handleTOF(), UFuncV360::handleV360Command(), UFuncV360::handleV360Push(), UFunctionVarPool::handleVar(), UFunctionVarPool::handleVarPush(), UFunctionVarPool::handleVarValues(), UFuncRule::listMission(), UFuncRule::listState(), UFunctionVarPool::makeAMethodCall(), operator=(), UFuncEfLine::sendAllLines(), UFuncEfLine::sendBoxLines(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionAvoid::sendCurrentPath(), UCmdExe::sendDebug(), UFunctionBase::sendEndTag(), UCmdExe::sendError(), UFunctionBase::sendFullTag(), UFunctionImgBase::sendImage(), UCmdExe::sendInfo(), UFunctionBase::sendInfo(), UFuncObj3d::sendObjects(), UFunctionPassable::sendObstacles(), USmlTag::sendProbPoly(), UFunctionPassable::sendRoadLines(), UFunctionLaser::sendScan(), UFunctionBase::sendStartTag(), UFunctionCam::sendStatusReply(), UFunctionVarPool::sendVar(), UCmdExe::sendWarning(), setMessage(), UCmdExe::sysModuleCmd(), and UCmdExe::systemFunction().