21 #ifndef OLA_OLACLIENTCORE_H_
22 #define OLA_OLACLIENTCORE_H_
27 #include "common/protocol/Ola.pb.h"
28 #include "common/protocol/OlaService.pb.h"
29 #include "common/rpc/RpcChannel.h"
30 #include "common/rpc/RpcController.h"
39 #include "ola/plugin_id.h"
42 #include "ola/timecode/TimeCode.h"
139 const std::string &msg,
199 const std::string &name,
209 OlaUniverse::merge_mode mode,
221 void Patch(
unsigned int device_alias,
225 unsigned int universe,
245 void SendDMX(
unsigned int universe,
283 void RDMGet(
unsigned int universe,
288 unsigned int data_length,
301 void RDMSet(
unsigned int universe,
306 unsigned int data_length,
321 const ola::proto::DmxData* request,
322 ola::proto::Ack* response,
323 CompletionCallback* done);
327 std::auto_ptr<RepeatableDMXCallback> m_dmx_callback;
328 std::auto_ptr<ola::rpc::RpcChannel> m_channel;
329 std::auto_ptr<ola::proto::OlaServerService_Stub> m_stub;
338 ola::proto::PluginListReply *reply_ptr,
345 ola::proto::PluginDescriptionReply *reply,
352 ola::proto::PluginStateReply *reply,
359 ola::proto::DeviceInfoReply *reply,
366 ola::proto::DeviceConfigReply *reply,
373 ola::proto::Ack *reply,
380 ola::proto::Ack *reply,
387 ola::proto::UniverseInfoReply *reply,
394 ola::proto::UniverseInfoReply *reply,
401 ola::proto::DmxData *reply,
408 ola::proto::UIDListReply *reply_ptr,
415 ola::proto::RDMResponse *reply,
421 void GenericFetchCandidatePorts(
unsigned int universe_id,
422 bool include_universe,
428 void SendRDMCommand(
bool is_set,
429 unsigned int universe,
434 unsigned int data_length,
441 ola::proto::RDMResponse *reply,
442 ola::rdm::RDMStatusCode *status_code);
444 static const char NOT_CONNECTED_ERROR[];
451 #endif // OLA_OLACLIENTCORE_H_
void SetDMXCallback(RepeatableDMXCallback *callback)
Set the callback to be run when new DMX data arrives. The DMX callback will be run when new data arri...
Definition: OlaClientCore.cpp:120
The constants for DMX source priorities.
A 0 arg, single use callback that returns void.
Definition: Callback.h:157
Represents the RPC session between a client and server.
Definition: RpcSession.h:45
An RDM Command that represents responses (GET, SET or DISCOVER).
Definition: RDMCommand.h:456
PortDirection
The port direction.
Definition: ClientArgs.h:54
RegisterAction
The register action, used with OlaClient::RegisterUniverse()
Definition: ClientArgs.h:46
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.
Definition: OlaClientCore.cpp:302
DiscoveryType
The type of discovery to run with OlaClient::RunDiscovery().
Definition: ClientArgs.h:62
Types used as return values from the OLA Client.
A BidirectionalFileDescriptor that also generates notifications when closed.
Definition: Descriptor.h:282
void RunDiscovery(unsigned int universe, DiscoveryType discovery_type, DiscoveryCallback *callback)
Trigger discovery for a universe.
Definition: OlaClientCore.cpp:516
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.
Definition: OlaClientCore.cpp:412
void ConfigureDevice(unsigned int device_alias, const std::string &msg, ConfigureDeviceCallback *callback)
Send a device config request.
Definition: OlaClientCore.cpp:231
void FetchUniverseList(UniverseListCallback *callback)
Request a list of universes.
Definition: OlaClientCore.cpp:329
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.
Definition: OlaClientCore.cpp:567
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
A RDM unique identifier (UID).
PatchAction
The patch action, used with OlaClient::Patch()
Definition: ClientArgs.h:38
void FetchCandidatePorts(CandidatePortsCallback *callback)
Definition: OlaClientCore.cpp:227
A class used to hold a single universe of DMX data.
Arguments passed to the SendDMX() method.
Definition: ClientArgs.h:71
void FetchDMX(unsigned int universe, DMXCallback *callback)
Fetch the latest DMX data for a universe.
Definition: OlaClientCore.cpp:496
The low level C++ API to olad. Clients shouldn't use this directly. Instead use ola::client::OlaClien...
Definition: OlaClientCore.h:56
void ReloadPlugins(SetCallback *callback)
Trigger a plugin reload.
Definition: OlaClientCore.cpp:124
Definition: TimeCode.h:33
void SetPortPriorityInherit(unsigned int device_alias, unsigned int port, PortDirection port_direction, SetCallback *callback)
Set the priority for a port to inherit mode.
Definition: OlaClientCore.cpp:277
Types used as arguments for the OLA Client.
void FetchPluginList(PluginListCallback *callback)
Fetch the list of plugins loaded.
Definition: OlaClientCore.cpp:141
void SendDMX(unsigned int universe, const DmxBuffer &data, const SendDMXArgs &args)
Send DMX data.
Definition: OlaClientCore.cpp:467
void SendTimeCode(const ola::timecode::TimeCode &timecode, SetCallback *callback)
Send TimeCode data.
Definition: OlaClientCore.cpp:589
void SetPluginState(ola_plugin_id plugin_id, bool state, SetCallback *callback)
Set the state of a plugin.
Definition: OlaClientCore.cpp:255
void SetSourceUID(const ola::rdm::UID &uid, SetCallback *callback)
Set the source UID for this client.
Definition: OlaClientCore.cpp:546
The base class for all 1 argument callbacks.
Definition: Callback.h:982
Arguments used with OlaClient::RDMGet() and OlaClient::RDMSet() methods.
Definition: ClientArgs.h:103
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.
Definition: OlaClientCore.cpp:578
void FetchDeviceInfo(ola_plugin_id plugin_filter, DeviceInfoCallback *callback)
Request a list of the available devices.
Definition: OlaClientCore.cpp:201
void FetchUniverseInfo(unsigned int universe, UniverseInfoCallback *callback)
Fetch the information for a given universe.
Definition: OlaClientCore.cpp:346
void SetUniverseName(unsigned int universe, const std::string &name, SetCallback *callback)
Set the name of a universe.
Definition: OlaClientCore.cpp:366
A 2 argument callback which can be called multiple times.
Definition: Callback.h:1895
A 1 argument callback which deletes itself after it's run.
Definition: Callback.h:1004
A 3 argument callback which deletes itself after it's run.
Definition: Callback.h:2850
Represents a RDM UID.
Definition: UID.h:57
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
void FetchPluginDescription(ola_plugin_id plugin_id, PluginDescriptionCallback *callback)
Fetch the description for a plugin.
Definition: OlaClientCore.cpp:158
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 wit...
Definition: OlaClientCore.cpp:180
void SetCloseHandler(ClosedCallback *callback)
Definition: OlaClientCore.cpp:111
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.
Definition: OlaClientCore.cpp:622
A RpcController object is passed every time an RPC is invoked and is used to indicate the success or ...
Definition: RpcController.h:42
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...
Definition: OlaClientCore.cpp:442
The various callbacks used with the OLA Client.
void SetUniverseMergeMode(unsigned int universe, OlaUniverse::merge_mode mode, SetCallback *callback)
Set the merge mode of a universe.
Definition: OlaClientCore.cpp:388
A 2 argument callback which deletes itself after it's run.
Definition: Callback.h:1907