21 #ifndef PLUGINS_OPENPIXELCONTROL_OPCSERVER_H_
22 #define PLUGINS_OPENPIXELCONTROL_OPCSERVER_H_
29 #include "ola/io/SelectServerInterface.h"
31 #include "ola/network/TCPSocket.h"
32 #include "ola/network/TCPSocketFactory.h"
33 #include "plugins/openpixelcontrol/OPCConstants.h"
37 namespace openpixelcontrol {
91 uint16_t expected_size;
93 unsigned int buffer_size;
99 data =
new uint8_t[buffer_size];
109 typedef std::map<ola::network::TCPSocket*, RxState*> ClientMap;
115 std::auto_ptr<ola::network::TCPAcceptingSocket> m_listening_socket;
117 std::map<uint8_t, ChannelCallback*> m_callbacks;
128 #endif // PLUGINS_OPENPIXELCONTROL_OPCSERVER_H_
~OPCServer()
Destructor.
Definition: OPCServer.cpp:68
Represents Socket Addresses.
Definition: TCPSocketFactory.h:46
An Open Pixel Control server.
Definition: OPCServer.h:44
bool Init()
Initialize the OPCServer.
Definition: OPCServer.cpp:84
Constants used throughout OLA.
A class used to hold a single universe of DMX data.
The interface for the SelectServer.
Definition: SelectServerInterface.h:42
A 3 argument callback which can be called multiple times.
Definition: Callback.h:2838
Callback3< void, uint8_t, const uint8_t *, unsigned int > ChannelCallback
The callback executed when new OPC data arrives.
Definition: OPCServer.h:50
Definition: TCPSocket.h:43
OPCServer(ola::io::SelectServerInterface *ss, const ola::network::IPV4SocketAddress &listen_addr)
Create a new OPCServer.
Definition: OPCServer.cpp:60
The size of an OPC frame with DMX512 data.
Definition: OPCConstants.h:41
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
ola::network::IPV4SocketAddress ListenAddress() const
The listen address of this server.
Definition: OPCServer.cpp:95
An IPv4 SocketAddress.
Definition: SocketAddress.h:77
void SetCallback(uint8_t channel, ChannelCallback *callback)
Set the callback to be run when channel data arrives.
Definition: OPCServer.cpp:105