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

#include <userverqueue.h>

Public Member Functions

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

Detailed Description

Class structure for one received message

Member Function Documentation

USmlTagIn* UServerInMsg::getTag ( )
inline
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

Parameters
preStria text to print at start of message
buffis the string buffer to use
buffCntis the max length to use of the string buffer
Returns
a pointer to the 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

Parameters
clientis the index of the client posting the message.
msgis the message to be saved in the queue - should be no larger than 1000 (MAX_MESSAGE_LENGTH_TO_CAM).
sizeis the size of the message - a '0' will be placed here so that message will be a terminated string.
rawif false, then the message is assumed to be a xml tag - with or without breckets.
Returns
true if space for message

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

Member Data Documentation

int UServerInMsg::client
char UServerInMsg::message[MAX_MESSAGE_LENGTH_TO_CAM+1]
UTime UServerInMsg::rxTime
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().


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