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 > 
SocketEventCallback
 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 ()
 Destructor.
 
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.

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

Member Function Documentation

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

Return the remote address for this Client.

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

Send a DMX frame.

Parameters
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.

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

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