Esempio n. 1
0
/*
 * Handle a ConfigureDevice request
 */
void OlaServerServiceImpl::ConfigureDevice(
    RpcController* controller,
    const DeviceConfigRequest* request,
    DeviceConfigReply* response,
    ola::rpc::RpcService::CompletionCallback* done) {
  AbstractDevice *device =
    m_device_manager->GetDevice(request->device_alias());
  if (!device) {
    MissingDeviceError(controller);
    done->Run();
    return;
  }

  device->Configure(controller, request->data(),
                    response->mutable_data(), done);
}
Esempio n. 2
0
/*
 * Handle a ConfigureDevice request
 */
void OlaServerServiceImpl::ConfigureDevice(RpcController* controller,
                                           const DeviceConfigRequest* request,
                                           DeviceConfigReply* response,
                                           google::protobuf::Closure* done) {
  AbstractDevice *device =
    m_device_manager->GetDevice(request->device_alias());
  if (!device) {
    MissingDeviceError(controller);
    done->Run();
    return;
  }

  device->Configure(controller,
                    request->data(),
                    response->mutable_data(), done);
}