AURobotServers
4
|
#include <ucampush.h>
Public Member Functions | |
int | addCamPushCommand (UServerInMsg *msg) |
virtual void | callGotNewDataWithObject () |
virtual void | createVars () |
virtual void | gotNewImage (UImage *raw) |
virtual void | imgUpdated () |
virtual bool | needNewPushData () |
void | print (const char *preString) |
const char * | print (const char *preString, char *buff, int buffCnt) |
UCamPush (UCamDevBase *dev) | |
~UCamPush () | |
Public Member Functions inherited from UCamMounted | |
bool | getMtoPix (UPosition pos3D, bool useRad, float *pixx, float *pixy) |
UPosition | getPos () |
UPosition | getPosCC () |
const char * | getPosName () |
UPosRot | getPosRot () |
URotation | getRot () |
URotation | getRotCC () |
bool | isClientInCharge (int client) |
bool | loadCamSettings (Uconfig *ini, const char *mountkey) |
virtual bool | logImage (UImage *img) |
bool | saveCamSettings (Uconfig *ini, const char *mountkey) |
void | setClientInCharge (int client) |
void | setImageLogging (UImageLog *value) |
void | setMountName (const char *posName) |
void | setPosOnRobot (UPosition *pos, URotation *rot) |
void | setPosOnRobot (UPosRot *pose3d) |
void | setPosOnRobotCC (UPosition *pos, URotation *rot) |
UCamMounted (UCamDevBase *device) | |
virtual | ~UCamMounted () |
Public Member Functions inherited from UCamRad | |
UCamPar * | getCamPar () |
int | getDefaultColFormat () |
bool | getDefaultRemRadErr () |
bool | getImageSnapshot (UImage *image) |
bool | removeRadialError (UImage *source, UImage *destination) |
void | saveRadialCorrectionMatrix (char *filename) |
bool | setCameraParameters (float hx, float hy, float k1, float k2, float focalLng) |
void | setDefaultRemRadErr (bool value) |
bool | setRadialErrorMatrix () |
UCamRad (UCamDevBase *device) | |
void | updateLensParams (const int height, const int width) |
virtual | ~UCamRad () |
Public Member Functions inherited from UCamPanTiltDevice | |
int | getPanMaxRange () |
int | getPanMinRange () |
int | getPanPos () |
int | getTiltMaxRange () |
int | getTiltMinRange () |
int | getTiltPos () |
bool | isPantiltSupported () |
bool | isPantiltValid () |
bool | pantiltSetPosition (bool relative, int pan, int tilt) |
bool | pantiltToHomePosition () |
bool | pantiltUpdatePosition () |
bool | setPantiltStatus () |
UCamPanTiltDevice (UCamDevBase *device) | |
Public Member Functions inherited from UCamBase | |
const char * | getCamName () |
UCamDevBase * | getDev () |
int | getDevNum () |
void | setTypeName (const char *newName) |
void | setVarPool (UVarPool *vpd) |
UCamBase (UCamDevBase *device) | |
virtual | ~UCamBase () |
Public Member Functions inherited from UServerPush | |
int | addPushCommand (UServerInMsg *msg) |
bool | doPushCall (UServerPushElement *pe, const char *value) |
void | flushClientCmds (int clientIdx) |
UServerPushImplement * | getImplementor () |
int | getPushCmdCnt (int *cmdCnt, int *callCnt) |
UServerPushQueue * | getPushQueue () |
bool | gotCmdExe () |
void | gotNewData (void *pData) |
bool | isUpdated (int lastCnt, int *newCnt) |
bool | needNewData () |
void | print (const char *preString) |
void | print (const char *preString, char *buff, int buffCnt) |
void | servicePendingPushCmds () |
void | setCmdExe (UServerPushImplement *executor) |
void | setImplementor (UServerPushImplement *executor) |
bool | setResource (UResBase *resource, bool remove) |
bool | setUpdated (const char *value) |
Add watch object if needed. An image or other object is updated. set object as updated, with an extra qualifier, that may be used as a parameter in a push call. this push list is then added to the to the push list examined by the server thread. when server thread reach this push list it will call to get a possible associated data structure by a call to needNewData() whish is expected to call gotNewData(void * data_structure) - but now in the server thread. More... | |
UServerPush () | |
virtual | ~UServerPush () |
Private Attributes | |
UVariable * | varPushNeeded |
Additional Inherited Members | |
Public Attributes inherited from UCamRad | |
UVarPool * | varBaseStruct |
Protected Member Functions inherited from UCamRad | |
bool | getRadialU2DOffset (float xu, float yu, float *dxd, float *dyd) |
UXYoffset | getRadialU2DOffsetInt (int x, int y) |
virtual void | imageSizeChanged (double iResFactor) |
bool | lensParChanged () |
bool | removeRadialErrorOnePlane (unsigned char ps[], unsigned char pd[], unsigned int height, unsigned int width, float pixSize, bool halfRes) |
bool | removeRadialErrorPixels (UPixel ps[], UPixel pd[], unsigned int height, unsigned int width, float pixSize) |
Protected Member Functions inherited from UCamPanTiltDevice | |
bool | protPantiltGetPosition () |
bool | protPantiltGetRange () |
bool | protPantiltReset (bool resetPan, bool resetTilt) |
Protected Attributes inherited from UCamMounted | |
int | clientInControl |
UImageLog * | logip |
UVariable * | varCamPose |
UVariable * | varMountName |
Protected Attributes inherited from UCamBase | |
UCamDevBase * | dev |
UVarPool * | vars |
Camera that can push functions. I.e. send a command to the queue every time an image is detected.
UCamPush::UCamPush | ( | UCamDevBase * | dev | ) |
Constructor
UCamPush::~UCamPush | ( | ) |
destructor
|
inline |
Add a camera push command. A camera push command is triggered when a new image is available.
References UServerPush::addPushCommand(), and print().
Referenced by UFunctionCam::handleCamPushCommand().
|
inlinevirtual |
Called from main server thread, when ready to handle push command. But need (optional) push object, so this function must (eventually) call 'gotNewData(object)'
Reimplemented from UServerPush.
References UCamDevBase::callGotNewDataWithObject(), and UServerPush::gotNewData().
|
virtual |
Create locally maintained variables - if any
Reimplemented from UCamMounted.
References UVarPool::addVar(), UCamMounted::createVars(), varPushNeeded, and UCamBase::vars.
Referenced by imgUpdated().
|
inlinevirtual |
A new image is received. NB! is called bythe read-frame thread for the camera.
Reimplemented from UCamBase.
References UServerPush::gotNewData().
|
inlinevirtual |
Image is updated now, note this in client handler
Reimplemented from UCamBase.
References createVars(), and UServerPush::setUpdated().
|
inlinevirtual |
Request to test push commands for need of new data. If new data is needed then 'gotNewImage()' should be called.
Reimplemented from UCamBase.
References UServerPush::needNewData(), UVariable::setInt(), and varPushNeeded.
void UCamPush::print | ( | const char * | preString | ) |
Debug print of camera status
Referenced by addCamPushCommand(), and UCamPool::print().
const char * UCamPush::print | ( | const char * | preString, |
char * | buff, | ||
int | buffCnt | ||
) |
Print status to string buffer.
References bool2str(), UCamBase::dev, UCamDevBase::getCameraName(), UCamBase::getDev(), UCamDevBase::getDeviceNumber(), UCamDevBase::getFrameRate(), UCamDevBase::getHeight(), UPosRot::getPos(), UCamMounted::getPosName(), UCamMounted::getPosRot(), UPosRot::getRot(), UCamDevBase::getWidth(), UCamDevBase::isCameraOpen(), UServerPush::print(), UPosition::snprint(), and URotation::snprint().
|
private |
Referenced by createVars(), and needNewPushData().