Open Lighting Architecture
0.9.5
|
The low level C++ API to olad. Clients shouldn't use this directly. Instead use ola::client::OlaClient.
Public Types | |
typedef ola::SingleUseCallback0< void > | ClosedCallback |
Public Member Functions | |
OlaClientCore (ola::io::ConnectedDescriptor *descriptor) | |
bool | Setup () |
bool | Stop () |
void | SetCloseHandler (ClosedCallback *callback) |
void | 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(). Ownership of the callback is transferred to the OlaClientCore. | |
void | ReloadPlugins (SetCallback *callback) |
Trigger a plugin reload. | |
void | FetchPluginList (PluginListCallback *callback) |
Fetch the list of plugins loaded. | |
void | FetchPluginDescription (ola_plugin_id plugin_id, PluginDescriptionCallback *callback) |
Fetch the description for a plugin. | |
void | 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. | |
void | FetchDeviceInfo (ola_plugin_id plugin_filter, DeviceInfoCallback *callback) |
Request a list of the available devices. | |
void | FetchCandidatePorts (CandidatePortsCallback *callback) |
void | FetchCandidatePorts (unsigned int universe_id, CandidatePortsCallback *callback) |
Request a list of ports that could be patched to a particular universe. | |
void | ConfigureDevice (unsigned int device_alias, const std::string &msg, ConfigureDeviceCallback *callback) |
Send a device config request. | |
void | SetPortPriorityInherit (unsigned int device_alias, unsigned int port, PortDirection port_direction, SetCallback *callback) |
Set the priority for a port to inherit mode. | |
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. | |
void | FetchUniverseList (UniverseListCallback *callback) |
Request a list of universes. | |
void | FetchUniverseInfo (unsigned int universe, UniverseInfoCallback *callback) |
Fetch the information for a given universe. | |
void | SetUniverseName (unsigned int universe, const std::string &name, SetCallback *callback) |
Set the name of a universe. | |
void | SetUniverseMergeMode (unsigned int universe, OlaUniverse::merge_mode mode, SetCallback *callback) |
Set the merge mode of a universe. | |
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. | |
void | 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. | |
void | SendDMX (unsigned int universe, const DmxBuffer &data, const SendDMXArgs &args) |
Send DMX data. | |
void | FetchDMX (unsigned int universe, DMXCallback *callback) |
Fetch the latest DMX data for a universe. | |
void | RunDiscovery (unsigned int universe, DiscoveryType discovery_type, DiscoveryCallback *callback) |
Trigger discovery for a universe. | |
void | SetSourceUID (const ola::rdm::UID &uid, SetCallback *callback) |
Set the source UID for this client. | |
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. | |
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. | |
void | SendTimeCode (const ola::timecode::TimeCode &timecode, SetCallback *callback) |
Send TimeCode data. | |
void | UpdateDmxData (ola::rpc::RpcController *controller, const ola::proto::DmxData *request, ola::proto::Ack *response, CompletionCallback *done) |
This is called by the channel when new DMX data arrives. |
void ola::client::OlaClientCore::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::OlaClientCore::FetchCandidatePorts | ( | CandidatePortsCallback * | callback | ) |
Request a list of ports that could be patched to new universe.
callback | the CandidatePortsCallback invoked upon completion. |
void ola::client::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::FetchPluginList | ( | PluginListCallback * | callback | ) |
Fetch the list of plugins loaded.
callback | the PluginListCallback to be invoked upon completion. |
void ola::client::OlaClientCore::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::OlaClientCore::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::OlaClientCore::FetchUniverseList | ( | UniverseListCallback * | callback | ) |
Request a list of universes.
callback | the UniverseListCallback to invoke upon completion. |
void ola::client::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::ReloadPlugins | ( | SetCallback * | callback | ) |
Trigger a plugin reload.
callback | the SetCallback to invoke upon completion. |
void ola::client::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::SetCloseHandler | ( | ClosedCallback * | callback | ) |
Set the close handler.
void ola::client::OlaClientCore::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(). Ownership of the callback is transferred to the OlaClientCore.
callback | the callback to run upon receiving new DMX data. |
void ola::client::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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::OlaClientCore::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. |