Open Lighting Architecture  0.9.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
ola::client::OlaClientCore Class Reference

Detailed Description

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.

Member Function Documentation

void ola::client::OlaClientCore::ConfigureDevice ( unsigned int  device_alias,
const std::string &  msg,
ConfigureDeviceCallback callback 
)

Send a device config request.

Parameters
device_aliasthe device alias of the device to configure.
msgthe blob of data to send to the device.
callbackthe ConfigureDeviceCallback invoked upon completion.
void ola::client::OlaClientCore::FetchCandidatePorts ( CandidatePortsCallback callback)

Request a list of ports that could be patched to new universe.

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

Parameters
universe_idthe id of the universe to fetch the candidate ports for.
callbackthe CandidatePortsCallback invoked upon completion.
void ola::client::OlaClientCore::FetchDeviceInfo ( ola_plugin_id  plugin_filter,
DeviceInfoCallback callback 
)

Request a list of the available devices.

Parameters
plugin_filteronly fetch devices that belong to the specified plugin.
callbackthe DeviceInfoCallback to be invoked upon completion.
void ola::client::OlaClientCore::FetchDMX ( unsigned int  universe,
DMXCallback callback 
)

Fetch the latest DMX data for a universe.

Parameters
universethe universe id to get data for.
callbackthe SetCallback to invoke upon completion.
void ola::client::OlaClientCore::FetchPluginDescription ( ola_plugin_id  plugin_id,
PluginDescriptionCallback callback 
)

Fetch the description for a plugin.

Parameters
plugin_idthe id of the plugin to fetch the state for.
callbackthe PluginDescriptionCallback to be invoked upon completion.
void ola::client::OlaClientCore::FetchPluginList ( PluginListCallback callback)

Fetch the list of plugins loaded.

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

Parameters
plugin_idthe id of the plugin to fetch the state for.
callbackthe PluginStateCallback to be invoked upon completion.
void ola::client::OlaClientCore::FetchUniverseInfo ( unsigned int  universe,
UniverseInfoCallback callback 
)

Fetch the information for a given universe.

Parameters
universethe id of the universe.
callbackthe UniverseInfoCallback to invoke upon completion.
void ola::client::OlaClientCore::FetchUniverseList ( UniverseListCallback callback)

Request a list of universes.

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

Parameters
device_aliasthe device containing the port to change
portthe port id of the port to change.
port_directionthe direction of the port.
actionOlaClientCore::PATCH or OlaClientCore::UNPATCH.
universeuniverse id to patch the port to.
callbackthe 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.

Parameters
universethe universe to send the command on
uidthe UID to send the command to
sub_devicethe sub device index
pidthe PID to address
datathe optional data to send
data_lengththe length of the data
argsthe 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.

Parameters
universethe universe to send the command on
uidthe UID to send the command to
sub_devicethe sub device index
pidthe PID to address
datathe optional data to send
data_lengththe length of the data
argsthe 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.

Parameters
universethe id of the universe to register for.
register_actionthe action (register or unregister)
callbackthe SetCallback to invoke upon completion.
void ola::client::OlaClientCore::ReloadPlugins ( SetCallback callback)

Trigger a plugin reload.

Parameters
callbackthe SetCallback to invoke upon completion.
void ola::client::OlaClientCore::RunDiscovery ( unsigned int  universe,
DiscoveryType  discovery_type,
DiscoveryCallback callback 
)

Trigger discovery for a universe.

Parameters
universethe universe id to run discovery on.
discovery_typethe type of discovery to run before returning.
callbackthe UIDListCallback to invoke upon completion.
void ola::client::OlaClientCore::SendDMX ( unsigned int  universe,
const DmxBuffer data,
const SendDMXArgs args 
)

Send DMX data.

Parameters
universethe universe to send to.
datathe DmxBuffer with the data
argsthe SendDMXArgs to use for this call.
void ola::client::OlaClientCore::SendTimeCode ( const ola::timecode::TimeCode timecode,
SetCallback callback 
)

Send TimeCode data.

Parameters
timecodeThe timecode data.
callbackthe 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.

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

Parameters
device_aliasthe device containing the port to change
portthe port id of the port to change.
port_directionthe direction of the port.
callbackthe 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.

Parameters
device_aliasthe device containing the port to change
portthe port id of the port to change.
port_directionthe direction of the port.
valuethe new port priority value.
callbackthe SetCallback to invoke upon completion.
void ola::client::OlaClientCore::SetSourceUID ( const ola::rdm::UID uid,
SetCallback callback 
)

Set the source UID for this client.

Parameters
uidthe UID to use when sending RDM messages from this client.
callbackthe 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.

Parameters
universethe id of the universe
modethe new merge mode
callbackthe 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.

Parameters
universethe id of the universe
namethe new name to use.
callbackthe SetCallback to invoke upon completion.

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