protected virtual bool isTheExpected(LSLStreamInfoWrapper stream) { bool predicate = StreamName.Equals(stream.Name); predicate &= StreamType.Equals(stream.Type); Debug.Log(string.Format("Predicate: {0}", predicate)); return(predicate); }
protected virtual bool isTheExpected(LSLStreamInfoWrapper stream) { bool predicate = StreamName.Equals(stream.Name); predicate &= StreamType.Equals(stream.Type); return(predicate); }
protected override bool isTheExpected(LSLStreamInfoWrapper stream) { bool predicate = base.isTheExpected(stream); // maybe more checks here return(predicate); }
protected override bool isTheExpected(LSLStreamInfoWrapper stream) { // the base implementation just checks for stream name and type var predicate = base.isTheExpected(stream); // add a more specific description for your stream here specifying hostname etc. //predicate &= stream.HostName.Equals("Expected Hostname"); return(predicate); }
protected virtual bool isTheExpected(LSLStreamInfoWrapper stream) { bool predicate = StreamName.Equals(stream.Name); predicate &= StreamType.Equals(stream.Type); // add a more specific description for your stream here specifying hostname etc. //predicate &= stream.HostName.Equals("Expected Hostname"); return(predicate); }
/// <summary> /// Callback method for the Resolver gets called each time the resolver misses a stream within its cache /// </summary> /// <param name="stream"></param> public virtual void AStreamGotLost(LSLStreamInfoWrapper stream) { if (!isTheExpected(stream)) { return; } ExciteOMeterManager.DebugLog(string.Format("LSL Stream {0} Lost for {1}", stream.Name, name)); OnStreamLost(); }
/// <summary> /// Callback method for the Resolver gets called each time the resolver found a stream /// </summary> /// <param name="stream"></param> public virtual void AStreamIsFound(LSLStreamInfoWrapper stream) { if (!isTheExpected(stream)) { return; } Debug.Log(string.Format("LSL Stream {0} found for {1}", stream.Name, name)); inlet = new LSL.liblsl.StreamInlet(stream.Item); expectedChannels = stream.ChannelCount; OnStreamAvailable(); }
/// <summary> /// Callback method for the Resolver gets called each time the resolver found a stream /// </summary> /// <param name="stream"></param> public virtual void AStreamIsFound(LSLStreamInfoWrapper stream) { if (!isTheExpected(stream)) { return; } ExciteOMeterManager.DebugLog(string.Format("LSL Stream {0} found for {1}", stream.Name, name)); // In case the signal emulator is running. Deactivate it. EoM_SignalEmulator.DisableEmulator(); inlet = new LSL.liblsl.StreamInlet(stream.Item); expectedChannels = stream.ChannelCount; OnStreamAvailable(); }