Open Lighting Architecture: ola::plugin::openpixelcontrol::OPCClient Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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.
| ~OPCClient ()
| Destructor.
std::string | GetRemoteAddress () const
| Return the remote address for this Client.
bool | SendDmx (uint8_t channel, const DmxBuffer &buffer)
| Send a DMX frame.
void | SetSocketCallback (SocketEventCallback *callback)
| Set the callback to be run when the socket state changes.

## Constructor & Destructor Documentation

## ◆ OPCClient()

ola::plugin::openpixelcontrol::OPCClient::OPCClient | ( | ola::io::SelectServerInterface * | ss,
|  | const ola::network::IPV4SocketAddress & | target )

Create a new OPCClient.

Parameters

  ss | The SelectServer to use
  target | the remote IP:port to connect to.

## Member Function Documentation

## ◆ GetRemoteAddress()

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

Return the remote address for this Client.

Returns
  An IP:port as a string.

## ◆ SendDmx()

bool ola::plugin::openpixelcontrol::OPCClient::SendDmx | ( | uint8_t | channel,
|  | const DmxBuffer & | buffer )

Send a DMX frame.

Parameters

  channel | the OPC channel to use.
  buffer | the DMX data.

## ◆ SetSocketCallback()

void ola::plugin::openpixelcontrol::OPCClient::SetSocketCallback | ( | SocketEventCallback * | callback | ) |

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

Parameters

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

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

- plugins/openpixelcontrol/OPCClient.h
- plugins/openpixelcontrol/OPCClient.cpp