20 #ifndef PLUGINS_KARATE_KARATELIGHT_H_ 21 #define PLUGINS_KARATE_KARATELIGHT_H_ 43 uint16_t GetnChannels()
const {
return m_nChannels; }
44 uint8_t GetFWVersion()
const {
return m_fw_version; }
45 uint8_t GetHWVersion()
const {
return m_hw_version; }
46 uint16_t GetDMXOffset()
const {
return m_dmx_offset; }
47 bool IsActive()
const {
return m_active; }
50 bool ReadBack(uint8_t *rd_data, uint8_t *rd_len);
51 bool ReadByteFromEeprom(uint8_t addr, uint8_t *data);
52 bool SendCommand(uint8_t cmd,
const uint8_t *output_buffer,
53 int n_bytes_to_write, uint8_t *input_buffer,
54 int n_bytes_expected);
57 const std::string m_devname;
60 static const uint16_t CMD_MAX_LENGTH = 64;
61 static const uint16_t CHUNK_SIZE = 32;
66 uint16_t m_dmx_offset;
75 static const uint8_t CMD_HD_SYNC = 0x00;
76 static const uint8_t CMD_HD_COMMAND = 0x01;
77 static const uint8_t CMD_HD_CHECK = 0x02;
78 static const uint8_t CMD_HD_LEN = 0x03;
79 static const uint8_t CMD_DATA_START = 0x04;
82 static const uint8_t CMD_SYNC_SEND = 0xAA;
83 static const uint8_t CMD_SYNC_RECV = 0x55;
86 static const uint8_t CMD_SYS_ACK = 0x01;
87 static const uint8_t CMD_SYS_NACK = 0x02;
88 static const uint8_t CMD_SYS_NIMP = 0xFF;
89 static const uint8_t CMD_SYS_IR = 0x10;
90 static const uint8_t CMD_SYS_DATA = 0x20;
91 static const uint8_t CMD_SYS_NACK_LENGTH = 0x03;
92 static const uint8_t CMD_SYS_NACK_CHECK = 0x04;
95 static const uint8_t CMD_GET_VERSION = 0x01;
96 static const uint8_t CMD_GET_HARDWARE = 0x02;
98 static const uint8_t CMD_GET_TLC_PWM_VALUE = 0x14;
99 static const uint8_t CMD_SET_TLC_PWM_VALUE = 0x15;
101 static const uint8_t CMD_SET_DATA_00 = 0x20;
102 static const uint8_t CMD_SET_DATA_01 = 0x21;
103 static const uint8_t CMD_SET_DATA_02 = 0x22;
104 static const uint8_t CMD_SET_DATA_03 = 0x23;
105 static const uint8_t CMD_SET_DATA_04 = 0x24;
106 static const uint8_t CMD_SET_DATA_05 = 0x25;
107 static const uint8_t CMD_SET_DATA_06 = 0x26;
108 static const uint8_t CMD_SET_DATA_07 = 0x27;
109 static const uint8_t CMD_SET_DATA_08 = 0x28;
110 static const uint8_t CMD_SET_DATA_09 = 0x29;
111 static const uint8_t CMD_SET_DATA_0A = 0x2A;
112 static const uint8_t CMD_SET_DATA_0B = 0x2B;
113 static const uint8_t CMD_SET_DATA_0C = 0x2C;
114 static const uint8_t CMD_SET_DATA_0D = 0x2D;
115 static const uint8_t CMD_SET_DATA_0E = 0x2E;
116 static const uint8_t CMD_SET_DATA_0F = 0x2F;
118 static const uint8_t CMD_GET_N_CHANNELS = 0x30;
120 static const uint8_t CMD_READ_ADC0 = 0x40;
122 static const uint8_t CMD_READ_EEPROM = 0x50;
123 static const uint8_t CMD_WRITE_EEPROM = 0x51;
125 static const uint8_t CMD_BOOT_REQUEST = 0x80;
126 static const uint8_t CMD_BOOT_START = 0x81;
128 static const uint8_t HW_ID_KARATE = 0x01;
129 static const uint8_t HW_ID_USB2DMX = 0x02;
135 #endif // PLUGINS_KARATE_KARATELIGHT_H_ KarateLight(const std::string &dev)
Default constructor.
Definition: KarateLight.cpp:50
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
Constants used throughout OLA.
A class used to hold a single universe of DMX data.
bool Blank()
Sets all Channels to black and sends data to the device.
Definition: KarateLight.cpp:208
Definition: Constants.h:36
Definition: KarateLight.h:33
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
bool Init()
Initialize the device.
Definition: KarateLight.cpp:87
~KarateLight()
Default destructor.
Definition: KarateLight.cpp:66
bool SetColors(const DmxBuffer &da)
Copy contents of the DmxBuffer into my local scope.
Definition: KarateLight.cpp:218