Open Lighting Architecture
Latest Git
|
The callback based C++ client for OLA.
Public Member Functions | |
OlaClient (ola::io::ConnectedDescriptor *descriptor) | |
bool | Setup () |
bool | Stop () |
void | SetCloseHandler (ola::SingleUseCallback0< void > *callback) |
Set the close handler. | |
void | SetDMXCallback (RepeatableDMXCallback *callback) |
Set the callback to be run when new DMX data arrives. More... | |
void | ReloadPlugins (SetCallback *callback) |
Trigger a plugin reload. More... | |
void | FetchPluginList (PluginListCallback *callback) |
Fetch the list of plugins loaded. More... | |
void | FetchPluginDescription (ola_plugin_id plugin_id, PluginDescriptionCallback *callback) |
Fetch the description for a plugin. More... | |
void | FetchPluginState (ola_plugin_id plugin_id, PluginStateCallback *callback) |
Fetch the state of a plugin. More... | |
void | FetchDeviceInfo (ola_plugin_id plugin_filter, DeviceInfoCallback *callback) |
Request a list of the available devices. More... | |
void | FetchCandidatePorts (CandidatePortsCallback *callback) |
Request a list of ports that could be patched to new universe. More... | |
void | FetchCandidatePorts (unsigned int universe_id, CandidatePortsCallback *callback) |
Request a list of ports that could be patched to a particular universe. More... | |
void | SetPluginState (ola_plugin_id plugin_id, bool state, SetCallback *callback) |
Set the state of a plugin. More... | |
void | ConfigureDevice (unsigned int device_alias, const std::string &msg, ConfigureDeviceCallback *callback) |
Send a device config request. More... | |
void | SetPortPriorityInherit (unsigned int device_alias, unsigned int port, PortDirection port_direction, SetCallback *callback) |
Set the priority for a port to inherit mode. More... | |
void | SetPortPriorityOverride (unsigned int device_alias, unsigned int port, PortDirection port_direction, uint8_t value, SetCallback *callback) |
Set the priority for a port to override mode. More... | |
void | FetchUniverseList (UniverseListCallback *callback) |
Request a list of universes. More... | |
void | FetchUniverseInfo (unsigned int universe, UniverseInfoCallback *callback) |
Fetch the information for a given universe. More... | |
void | SetUniverseName (unsigned int universe, const std::string &name, SetCallback *callback) |
Set the name of a universe. More... | |
void | SetUniverseMergeMode (unsigned int universe, OlaUniverse::merge_mode mode, SetCallback *callback) |
Set the merge mode of a universe. More... | |
void | Patch (unsigned int device_alias, unsigned int port, PortDirection port_direction, PatchAction action, unsigned int universe, SetCallback *callback) |
Patch or unpatch a port from a universe. More... | |
void | RegisterUniverse (unsigned int universe, RegisterAction register_action, SetCallback *callback) |
Register our interest in a universe. More... | |
void | SendDMX (unsigned int universe, const DmxBuffer &data, const SendDMXArgs &args) |
Send DMX data. More... | |
void | FetchDMX (unsigned int universe, DMXCallback *callback) |
Fetch the latest DMX data for a universe. More... | |
void | RunDiscovery (unsigned int universe, DiscoveryType discovery_type, DiscoveryCallback *callback) |
Trigger discovery for a universe. More... | |
void | SetSourceUID (const ola::rdm::UID &uid, SetCallback *callback) |
Set the source UID for this client. More... | |
void | RDMGet (unsigned int universe, const ola::rdm::UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data, unsigned int data_length, const SendRDMArgs &args) |
Send an RDM Get Command. More... | |
void | RDMSet (unsigned int universe, const ola::rdm::UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data, unsigned int data_length, const SendRDMArgs &args) |
Send an RDM Set Command. More... | |
void | SendTimeCode (const ola::timecode::TimeCode &timecode, SetCallback *callback) |
Send TimeCode data. More... | |
void ola::client::OlaClient::ConfigureDevice | ( | unsigned int | device_alias, |
const std::string & | msg, | ||
ConfigureDeviceCallback * | callback | ||
) |
Send a device config request.
device_alias | the device alias of the device to configure. |
msg | the blob of data to send to the device. |
callback | the ConfigureDeviceCallback invoked upon completion. |
void ola::client::OlaClient::FetchCandidatePorts | ( | CandidatePortsCallback * | callback | ) |
Request a list of ports that could be patched to new universe.
callback | the CandidatePortsCallback invoked upon completion. |
void ola::client::OlaClient::FetchCandidatePorts | ( | unsigned int | universe_id, |
CandidatePortsCallback * | callback | ||
) |
Request a list of ports that could be patched to a particular universe.
universe_id | the id of the universe to fetch the candidate ports for. |
callback | the CandidatePortsCallback invoked upon completion. |
void ola::client::OlaClient::FetchDeviceInfo | ( | ola_plugin_id | plugin_filter, |
DeviceInfoCallback * | callback | ||
) |
Request a list of the available devices.
plugin_filter | only fetch devices that belong to the specified plugin. |
callback | the DeviceInfoCallback to be invoked upon completion. |
void ola::client::OlaClient::FetchDMX | ( | unsigned int | universe, |
DMXCallback * | callback | ||
) |
Fetch the latest DMX data for a universe.
universe | the universe id to get data for. |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::FetchPluginDescription | ( | ola_plugin_id | plugin_id, |
PluginDescriptionCallback * | callback | ||
) |
Fetch the description for a plugin.
plugin_id | the id of the plugin to fetch the state for. |
callback | the PluginDescriptionCallback to be invoked upon completion. |
void ola::client::OlaClient::FetchPluginList | ( | PluginListCallback * | callback | ) |
Fetch the list of plugins loaded.
callback | the PluginListCallback to be invoked upon completion. |
void ola::client::OlaClient::FetchPluginState | ( | ola_plugin_id | plugin_id, |
PluginStateCallback * | callback | ||
) |
Fetch the state of a plugin.
This returns the state and the list of plugins this plugin conflicts with.
plugin_id | the id of the plugin to fetch the state for. |
callback | the PluginStateCallback to be invoked upon completion. |
void ola::client::OlaClient::FetchUniverseInfo | ( | unsigned int | universe, |
UniverseInfoCallback * | callback | ||
) |
Fetch the information for a given universe.
universe | the id of the universe. |
callback | the UniverseInfoCallback to invoke upon completion. |
void ola::client::OlaClient::FetchUniverseList | ( | UniverseListCallback * | callback | ) |
Request a list of universes.
callback | the UniverseListCallback to invoke upon completion. |
void ola::client::OlaClient::Patch | ( | unsigned int | device_alias, |
unsigned int | port, | ||
PortDirection | port_direction, | ||
PatchAction | action, | ||
unsigned int | universe, | ||
SetCallback * | callback | ||
) |
Patch or unpatch a port from a universe.
device_alias | the device containing the port to change |
port | the port id of the port to change. |
port_direction | the direction of the port. |
action | OlaClientCore::PATCH or OlaClientCore::UNPATCH. |
universe | universe id to patch the port to. |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::RDMGet | ( | unsigned int | universe, |
const ola::rdm::UID & | uid, | ||
uint16_t | sub_device, | ||
uint16_t | pid, | ||
const uint8_t * | data, | ||
unsigned int | data_length, | ||
const SendRDMArgs & | args | ||
) |
Send an RDM Get Command.
universe | the universe to send the command on |
uid | the UID to send the command to |
sub_device | the sub device index |
pid | the PID to address |
data | the optional data to send |
data_length | the length of the data |
args | the RDM arguments which includes the callback to run. |
void ola::client::OlaClient::RDMSet | ( | unsigned int | universe, |
const ola::rdm::UID & | uid, | ||
uint16_t | sub_device, | ||
uint16_t | pid, | ||
const uint8_t * | data, | ||
unsigned int | data_length, | ||
const SendRDMArgs & | args | ||
) |
Send an RDM Set Command.
universe | the universe to send the command on |
uid | the UID to send the command to |
sub_device | the sub device index |
pid | the PID to address |
data | the optional data to send |
data_length | the length of the data |
args | the RDM arguments which includes the callback to run. |
void ola::client::OlaClient::RegisterUniverse | ( | unsigned int | universe, |
RegisterAction | register_action, | ||
SetCallback * | callback | ||
) |
Register our interest in a universe.
The callback set by SetDMXCallback() will be called when new DMX data arrives.
universe | the id of the universe to register for. |
register_action | the action (register or unregister) |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::ReloadPlugins | ( | SetCallback * | callback | ) |
Trigger a plugin reload.
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::RunDiscovery | ( | unsigned int | universe, |
DiscoveryType | discovery_type, | ||
DiscoveryCallback * | callback | ||
) |
Trigger discovery for a universe.
universe | the universe id to run discovery on. |
discovery_type | the type of discovery to run before returning. |
callback | the UIDListCallback to invoke upon completion. |
void ola::client::OlaClient::SendDMX | ( | unsigned int | universe, |
const DmxBuffer & | data, | ||
const SendDMXArgs & | args | ||
) |
Send DMX data.
universe | the universe to send to. |
data | the DmxBuffer with the data |
args | the SendDMXArgs to use for this call. |
void ola::client::OlaClient::SendTimeCode | ( | const ola::timecode::TimeCode & | timecode, |
SetCallback * | callback | ||
) |
Send TimeCode data.
timecode | The timecode data. |
callback | the SetCallback to invoke when the send completes. |
void ola::client::OlaClient::SetDMXCallback | ( | RepeatableDMXCallback * | callback | ) |
Set the callback to be run when new DMX data arrives.
The DMX callback will be run when new data arrives for universes that have been registered with RegisterUniverse().
callback | the callback to run upon receiving new DMX data. |
void ola::client::OlaClient::SetPluginState | ( | ola_plugin_id | plugin_id, |
bool | state, | ||
SetCallback * | callback | ||
) |
Set the state of a plugin.
plugin_id | the id of the plugin to set the state of. |
state | the state to set the plugin to |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::SetPortPriorityInherit | ( | unsigned int | device_alias, |
unsigned int | port, | ||
PortDirection | port_direction, | ||
SetCallback * | callback | ||
) |
Set the priority for a port to inherit mode.
device_alias | the device containing the port to change |
port | the port id of the port to change. |
port_direction | the direction of the port. |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::SetPortPriorityOverride | ( | unsigned int | device_alias, |
unsigned int | port, | ||
PortDirection | port_direction, | ||
uint8_t | value, | ||
SetCallback * | callback | ||
) |
Set the priority for a port to override mode.
device_alias | the device containing the port to change |
port | the port id of the port to change. |
port_direction | the direction of the port. |
value | the new port priority value. |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::SetSourceUID | ( | const ola::rdm::UID & | uid, |
SetCallback * | callback | ||
) |
Set the source UID for this client.
uid | the UID to use when sending RDM messages from this client. |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::SetUniverseMergeMode | ( | unsigned int | universe, |
OlaUniverse::merge_mode | mode, | ||
SetCallback * | callback | ||
) |
Set the merge mode of a universe.
universe | the id of the universe |
mode | the new merge mode |
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClient::SetUniverseName | ( | unsigned int | universe, |
const std::string & | name, | ||
SetCallback * | callback | ||
) |
Set the name of a universe.
universe | the id of the universe |
name | the new name to use. |
callback | the SetCallback to invoke upon completion. |