21#ifndef PLUGINS_OPENPIXELCONTROL_OPCCLIENT_H_
22#define PLUGINS_OPENPIXELCONTROL_OPCCLIENT_H_
28#include "ola/io/MemoryBlockPool.h"
29#include "ola/io/SelectServerInterface.h"
30#include "ola/network/AdvancedTCPConnector.h"
32#include "ola/network/TCPSocket.h"
33#include "ola/util/Backoff.h"
38class NonBlockingSender;
42namespace openpixelcontrol {
97 std::auto_ptr<ola::network::TCPSocket> m_client_socket;
98 std::auto_ptr<ola::io::NonBlockingSender> m_sender;
99 std::auto_ptr<SocketEventCallback> m_socket_callback;
A class used to hold a single universe of DMX data.
Represents Socket Addresses.
A 1 argument callback which can be called multiple times.
Definition Callback.h:992
Used to hold a single universe of DMX data.
Definition DmxBuffer.h:49
MemoryBlockPool. This class is not thread safe.
Definition MemoryBlockPool.h:35
The interface for the SelectServer.
Definition SelectServerInterface.h:42
Attempts to open a TCP connection until a failure limit is reached.
Definition AdvancedTCPConnector.h:48
Definition TCPSocketFactory.h:46
An IPv4 SocketAddress.
Definition SocketAddress.h:78
Definition TCPSocket.h:43
An Open Pixel Control client.
Definition OPCClient.h:49
bool SendDmx(uint8_t channel, const DmxBuffer &buffer)
Send a DMX frame.
Definition OPCClient.cpp:58
std::string GetRemoteAddress() const
Return the remote address for this Client.
Definition OPCClient.h:73
~OPCClient()
Destructor.
Definition OPCClient.cpp:51
void SetSocketCallback(SocketEventCallback *callback)
Set the callback to be run when the socket state changes.
Definition OPCClient.cpp:72
ola::Callback1< void, bool > SocketEventCallback
Called when the socket changes state.
Definition OPCClient.h:54
OPCClient(ola::io::SelectServerInterface *ss, const ola::network::IPV4SocketAddress &target)
Create a new OPCClient.
Definition OPCClient.cpp:40
The namespace containing all OLA symbols.
Definition Credentials.cpp:44