23 #include "common/protocol/Ola.pb.h"
24 #include "common/protocol/OlaService.pb.h"
28 #include "olad/ClientBroker.h"
30 #ifndef OLAD_OLASERVERSERVICEIMPL_H_
31 #define OLAD_OLASERVERSERVICEIMPL_H_
54 m_universe_store(universe_store),
55 m_device_manager(device_manager),
56 m_plugin_manager(plugin_manager),
57 m_export_map(export_map),
58 m_port_manager(port_manager),
60 m_wake_up_time(wake_up_time),
65 const ola::proto::UniverseRequest* request,
66 ola::proto::DmxData* response,
69 const ola::proto::RegisterDmxRequest* request,
70 ola::proto::Ack* response,
74 const ola::proto::DmxData* request,
75 ola::proto::Ack* response,
79 const ::ola::proto::DmxData* request,
80 ::ola::proto::STREAMING_NO_RESPONSE* response,
84 const ola::proto::UniverseNameRequest* request,
85 ola::proto::Ack* response,
88 const ola::proto::MergeModeRequest* request,
89 ola::proto::Ack* response,
92 const ola::proto::PatchPortRequest* request,
93 ola::proto::Ack* response,
96 const ola::proto::PortPriorityRequest* request,
97 ola::proto::Ack* response,
100 const ola::proto::OptionalUniverseRequest* request,
101 ola::proto::UniverseInfoReply* response,
104 const ola::proto::PluginListRequest* request,
105 ola::proto::PluginListReply* response,
107 void GetPluginDescription(
109 const ola::proto::PluginDescriptionRequest* request,
110 ola::proto::PluginDescriptionReply* response,
114 const ola::proto::PluginStateRequest* request,
115 ola::proto::PluginStateReply* response,
118 const ola::proto::DeviceInfoRequest* request,
119 ola::proto::DeviceInfoReply* response,
122 const ola::proto::OptionalUniverseRequest* request,
123 ola::proto::DeviceInfoReply* response,
126 const ola::proto::DeviceConfigRequest* request,
127 ola::proto::DeviceConfigReply* response,
130 const ola::proto::UniverseRequest* request,
131 ola::proto::UIDListReply* response,
134 const ola::proto::DiscoveryRequest* request,
135 ola::proto::UIDListReply* response,
138 const ::ola::proto::RDMRequest* request,
139 ola::proto::RDMResponse* response,
144 const ::ola::proto::RDMDiscoveryRequest* request,
145 ola::proto::RDMResponse* response,
150 const ::ola::proto::UID* request,
151 ola::proto::Ack* response,
155 const ::ola::proto::TimeCode* request,
156 ::ola::proto::Ack* response,
160 void HandleRDMResponse(ola::proto::RDMResponse* response,
162 bool include_raw_packets,
163 ola::rdm::rdm_response_code code,
165 const std::vector<std::string> &packets);
166 void RDMDiscoveryComplete(
unsigned int universe,
168 ola::proto::UIDListReply *response,
177 ola::proto::PluginInfo *plugin_info)
const;
180 ola::proto::DeviceInfoReply* response)
const;
182 template <
class PortClass>
183 void PopulatePort(
const PortClass &port,
184 ola::proto::PortInfo *port_info)
const;
186 void SetProtoUID(
const ola::rdm::UID &uid, ola::proto::UID *pb_uid);
216 const ola::proto::UniverseRequest* request,
217 ola::proto::DmxData* response,
219 m_impl->GetDmx(controller, request, response, done);
223 const ola::proto::RegisterDmxRequest* request,
224 ola::proto::Ack* response,
226 m_impl->RegisterForDmx(controller, request, response, done, m_client);
230 const ola::proto::DmxData* request,
231 ola::proto::Ack* response,
233 m_impl->UpdateDmxData(controller, request, response, done, m_client);
237 const ::ola::proto::DmxData* request,
238 ::ola::proto::STREAMING_NO_RESPONSE* response,
240 m_impl->StreamDmxData(controller, request, response, done, m_client);
244 const ola::proto::UniverseNameRequest* request,
245 ola::proto::Ack* response,
247 m_impl->SetUniverseName(controller, request, response, done);
251 const ola::proto::MergeModeRequest* request,
252 ola::proto::Ack* response,
254 m_impl->SetMergeMode(controller, request, response, done);
258 const ola::proto::PatchPortRequest* request,
259 ola::proto::Ack* response,
261 m_impl->PatchPort(controller, request, response, done);
265 const ola::proto::PortPriorityRequest* request,
266 ola::proto::Ack* response,
268 m_impl->SetPortPriority(controller, request, response, done);
272 const ola::proto::OptionalUniverseRequest* request,
273 ola::proto::UniverseInfoReply* response,
275 m_impl->GetUniverseInfo(controller, request, response, done);
279 const ola::proto::PluginListRequest* request,
280 ola::proto::PluginListReply* response,
282 m_impl->GetPlugins(controller, request, response, done);
285 void GetPluginDescription(
287 const ola::proto::PluginDescriptionRequest* request,
288 ola::proto::PluginDescriptionReply* response,
290 m_impl->GetPluginDescription(controller, request, response, done);
295 const ola::proto::PluginStateRequest* request,
296 ola::proto::PluginStateReply* response,
298 m_impl->GetPluginState(controller, request, response, done);
302 const ola::proto::DeviceInfoRequest* request,
303 ola::proto::DeviceInfoReply* response,
305 m_impl->GetDeviceInfo(controller, request, response, done);
309 const ola::proto::OptionalUniverseRequest* request,
310 ola::proto::DeviceInfoReply* response,
312 m_impl->GetCandidatePorts(controller, request, response, done);
316 const ola::proto::DeviceConfigRequest* request,
317 ola::proto::DeviceConfigReply* response,
319 m_impl->ConfigureDevice(controller, request, response, done);
323 const ola::proto::UniverseRequest* request,
324 ola::proto::UIDListReply* response,
326 m_impl->GetUIDs(controller, request, response, done);
330 const ola::proto::DiscoveryRequest* request,
331 ola::proto::UIDListReply* response,
333 m_impl->ForceDiscovery(controller, request, response, done);
337 const ::ola::proto::RDMRequest* request,
338 ola::proto::RDMResponse* response,
340 m_impl->RDMCommand(controller, request, response, done, m_uid, m_client);
344 const ::ola::proto::RDMDiscoveryRequest* request,
345 ola::proto::RDMResponse* response,
347 m_impl->RDMDiscoveryCommand(controller, request, response, done, m_uid,
352 const ::ola::proto::UID* request,
353 ola::proto::Ack* response,
357 const ::ola::proto::TimeCode* request,
358 ::ola::proto::Ack* response,
360 m_impl->
SendTimeCode(controller, request, response, done);
363 Client *GetClient()
const {
return m_client; }
380 #endif // OLAD_OLASERVERSERVICEIMPL_H_