Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetNetClient.h

Go to the documentation of this file.
00001 
00030 /*
00031 pure theorical
00032 ^^^^^^^^^^^^^^^
00033 
00034         LAN 100 Mbps    (12,5 Mb/s = 12800 Kb/s = 13107200 bytes/s)
00035 
00036 
00037         320*240 *3 *char        = 230400 bytes          -> MAX 56.888 fps
00038 
00039         320*320 *3 *char        = 307200 bytes          -> MAX 42.666 fps
00040 
00041         640*480 *3 *char        = 921600 bytes          -> MAX 14.222 fps
00042 
00043 
00044 
00045 
00046 */
00047 
00048 
00049 
00050 #ifndef __VETLIB_VETNETCLIENT_H__
00051  #define __VETLIB_VETNETCLIENT_H__
00052 
00053  #include "../vetDefs.h"
00054  #include "../vetOutput.h"
00055 
00056  #include "../vetFrameCache.h"
00057  #include "../vetFrameCache24.h"
00058  #include "../vetFrameRGB.h"
00059  #include "../vetFrameGrey.h"
00060 
00061  #include <time.h>      // clock()
00062 
00063 
00064 class vetNetClient :  public vetOutput
00065  {
00066 
00067         protected:
00068 
00073                 int runmode;
00074 
00080                 long v_sleeptime;
00081 
00086                 long frameCount;
00087 
00093                 clock_t lastFrameTime;
00094 
00099                 float lastFps;
00100 
00105                 float mediumFps;
00106 
00111                 long lastExTime;
00112 
00117                 long mediumExTime;
00118 
00122                 void updateFps();
00123 
00127                 void updateExtime();
00128 
00129         public:
00130 
00134                 enum RUNMODE { FPS_STAT, IMG_STAT };
00135 
00141                 vetNetClient(RUNMODE mode = vetNetClient::FPS_STAT);
00142 
00143 
00148                 int run() { return VETRET_NOT_IMPLEMENTED; };
00149 
00155                 int setHeight(unsigned int value) { return VETRET_NOT_IMPLEMENTED; };
00156 
00162                 int setWidth(unsigned int value) { return VETRET_NOT_IMPLEMENTED; };
00163 
00164 
00165 
00174                 int reset(bool startTimers = false);
00175 
00184                 int setInputFrameRate(float fps = 0);
00185 
00192                 long getInputFrameRateDelay() { return v_sleeptime; };
00193 
00200                 float getInputFrameRateCurrent() const { return lastFps; };
00201 
00208                 float getInputFrameRateAverage() const { return mediumFps; };
00209 
00218                 long getExecutionTimeCurrent() const { return lastExTime; };
00219 
00228                 long getExecutionTimeAverage() const { return mediumExTime; };
00229 
00230 
00231 
00232                 long getElapsedTime() const;
00233 
00234 
00246                 int importFrom(vetFrameCache& img);
00247 
00259                 int importFrom(vetFrameCache24& img);
00260 
00272                 int importFrom(vetFrameRGB& img);
00273 
00285                 int importFrom(vetFrameGrey& img);
00286 
00287 
00288 
00298                 void operator << (vetFrameCache& img);
00308                 void operator << (vetFrameCache24& img);
00318                 void operator << (vetFrameRGB& img);
00328                 void operator << (vetFrameGrey& img);
00329 
00330 
00331 
00332 };
00333 
00334 #endif //__VETLIB_VETNETCLIENT_H__

Generated on Tue Jan 24 11:59:05 2006 for VETLib by  doxygen 1.4.4