4 #ifndef _KINETINTERFACE_H_
5 #define _KINETINTERFACE_H_
8 #include "LumiverseCoreConfig.h"
15 #pragma comment (lib, "Ws2_32.lib")
17 #include <sys/socket.h>
23 #include "../lib/libjson/libjson.h"
36 enum KinetProtocolType {
47 class KiNetInterface :
public DMXInterface
58 KiNetInterface(
string id,
string host,
int port = 6038,
enum KinetProtocolType protocolType = KinetProtocolType::OLD);
64 virtual void sendDMX(
unsigned char* data,
unsigned int universe);
66 virtual void closeInt();
70 virtual JSONNode toJSON();
72 virtual string getInterfaceType() {
return "KiNetInterface"; }
74 string getIP() {
return m_host; }
75 void setIP(
string ip) { m_host = ip; }
77 int getPort() {
return m_port; }
78 void setPort(
int port) { m_port = port; }
80 size_t getHeaderSize()
const {
return m_headerSize; }
81 size_t getDataSize()
const {
return m_dataSize; }
82 size_t getNumChannels()
const {
return m_numChannels; }
83 size_t getPacketSize()
const {
return m_headerSize + m_dataSize; }
84 size_t getBufferSize()
const {
return getPacketSize() * m_numChannels; }
85 const unsigned char* getHeaderBytes()
const {
return m_headerBytes; }
93 unsigned char* m_buffer;
96 const unsigned char* m_headerBytes;
100 KinetProtocolType m_type;
void init(const char *jsonPatchStr, const char *filename)
Initializes data structures.
Definition: Dumiverse.cpp:29
Contains functions for logging information to console or file.
Base class describing how DMX Interfaces should act.
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2