AtmoSerialConnection.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _AtmoSerialConnection_h_
00010 #define _AtmoSerialConnection_h_
00011
00012 #include "AtmoDefs.h"
00013 #include "AtmoConnection.h"
00014 #include "AtmoConfig.h"
00015
00016 #if defined(WIN32)
00017 # include <windows.h>
00018 #endif
00019
00020
00021 class CAtmoSerialConnection : public CAtmoConnection {
00022 private:
00023 HANDLE m_hComport;
00024
00025 #if defined(WIN32)
00026 DWORD m_dwLastWin32Error;
00027 public:
00028 DWORD getLastError() { return m_dwLastWin32Error; }
00029 #endif
00030
00031 public:
00032 CAtmoSerialConnection(CAtmoConfig *cfg);
00033 virtual ~CAtmoSerialConnection(void);
00034
00035 virtual ATMO_BOOL OpenConnection();
00036
00037 virtual void CloseConnection();
00038
00039 virtual ATMO_BOOL isOpen(void);
00040
00041 virtual ATMO_BOOL SendData(unsigned char numChannels,
00042 int red[],
00043 int green[],
00044 int blue[]);
00045
00046 virtual ATMO_BOOL SendData(tColorPacket data);
00047
00048 virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
00049 int global_contrast,
00050 int contrast_red,
00051 int contrast_green,
00052 int contrast_blue,
00053 int gamma_red,
00054 int gamma_green,
00055 int gamma_blue,
00056 ATMO_BOOL storeToEeprom);
00057 };
00058
00059 #endif