AtmoMultiConnection.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _AtmoMultiConnection_h_
00012 #define _AtmoMultiConnection_h_
00013
00014 #include "AtmoDefs.h"
00015 #include "AtmoConnection.h"
00016 #include "AtmoConfig.h"
00017
00018 #if defined(WIN32)
00019 # include <windows.h>
00020 #endif
00021
00022
00023 class CAtmoMultiConnection : public CAtmoConnection
00024 {
00025 private:
00026 HANDLE m_hComports[4];
00027 unsigned char m_output[4 * 4 * 3];
00028
00029 #if defined(WIN32)
00030 DWORD m_dwLastWin32Error;
00031 public:
00032 DWORD getLastError() { return m_dwLastWin32Error; }
00033 #endif
00034
00035
00036
00037
00038
00039 HANDLE OpenDevice(char *devName);
00040 ATMO_BOOL internal_HardwareWhiteAdjust(HANDLE hComport,int global_gamma,
00041 int global_contrast,
00042 int contrast_red,
00043 int contrast_green,
00044 int contrast_blue,
00045 int gamma_red,
00046 int gamma_green,
00047 int gamma_blue,
00048 ATMO_BOOL storeToEeprom);
00049
00050 ATMO_BOOL internal_SendData(HANDLE hComport, unsigned char *colorData);
00051
00052 public:
00053 CAtmoMultiConnection(CAtmoConfig *cfg);
00054 virtual ~CAtmoMultiConnection(void);
00055
00056 virtual ATMO_BOOL OpenConnection();
00057
00058 virtual void CloseConnection();
00059
00060 virtual ATMO_BOOL isOpen(void);
00061
00062 virtual ATMO_BOOL SendData(pColorPacket data);
00063
00064 virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color);
00065 virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values);
00066
00067 virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
00068 int global_contrast,
00069 int contrast_red,
00070 int contrast_green,
00071 int contrast_blue,
00072 int gamma_red,
00073 int gamma_green,
00074 int gamma_blue,
00075 ATMO_BOOL storeToEeprom);
00076
00077 virtual int getNumChannels();
00078 virtual const char *getDevicePath() { return "multiatmo"; }
00079
00080 #if !defined(_ATMO_VLC_PLUGIN_)
00081 virtual char *getChannelName(int ch);
00082 virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
00083 #endif
00084
00085 virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca);
00086 };
00087
00088 #endif