24 #include "common/protocol/Ola.pb.h"
25 #include "common/protocol/OlaService.pb.h"
29 #include "olad/ClientBroker.h"
31 #ifndef OLAD_OLASERVERSERVICEIMPL_H_
32 #define OLAD_OLASERVERSERVICEIMPL_H_
58 m_universe_store(universe_store),
59 m_device_manager(device_manager),
60 m_plugin_manager(plugin_manager),
61 m_export_map(export_map),
62 m_port_manager(port_manager),
64 m_wake_up_time(wake_up_time),
65 m_reload_plugins_callback(reload_plugins_callback),
70 const ola::proto::UniverseRequest* request,
71 ola::proto::DmxData* response,
74 const ola::proto::RegisterDmxRequest* request,
75 ola::proto::Ack* response,
79 const ola::proto::DmxData* request,
80 ola::proto::Ack* response,
84 const ::ola::proto::DmxData* request,
85 ::ola::proto::STREAMING_NO_RESPONSE* response,
89 const ola::proto::UniverseNameRequest* request,
90 ola::proto::Ack* response,
93 const ola::proto::MergeModeRequest* request,
94 ola::proto::Ack* response,
97 const ola::proto::PatchPortRequest* request,
98 ola::proto::Ack* response,
101 const ola::proto::PortPriorityRequest* request,
102 ola::proto::Ack* response,
105 const ola::proto::OptionalUniverseRequest* request,
106 ola::proto::UniverseInfoReply* response,
109 const ola::proto::PluginListRequest* request,
110 ola::proto::PluginListReply* response,
113 const ::ola::proto::PluginReloadRequest* request,
114 ::ola::proto::Ack* response,
116 void GetPluginDescription(
118 const ola::proto::PluginDescriptionRequest* request,
119 ola::proto::PluginDescriptionReply* response,
123 const ola::proto::PluginStateRequest* request,
124 ola::proto::PluginStateReply* response,
127 const ola::proto::DeviceInfoRequest* request,
128 ola::proto::DeviceInfoReply* response,
131 const ola::proto::OptionalUniverseRequest* request,
132 ola::proto::DeviceInfoReply* response,
135 const ola::proto::DeviceConfigRequest* request,
136 ola::proto::DeviceConfigReply* response,
139 const ola::proto::UniverseRequest* request,
140 ola::proto::UIDListReply* response,
143 const ola::proto::DiscoveryRequest* request,
144 ola::proto::UIDListReply* response,
147 const ::ola::proto::RDMRequest* request,
148 ola::proto::RDMResponse* response,
153 const ::ola::proto::RDMDiscoveryRequest* request,
154 ola::proto::RDMResponse* response,
159 const ::ola::proto::UID* request,
160 ola::proto::Ack* response,
164 const ::ola::proto::TimeCode* request,
165 ::ola::proto::Ack* response,
169 void HandleRDMResponse(ola::proto::RDMResponse* response,
171 bool include_raw_packets,
172 ola::rdm::rdm_response_code code,
174 const std::vector<std::string> &packets);
175 void RDMDiscoveryComplete(
unsigned int universe,
177 ola::proto::UIDListReply *response,
186 ola::proto::PluginInfo *plugin_info)
const;
189 ola::proto::DeviceInfoReply* response)
const;
191 template <
class PortClass>
192 void PopulatePort(
const PortClass &port,
193 ola::proto::PortInfo *port_info)
const;
195 void SetProtoUID(
const ola::rdm::UID &uid, ola::proto::UID *pb_uid);
204 std::auto_ptr<ReloadPluginsCallback> m_reload_plugins_callback;
226 const ola::proto::UniverseRequest* request,
227 ola::proto::DmxData* response,
229 m_impl->GetDmx(controller, request, response, done);
233 const ola::proto::RegisterDmxRequest* request,
234 ola::proto::Ack* response,
236 m_impl->RegisterForDmx(controller, request, response, done, m_client);
240 const ola::proto::DmxData* request,
241 ola::proto::Ack* response,
243 m_impl->UpdateDmxData(controller, request, response, done, m_client);
247 const ::ola::proto::DmxData* request,
248 ::ola::proto::STREAMING_NO_RESPONSE* response,
250 m_impl->StreamDmxData(controller, request, response, done, m_client);
254 const ola::proto::UniverseNameRequest* request,
255 ola::proto::Ack* response,
257 m_impl->SetUniverseName(controller, request, response, done);
261 const ola::proto::MergeModeRequest* request,
262 ola::proto::Ack* response,
264 m_impl->SetMergeMode(controller, request, response, done);
268 const ola::proto::PatchPortRequest* request,
269 ola::proto::Ack* response,
271 m_impl->PatchPort(controller, request, response, done);
275 const ola::proto::PortPriorityRequest* request,
276 ola::proto::Ack* response,
278 m_impl->SetPortPriority(controller, request, response, done);
282 const ola::proto::OptionalUniverseRequest* request,
283 ola::proto::UniverseInfoReply* response,
285 m_impl->GetUniverseInfo(controller, request, response, done);
289 const ola::proto::PluginListRequest* request,
290 ola::proto::PluginListReply* response,
292 m_impl->GetPlugins(controller, request, response, done);
296 const ::ola::proto::PluginReloadRequest* request,
297 ::ola::proto::Ack* response,
299 m_impl->ReloadPlugins(controller, request, response, done);
302 void GetPluginDescription(
304 const ola::proto::PluginDescriptionRequest* request,
305 ola::proto::PluginDescriptionReply* response,
307 m_impl->GetPluginDescription(controller, request, response, done);
312 const ola::proto::PluginStateRequest* request,
313 ola::proto::PluginStateReply* response,
315 m_impl->GetPluginState(controller, request, response, done);
319 const ola::proto::DeviceInfoRequest* request,
320 ola::proto::DeviceInfoReply* response,
322 m_impl->GetDeviceInfo(controller, request, response, done);
326 const ola::proto::OptionalUniverseRequest* request,
327 ola::proto::DeviceInfoReply* response,
329 m_impl->GetCandidatePorts(controller, request, response, done);
333 const ola::proto::DeviceConfigRequest* request,
334 ola::proto::DeviceConfigReply* response,
336 m_impl->ConfigureDevice(controller, request, response, done);
340 const ola::proto::UniverseRequest* request,
341 ola::proto::UIDListReply* response,
343 m_impl->GetUIDs(controller, request, response, done);
347 const ola::proto::DiscoveryRequest* request,
348 ola::proto::UIDListReply* response,
350 m_impl->ForceDiscovery(controller, request, response, done);
354 const ::ola::proto::RDMRequest* request,
355 ola::proto::RDMResponse* response,
357 m_impl->RDMCommand(controller, request, response, done, m_uid, m_client);
361 const ::ola::proto::RDMDiscoveryRequest* request,
362 ola::proto::RDMResponse* response,
364 m_impl->RDMDiscoveryCommand(controller, request, response, done, m_uid,
369 const ::ola::proto::UID* request,
370 ola::proto::Ack* response,
374 const ::ola::proto::TimeCode* request,
375 ::ola::proto::Ack* response,
377 m_impl->
SendTimeCode(controller, request, response, done);
380 Client *GetClient()
const {
return m_client; }
397 #endif // OLAD_OLASERVERSERVICEIMPL_H_