Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | List of all members
ola::plugin::openpixelcontrol::OPCClient Class Reference

Detailed Description

An Open Pixel Control client.

The OPC client connects to a remote IP:port and sends OPC messages.

Public Types

typedef ola::Callback1< void,
bool > 
 Called when the socket changes state.

Public Member Functions

 OPCClient (ola::io::SelectServerInterface *ss, const ola::network::IPV4SocketAddress &target)
 Create a new OPCClient. More...
 ~OPCClient ()
std::string GetRemoteAddress () const
 Return the remote address for this Client. More...
bool SendDmx (uint8_t channel, const DmxBuffer &buffer)
 Send a DMX frame. More...
void SetSocketCallback (SocketEventCallback *callback)
 Set the callback to be run when the socket state changes. More...

Constructor & Destructor Documentation

ola::plugin::openpixelcontrol::OPCClient::OPCClient ( ola::io::SelectServerInterface ss,
const ola::network::IPV4SocketAddress target 

Create a new OPCClient.

ssThe SelectServer to use
targetthe remote IP:port to connect to.

Member Function Documentation

std::string ola::plugin::openpixelcontrol::OPCClient::GetRemoteAddress ( ) const

Return the remote address for this Client.

An IP:port as a string.
bool ola::plugin::openpixelcontrol::OPCClient::SendDmx ( uint8_t  channel,
const DmxBuffer buffer 

Send a DMX frame.

channelthe OPC channel to use.
bufferthe DMX data.
void ola::plugin::openpixelcontrol::OPCClient::SetSocketCallback ( SocketEventCallback callback)

Set the callback to be run when the socket state changes.

callbackthe callback to run when the socket state changes. Ownership is transferred.

The documentation for this class was generated from the following files: