2 * AtmoMultiConnection.h: Class for communication with up to 4 - 4 channel classic atmolight controllers
3 * so you can built a cheap solution for having up to 16 channels, but you need four comports or
6 * See the README.txt file for copyright information and how to reach the author(s).
11 #ifndef _AtmoMultiConnection_h_
12 #define _AtmoMultiConnection_h_
15 #include "AtmoConnection.h"
16 #include "AtmoConfig.h"
23 class CAtmoMultiConnection
: public CAtmoConnection
26 HANDLE m_hComports
[4];
27 unsigned char m_output
[4 * 4 * 3];
30 DWORD m_dwLastWin32Error
;
32 DWORD
getLastError() { return m_dwLastWin32Error
; }
36 on windows devName is COM1 COM2 etc.
37 on linux devname my be /dev/ttyS0 or /dev/ttyUSB0
39 HANDLE
OpenDevice(char *devName
);
40 ATMO_BOOL
internal_HardwareWhiteAdjust(HANDLE hComport
,int global_gamma
,
48 ATMO_BOOL storeToEeprom
);
50 ATMO_BOOL
internal_SendData(HANDLE hComport
, unsigned char *colorData
);
53 CAtmoMultiConnection(CAtmoConfig
*cfg
);
54 virtual ~CAtmoMultiConnection(void);
56 virtual ATMO_BOOL
OpenConnection();
58 virtual void CloseConnection();
60 virtual ATMO_BOOL
isOpen(void);
62 virtual ATMO_BOOL
SendData(pColorPacket data
);
64 virtual ATMO_BOOL
setChannelColor(int channel
, tRGBColor color
);
65 virtual ATMO_BOOL
setChannelValues(int numValues
,unsigned char *channel_values
);
67 virtual ATMO_BOOL
HardwareWhiteAdjust(int global_gamma
,
75 ATMO_BOOL storeToEeprom
);
77 virtual int getNumChannels();
78 virtual const char *getDevicePath() { return "multiatmo"; }
80 #if !defined(_ATMO_VLC_PLUGIN_)
81 virtual char *getChannelName(int ch
);
82 virtual ATMO_BOOL
ShowConfigDialog(HINSTANCE hInst
, HWND parent
, CAtmoConfig
*cfg
);
85 virtual ATMO_BOOL
CreateDefaultMapping(CAtmoChannelAssignment
*ca
);