WPILib 2012
WPILibRoboticsLibraryforFRC
Vision/PCVideoServer.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2008. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 
00007 #ifndef __PC_VIDEO_SERVER_H__
00008 #define __PC_VIDEO_SERVER_H__
00009 
00010 #include "Task.h"
00011 #include <semLib.h>
00012 
00014 #define VIDEO_TO_PC_PORT 1180
00015 
00019 class PCVideoServer : public ErrorBase {
00020 
00021 public:
00022         PCVideoServer();
00023         ~PCVideoServer();
00024         unsigned int Release();
00025         void Start();
00026         void Stop();
00027 
00028 private:
00029         static int s_ServerTask(PCVideoServer *thisPtr);
00030         int ServerTask();
00031         int StartServerTask();
00032 
00033         Task m_serverTask;
00034         SEM_ID m_newImageSem;
00035         bool m_stopServer;
00036 };
00037 
00038 #endif
00039 
 All Classes Functions Variables