Open Lighting Architecture  Latest Git
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. More...
 
virtual bool SendDMX (unsigned int universe_id, uint8_t priority, const DmxBuffer &buffer)
 Push a DMX update to this client. More...
 
void DMXReceived (unsigned int universe, const DmxSource &source)
 Called when this client sends us new data. More...
 
const DmxSource SourceData (unsigned int universe) const
 Get the most recent DMX data received from this client. More...
 
ola::rdm::UID GetUID () const
 Return the UID associated with this client. More...
 
void SetUID (const ola::rdm::UID &uid)
 Set the UID for the client. More...
 

Constructor & Destructor Documentation

◆ Client()

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

Create a new client.

Parameters
client_stubThe OlaClientService_Stub to use to communicate with the client. Ownership is transferred to the client.
uidThe 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
universethe id of the universe for the new data
sourcethe 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_idthe universe the DMX data belongs to
prioritythe priority of the DMX data
bufferthe 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
uidthe 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
universethe id of the universe we're interested in

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