AtmoDmxSerialConnection.h

Go to the documentation of this file.
00001 /*
00002  * AtmoDmxSerialConnection.h: Class for communication with the serial DMX Interface of dzionsko,
00003  * opens and configures the serial port
00004  *
00005  * See the README.txt file for copyright information and how to reach the author(s).
00006  *
00007  * $Id: 53ef12a8702c0b1db5df453ec6e3f4e6577df813 $
00008  */
00009 #ifndef _AtmoDmxSerialConnection_h_
00010 #define _AtmoDmxSerialConnection_h_
00011 
00012 
00013 #include "AtmoDefs.h"
00014 #include "AtmoConnection.h"
00015 #include "AtmoConfig.h"
00016 
00017 #if defined(WIN32)
00018 #   include <windows.h>
00019 #endif
00020 
00021 class CAtmoDmxSerialConnection : public CAtmoConnection {
00022     private:
00023         HANDLE m_hComport;
00024         // DMX Channel Buffer including some Control Bytes for up to 256 DMX Channels
00025         unsigned char DMXout[259];
00026         // contains the DMX Start Adress of each Atmo-Dmx-Channel
00027         int *m_dmx_channels_base;
00028 
00029 #if defined(WIN32)
00030         DWORD  m_dwLastWin32Error;
00031     public:
00032         DWORD getLastError() { return m_dwLastWin32Error; }
00033 #endif
00034 
00035     public:
00036        CAtmoDmxSerialConnection(CAtmoConfig *cfg);
00037        virtual ~CAtmoDmxSerialConnection(void);
00038 
00039        virtual ATMO_BOOL OpenConnection();
00040 
00041        virtual void CloseConnection();
00042 
00043        virtual ATMO_BOOL isOpen(void);
00044 
00045        virtual ATMO_BOOL SendData(pColorPacket data);
00046 
00047        virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
00048                                              int global_contrast,
00049                                              int contrast_red,
00050                                              int contrast_green,
00051                                              int contrast_blue,
00052                                              int gamma_red,
00053                                              int gamma_green,
00054                                              int gamma_blue,
00055                                              ATMO_BOOL storeToEeprom);
00056 
00057        virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color);
00058 
00059        virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values);
00060 
00061        virtual int getNumChannels();
00062 
00063 #if !defined(_ATMO_VLC_PLUGIN_)
00064        virtual char *getChannelName(int ch);
00065        virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
00066 #endif
00067 
00068        virtual const char *getDevicePath() { return "dmx"; }
00069 
00070        virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca);
00071 };
00072 
00073 #endif

Generated on Tue May 25 08:04:59 2010 for VLC by  doxygen 1.5.6