Open Lighting Architecture
Latest Git
|
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... | |
ola::Client::Client | ( | ola::proto::OlaClientService_Stub * | client_stub, |
const ola::rdm::UID & | uid | ||
) |
Create a new client.
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. |
void ola::Client::DMXReceived | ( | unsigned int | universe, |
const DmxSource & | source | ||
) |
Called when this client sends us new data.
universe | the id of the universe for the new data |
source | the new DMX data. |
ola::rdm::UID ola::Client::GetUID | ( | ) | const |
Return the UID associated with this client.
This is normally the UID passed in the constructor, unless the client itself overrides the UID.
|
virtual |
Push a DMX update to this client.
universe_id | the universe the DMX data belongs to |
priority | the priority of the DMX data |
buffer | the DMX data. |
void ola::Client::SetUID | ( | const ola::rdm::UID & | uid | ) |
Set the UID for the client.
uid | the 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.
universe | the id of the universe we're interested in |