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

#include <ucampush.h>

Inheritance diagram for UCamPush:
Inheritance graph

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
UCamPargetCamPar ()
 
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 ()
 
UCamDevBasegetDev ()
 
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)
 
UServerPushImplementgetImplementor ()
 
int getPushCmdCnt (int *cmdCnt, int *callCnt)
 
UServerPushQueuegetPushQueue ()
 
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

UVariablevarPushNeeded
 

Additional Inherited Members

- Public Attributes inherited from UCamRad
UVarPoolvarBaseStruct
 
- 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
 
UImageLoglogip
 
UVariablevarCamPose
 
UVariablevarMountName
 
- Protected Attributes inherited from UCamBase
UCamDevBasedev
 
UVarPoolvars
 

Detailed Description

Camera that can push functions. I.e. send a command to the queue every time an image is detected.

Author
Christian Andersen

Constructor & Destructor Documentation

UCamPush::UCamPush ( UCamDevBase dev)

Constructor

UCamPush::~UCamPush ( )

destructor

Member Function Documentation

int UCamPush::addCamPushCommand ( UServerInMsg msg)
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().

virtual void UCamPush::callGotNewDataWithObject ( )
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().

void UCamPush::createVars ( )
virtual

Create locally maintained variables - if any

Reimplemented from UCamMounted.

References UVarPool::addVar(), UCamMounted::createVars(), varPushNeeded, and UCamBase::vars.

Referenced by imgUpdated().

virtual void UCamPush::gotNewImage ( UImage raw)
inlinevirtual

A new image is received. NB! is called bythe read-frame thread for the camera.

Reimplemented from UCamBase.

References UServerPush::gotNewData().

virtual void UCamPush::imgUpdated ( )
inlinevirtual

Image is updated now, note this in client handler

Reimplemented from UCamBase.

References createVars(), and UServerPush::setUpdated().

virtual bool UCamPush::needNewPushData ( )
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 
)

Member Data Documentation

UVariable* UCamPush::varPushNeeded
private

Referenced by createVars(), and needNewPushData().


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