static IObservable <oni.Frame> Generate(ONIController controller) { return(Observable.Create <oni.Frame>((observer, cancellationToken) => { return Task.Factory.StartNew(() => { try { controller.AcqContext.BlockReadSize = controller.BlockReadSize; controller.AcqContext.BlockWriteSize = controller.WritePreAllocSize; controller.AcqContext.Start(); while (!cancellationToken.IsCancellationRequested) { observer.OnNext(controller.AcqContext.ReadFrame()); } } finally { controller.AcqContext.Stop(); } }, cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Default); }) .PublishReconnectable() .RefCount()); }
public NeuropixelsV1Probe(ONIController controller, uint?device_index) : base(controller, device_index, 0x70) { if (controller != null) { ResetProbe(); } }
public NeuropixelsV1Flex(ONIController controller, uint?device_index) : base(controller, device_index, 0x50) { if (controller != null) { Update(); } }
protected override Expression VisitExtension(Expression node) { var hidden_controller = node as HiddenONIControllerExpression; if (hidden_controller != null) { Controller = hidden_controller.Tag; } return(base.VisitExtension(node)); }
public ONIXControllerBuilder() { Controller = new ONIController(); }
public I2CConfiguration(ONIController controller, uint?device_index, uint i2c_addr) { ctrl = controller; dev_idx = device_index; I2C_ADDR = i2c_addr; }