Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

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

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

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
void ola::Client::SetUID ( const ola::rdm::UID uid)

Set the UID for the client.

Parameters
uidthe new UID to use for this client.
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: