Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/protocol/Ola.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ enum PluginIds {
OLA_PLUGIN_OPENPIXELCONTROL = 21;
OLA_PLUGIN_GPIO = 22;
OLA_PLUGIN_SPIDMX = 23;
OLA_PLUGIN_NANOLEAF = 10000;

/*
* To obtain a new plugin ID, open a ticket at
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ PLUGIN_SUPPORT(gpio, USE_GPIO)
PLUGIN_SUPPORT(karate, USE_KARATE)
PLUGIN_SUPPORT(kinet, USE_KINET)
PLUGIN_SUPPORT(milinst, USE_MILINST)
PLUGIN_SUPPORT(nanoleaf, USE_NANOLEAF)
PLUGIN_SUPPORT(opendmx, USE_OPENDMX)
PLUGIN_SUPPORT(openpixelcontrol, USE_OPENPIXELCONTROL)
PLUGIN_SUPPORT(osc, USE_OSC, [$have_liblo])
Expand Down
14 changes: 5 additions & 9 deletions include/ola/io/BigEndianStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifndef INCLUDE_OLA_IO_BIGENDIANSTREAM_H_
#define INCLUDE_OLA_IO_BIGENDIANSTREAM_H_

#include <ola/base/Macro.h>
#include <ola/io/InputStream.h>
#include <ola/io/OutputStream.h>
#include <ola/network/NetworkUtils.h>
Expand Down Expand Up @@ -67,8 +68,7 @@ class BigEndianInputStreamAdaptor: public BigEndianInputStreamInterface {
return ok;
}

BigEndianInputStreamAdaptor(const BigEndianInputStreamAdaptor&);
BigEndianInputStreamAdaptor& operator=(const BigEndianInputStreamAdaptor&);
DISALLOW_COPY_AND_ASSIGN(BigEndianInputStreamAdaptor);
};


Expand Down Expand Up @@ -99,8 +99,7 @@ class BigEndianInputStream: public BigEndianInputStreamInterface {
InputStream m_input_stream;
BigEndianInputStreamAdaptor m_adaptor;

BigEndianInputStream(const BigEndianInputStream&);
BigEndianInputStream& operator=(const BigEndianInputStream&);
DISALLOW_COPY_AND_ASSIGN(BigEndianInputStream);
};


Expand Down Expand Up @@ -157,9 +156,7 @@ class BigEndianOutputStreamAdaptor: public BigEndianOutputStreamInterface {
return *this;
}

BigEndianOutputStreamAdaptor(const BigEndianOutputStreamAdaptor&);
BigEndianOutputStreamAdaptor& operator=(
const BigEndianOutputStreamAdaptor&);
DISALLOW_COPY_AND_ASSIGN(BigEndianOutputStreamAdaptor);
};


Expand Down Expand Up @@ -196,8 +193,7 @@ class BigEndianOutputStream: public BigEndianOutputStreamInterface {
return *this;
}

BigEndianOutputStream(const BigEndianOutputStream&);
BigEndianOutputStream& operator=(const BigEndianOutputStream&);
DISALLOW_COPY_AND_ASSIGN(BigEndianOutputStream);
};
} // namespace io
} // namespace ola
Expand Down
4 changes: 2 additions & 2 deletions include/ola/io/IOQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef INCLUDE_OLA_IO_IOQUEUE_H_
#define INCLUDE_OLA_IO_IOQUEUE_H_

#include <ola/base/Macro.h>
#include <ola/io/IOVecInterface.h>
#include <ola/io/InputBuffer.h>
#include <ola/io/OutputBuffer.h>
Expand Down Expand Up @@ -91,8 +92,7 @@ class IOQueue: public InputBufferInterface,
void AppendBlock();

// no copying / assignment for now
IOQueue(const IOQueue&);
IOQueue& operator=(const IOQueue&);
DISALLOW_COPY_AND_ASSIGN(IOQueue);
};
} // namespace io
} // namespace ola
Expand Down
4 changes: 2 additions & 2 deletions include/ola/io/IOStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef INCLUDE_OLA_IO_IOSTACK_H_
#define INCLUDE_OLA_IO_IOSTACK_H_

#include <ola/base/Macro.h>
#include <ola/io/IOVecInterface.h>
#include <ola/io/InputBuffer.h>
#include <ola/io/OutputBuffer.h>
Expand Down Expand Up @@ -82,8 +83,7 @@ class IOStack: public IOVecInterface,
void PrependBlock();

// no copying / assignment for now
IOStack(const IOStack&);
IOStack& operator=(const IOStack&);
DISALLOW_COPY_AND_ASSIGN(IOStack);
};
} // namespace io
} // namespace ola
Expand Down
4 changes: 2 additions & 2 deletions include/ola/io/InputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define INCLUDE_OLA_IO_INPUTSTREAM_H_

#include <stdint.h>
#include <ola/base/Macro.h>
#include <ola/io/InputBuffer.h>
#include <string>

Expand Down Expand Up @@ -87,8 +88,7 @@ class InputStream: public InputStreamInterface {
return length == sizeof(*val);
}

InputStream(const InputStream&);
InputStream& operator=(const InputStream&);
DISALLOW_COPY_AND_ASSIGN(InputStream);
};
} // namespace io
} // namespace ola
Expand Down
4 changes: 2 additions & 2 deletions include/ola/io/MemoryBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef INCLUDE_OLA_IO_MEMORYBUFFER_H_
#define INCLUDE_OLA_IO_MEMORYBUFFER_H_

#include <ola/base/Macro.h>
#include <ola/io/InputBuffer.h>
#include <stdint.h>
#include <string.h>
Expand Down Expand Up @@ -63,8 +64,7 @@ class MemoryBuffer: public InputBufferInterface {
const unsigned int m_size;
unsigned int m_cursor;

MemoryBuffer(const MemoryBuffer&);
MemoryBuffer& operator=(const MemoryBuffer&);
DISALLOW_COPY_AND_ASSIGN(MemoryBuffer);
};
} // namespace io
} // namespace ola
Expand Down
4 changes: 2 additions & 2 deletions include/ola/io/OutputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define INCLUDE_OLA_IO_OUTPUTSTREAM_H_

#include <stdint.h>
#include <ola/base/Macro.h>
#include <ola/io/OutputBuffer.h>

namespace ola {
Expand Down Expand Up @@ -80,8 +81,7 @@ class OutputStream: public OutputStreamInterface {
return *this;
}

OutputStream(const OutputStream&);
OutputStream& operator=(const OutputStream&);
DISALLOW_COPY_AND_ASSIGN(OutputStream);
};
} // namespace io
} // namespace ola
Expand Down
2 changes: 1 addition & 1 deletion include/ola/network/Socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace network {
/**
* @brief The interface for UDPSockets.
*
* This only supports IPv4 sockets. Its an Interface so we can mock it out for
* This only supports IPv4 sockets. Its an %Interface so we can mock it out for
* testing.
*/
class UDPSocketInterface: public ola::io::BidirectionalFileDescriptor {
Expand Down
4 changes: 2 additions & 2 deletions libs/acn/RootSender.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define LIBS_ACN_ROOTSENDER_H_

#include "ola/acn/CID.h"
#include "ola/base/Macro.h"
#include "libs/acn/PDU.h"
#include "libs/acn/RootPDU.h"
#include "libs/acn/Transport.h"
Expand Down Expand Up @@ -59,8 +60,7 @@ class RootSender {
PDUBlock<PDU> m_root_block;
RootPDU m_root_pdu;

RootSender(const RootSender&);
RootSender& operator=(const RootSender&);
DISALLOW_COPY_AND_ASSIGN(RootSender);
};
} // namespace acn
} // namespace ola
Expand Down
4 changes: 2 additions & 2 deletions libs/acn/UDPTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define LIBS_ACN_UDPTRANSPORT_H_

#include "ola/acn/ACNPort.h"
#include "ola/base/Macro.h"
#include "ola/network/IPV4Address.h"
#include "ola/network/Socket.h"
#include "libs/acn/PDU.h"
Expand Down Expand Up @@ -51,8 +52,7 @@ class OutgoingUDPTransport: public OutgoingTransport {
class OutgoingUDPTransportImpl *m_impl;
ola::network::IPV4SocketAddress m_destination;

OutgoingUDPTransport(const OutgoingUDPTransport&);
OutgoingUDPTransport& operator=(const OutgoingUDPTransport&);
DISALLOW_COPY_AND_ASSIGN(OutgoingUDPTransport);
};


Expand Down
9 changes: 9 additions & 0 deletions olad/DynamicPluginLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
#include "plugins/milinst/MilInstPlugin.h"
#endif // USE_MILINST

#ifdef USE_NANOLEAF
#include "plugins/nanoleaf/NanoleafPlugin.h"
#endif // USE_NANOLEAF

#ifdef USE_OPENDMX
#include "plugins/opendmx/OpenDmxPlugin.h"
#endif // USE_OPENDMX
Expand Down Expand Up @@ -177,6 +181,11 @@ void DynamicPluginLoader::PopulatePlugins() {
new ola::plugin::milinst::MilInstPlugin(m_plugin_adaptor));
#endif // USE_MILINST

#ifdef USE_NANOLEAF
m_plugins.push_back(
new ola::plugin::nanoleaf::NanoleafPlugin(m_plugin_adaptor));
#endif // USE_NANOLEAF

#ifdef USE_OPENDMX
m_plugins.push_back(
new ola::plugin::opendmx::OpenDmxPlugin(m_plugin_adaptor));
Expand Down
1 change: 1 addition & 0 deletions plugins/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include plugins/gpio/Makefile.mk
include plugins/karate/Makefile.mk
include plugins/kinet/Makefile.mk
include plugins/milinst/Makefile.mk
include plugins/nanoleaf/Makefile.mk
include plugins/opendmx/Makefile.mk
include plugins/openpixelcontrol/Makefile.mk
include plugins/osc/Makefile.mk
Expand Down
5 changes: 3 additions & 2 deletions plugins/espnet/EspNetNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <map>
#include "ola/Callback.h"
#include "ola/DmxBuffer.h"
#include "ola/base/Macro.h"
#include "ola/network/IPV4Address.h"
#include "ola/network/Interface.h"
#include "ola/network/Socket.h"
Expand Down Expand Up @@ -81,8 +82,6 @@ class EspNetNode {
Callback0<void> *closure;
} universe_handler;

EspNetNode(const EspNetNode&);
EspNetNode& operator=(const EspNetNode&);
bool InitNetwork();
void HandlePoll(const espnet_poll_t &poll, ssize_t length,
const ola::network::IPV4Address &source);
Expand Down Expand Up @@ -130,6 +129,8 @@ class EspNetNode {
static const uint8_t DATA_PAIRS = 2;
static const uint8_t DATA_RLE = 4;
static const uint8_t START_CODE = 0;

DISALLOW_COPY_AND_ASSIGN(EspNetNode);
};
} // namespace espnet
} // namespace plugin
Expand Down
6 changes: 3 additions & 3 deletions plugins/kinet/KiNetNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <memory>

#include "ola/DmxBuffer.h"
#include "ola/base/Macro.h"
#include "ola/io/BigEndianStream.h"
#include "ola/io/IOQueue.h"
#include "ola/io/SelectServerInterface.h"
Expand Down Expand Up @@ -56,9 +57,6 @@ class KiNetNode {
ola::network::Interface m_interface;
std::auto_ptr<ola::network::UDPSocketInterface> m_socket;

KiNetNode(const KiNetNode&);
KiNetNode& operator=(const KiNetNode&);

void SocketReady();
void PopulatePacketHeader(uint16_t msg_type);
bool InitNetwork();
Expand All @@ -67,6 +65,8 @@ class KiNetNode {
static const uint32_t KINET_MAGIC_NUMBER = 0x0401dc4a;
static const uint16_t KINET_VERSION_ONE = 0x0100;
static const uint16_t KINET_DMX_MSG = 0x0101;

DISALLOW_COPY_AND_ASSIGN(KiNetNode);
};
} // namespace kinet
} // namespace plugin
Expand Down
39 changes: 39 additions & 0 deletions plugins/nanoleaf/Makefile.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# LIBRARIES
##################################################
if USE_NANOLEAF
# This is a library which isn't coupled to olad
noinst_LTLIBRARIES += plugins/nanoleaf/libolananoleafnode.la
plugins_nanoleaf_libolananoleafnode_la_SOURCES = plugins/nanoleaf/NanoleafNode.cpp \
plugins/nanoleaf/NanoleafNode.h
plugins_nanoleaf_libolananoleafnode_la_LIBADD = common/libolacommon.la

lib_LTLIBRARIES += plugins/nanoleaf/libolananoleaf.la

# Plugin description is generated from README.md
built_sources += plugins/nanoleaf/NanoleafPluginDescription.h
nodist_plugins_nanoleaf_libolananoleaf_la_SOURCES = \
plugins/nanoleaf/NanoleafPluginDescription.h
plugins/nanoleaf/NanoleafPluginDescription.h: plugins/nanoleaf/README.md plugins/nanoleaf/Makefile.mk plugins/convert_README_to_header.sh
sh $(top_srcdir)/plugins/convert_README_to_header.sh $(top_srcdir)/plugins/nanoleaf $(top_builddir)/plugins/nanoleaf/NanoleafPluginDescription.h

plugins_nanoleaf_libolananoleaf_la_SOURCES = \
plugins/nanoleaf/NanoleafPlugin.cpp \
plugins/nanoleaf/NanoleafPlugin.h \
plugins/nanoleaf/NanoleafDevice.cpp \
plugins/nanoleaf/NanoleafDevice.h \
plugins/nanoleaf/NanoleafPort.h
plugins_nanoleaf_libolananoleaf_la_LIBADD = \
olad/plugin_api/libolaserverplugininterface.la \
plugins/nanoleaf/libolananoleafnode.la

# TESTS
##################################################
test_programs += plugins/nanoleaf/NanoleafTester

plugins_nanoleaf_NanoleafTester_SOURCES = plugins/nanoleaf/NanoleafNodeTest.cpp
plugins_nanoleaf_NanoleafTester_CXXFLAGS = $(COMMON_TESTING_FLAGS)
plugins_nanoleaf_NanoleafTester_LDADD = $(COMMON_TESTING_LIBS) \
plugins/nanoleaf/libolananoleafnode.la
endif

EXTRA_DIST += plugins/nanoleaf/README.md
Loading