forked from chloelle/DMX_CPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenDMX.h
41 lines (35 loc) · 830 Bytes
/
OpenDMX.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef OPENDMX_H
#define OPENDMX_H
//required for DLL loading and some data types
#include <windows.h>
//FTDI library
#include "FTD2XX.H"
//class OpenDMX based on C# code
class OpenDMX{
public:
BYTE buffer [513];
int bufferLength;
FT_HANDLE handle;
bool done;
bool connected;
DWORD bytesWritten;
FT_STATUS status;
HINSTANCE dllHandle;
unsigned char bits_8;
unsigned char stop_bits_2;
unsigned char parity_none;
unsigned short flow_none;
unsigned long purge_rx;
unsigned long purge_tx;
bool verbose; //controls output. set to true for debugging
public:
OpenDMX(bool isVerbose);
bool start();
void printErrorCode();
void setDMXValue(int channel, unsigned char value);
void zerosDMXValue();
void writeData();
int write();
bool initOpenDMX();
};
#endif