2 * AtmoDmxSerialConnection.h: Class for communication with the serial DMX Interface of dzionsko,
3 * opens and configures the serial port
5 * See the README.txt file for copyright information and how to reach the author(s).
9 #ifndef _AtmoDmxSerialConnection_h_
10 #define _AtmoDmxSerialConnection_h_
14 #include "AtmoConnection.h"
15 #include "AtmoConfig.h"
21 class CAtmoDmxSerialConnection
: public CAtmoConnection
{
24 // DMX Channel Buffer including some Control Bytes for up to 256 DMX Channels
25 unsigned char DMXout
[259];
26 // contains the DMX Start Adress of each Atmo-Dmx-Channel
27 int *m_dmx_channels_base
;
30 DWORD m_dwLastWin32Error
;
32 DWORD
getLastError() { return m_dwLastWin32Error
; }
36 CAtmoDmxSerialConnection(CAtmoConfig
*cfg
);
37 virtual ~CAtmoDmxSerialConnection(void);
39 virtual ATMO_BOOL
OpenConnection();
41 virtual void CloseConnection();
43 virtual ATMO_BOOL
isOpen(void);
45 virtual ATMO_BOOL
SendData(pColorPacket data
);
47 virtual ATMO_BOOL
HardwareWhiteAdjust(int global_gamma
,
55 ATMO_BOOL storeToEeprom
);
57 virtual ATMO_BOOL
setChannelColor(int channel
, tRGBColor color
);
59 virtual ATMO_BOOL
setChannelValues(int numValues
,unsigned char *channel_values
);
61 virtual int getNumChannels();
63 #if !defined(_ATMO_VLC_PLUGIN_)
64 virtual char *getChannelName(int ch
);
65 virtual ATMO_BOOL
ShowConfigDialog(HINSTANCE hInst
, HWND parent
, CAtmoConfig
*cfg
);
68 virtual const char *getDevicePath() { return "dmx"; }
70 virtual ATMO_BOOL
CreateDefaultMapping(CAtmoChannelAssignment
*ca
);