Open Lighting Architecture: ola::Client Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ola::Client Class Reference

## Detailed Description

Represents a connected OLA client on the OLA server side.

This stores the state of the client (i.e. DMX data) and allows us to push DMX updates to the client via the OlaClientService_Stub.

## Public Member Functions
| Client (ola::proto::OlaClientService_Stub *client_stub, const ola::rdm::UID &uid)
| Create a new client.
virtual bool | SendDMX (unsigned int universe_id, uint8_t priority, const DmxBuffer &buffer)
| Push a DMX update to this client.
void | DMXReceived (unsigned int universe, const DmxSource &source)
| Called when this client sends us new data.
const DmxSource | SourceData (unsigned int universe) const
| Get the most recent DMX data received from this client.
ola::rdm::UID | GetUID () const
| Return the UID associated with this client.
void | SetUID (const ola::rdm::UID &uid)
| Set the UID for the client.

## Constructor & Destructor Documentation

## ◆ Client()

ola::Client::Client | ( | ola::proto::OlaClientService_Stub * | client_stub,
|  | const ola::rdm::UID & | uid )

Create a new client.

Parameters

  client_stub | The OlaClientService_Stub to use to communicate with the client. Ownership is transferred to the client.
  uid | The default UID to use for this client. The client may set its own UID later.

## Member Function Documentation

## ◆ DMXReceived()

void ola::Client::DMXReceived | ( | unsigned int | universe,
|  | const DmxSource & | source )

Called when this client sends us new data.

Parameters

  universe | the id of the universe for the new data
  source | the new DMX data.

## ◆ GetUID()

ola::rdm::UID ola::Client::GetUID | ( |  | ) | const

Return the UID associated with this client.

Returns
  The client's UID.

This is normally the UID passed in the constructor, unless the client itself overrides the UID.

## ◆ SendDMX()

bool ola::Client::SendDMX | ( | unsigned int | universe_id,
|  | uint8_t | priority,
|  | const DmxBuffer & | buffer )
| virtual

Push a DMX update to this client.

Parameters

  universe_id | the universe the DMX data belongs to
  priority | the priority of the DMX data
  buffer | the DMX data.

Returns
  true if the update was sent, false otherwise

## ◆ SetUID()

void ola::Client::SetUID | ( | const ola::rdm::UID & | uid | ) |

Set the UID for the client.

Parameters

  uid | the new UID to use for this client.

## ◆ SourceData()

const DmxSource ola::Client::SourceData | ( | unsigned int | universe | ) | const

Get the most recent DMX data received from this client.

Parameters

  universe | the id of the universe we're interested in

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

- olad/plugin_api/Client.h
- olad/plugin_api/Client.cpp