Skip to content

Commit 41610b9

Browse files
committed
Fix missing method in pylsl library for resolving streams in Networking Test Kit
OpenBCI/Documentation#237
1 parent db1cbc5 commit 41610b9

7 files changed

Lines changed: 16 additions & 16 deletions

Networking-Test-Kit/LSL/lslStreamTest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Example program to show how to read a multi-channel time series from LSL."""
22
import time
3-
from pylsl import StreamInlet, resolve_stream
3+
from pylsl import StreamInlet, resolve_byprop
44
from time import sleep
55

66
# first resolve an EEG stream on the lab network
77
print("looking for an EEG stream...")
8-
streams = resolve_stream('type', 'EEG')
8+
streams = resolve_byprop('type', 'EEG')
99

1010
# create a new inlet to read from the stream
1111
inlet = StreamInlet(streams[0])

Networking-Test-Kit/LSL/lslStreamTest_3Streams.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
77
"""
88

9-
from pylsl import StreamInlet, resolve_stream
9+
from pylsl import StreamInlet, resolve_byprop
1010
import time
1111

1212
numStreams = 3
1313
duration_seconds = 10
1414
# first resolve an EEG stream on the lab network
1515
print("looking for an EEG stream...")
16-
stream_1 = resolve_stream('type', 'EEG')
17-
stream_2 = resolve_stream('type', 'AUX')
18-
stream_3 = resolve_stream('type', 'FOCUS')
16+
stream_1 = resolve_byprop('type', 'EEG')
17+
stream_2 = resolve_byprop('type', 'AUX')
18+
stream_3 = resolve_byprop('type', 'FOCUS')
1919

2020
# create a new inlet to read from the stream
2121
inlet = StreamInlet(stream_1[0])

Networking-Test-Kit/LSL/lslStreamTest_AnalogPinPulse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Example program to show how to read a multi-channel time series from LSL."""
22
import time
3-
from pylsl import StreamInlet, resolve_stream
3+
from pylsl import StreamInlet, resolve_byprop
44
from time import sleep
55
import numpy as np
66
import matplotlib.pyplot as plt
@@ -9,7 +9,7 @@
99

1010
# first resolve an EEG stream on the lab network
1111
print("looking for an EEG stream...")
12-
streams = resolve_stream('type', 'EEG')
12+
streams = resolve_byprop('type', 'EEG')
1313

1414
# create a new inlet to read from the stream
1515
inlet = StreamInlet(streams[0])

Networking-Test-Kit/LSL/lslStreamTest_BandPowerAllChannels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Example program to show how to read a GUI BandPower data over LSL."""
22
import time
3-
from pylsl import StreamInlet, resolve_stream
3+
from pylsl import StreamInlet, resolve_byprop
44
from time import sleep
55

66
# Example Sample
@@ -9,7 +9,7 @@
99

1010
# First resolve an EEG stream on the lab network
1111
print("looking for an EEG stream...")
12-
streams = resolve_stream('type', 'EEG')
12+
streams = resolve_byprop('type', 'EEG')
1313

1414
# Create a new inlet to read from the stream
1515
inlet = StreamInlet(streams[0])

Networking-Test-Kit/LSL/lslStreamTest_Chan1Pulse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Example program to show how to read a multi-channel time series from LSL."""
22
import time
3-
from pylsl import StreamInlet, resolve_stream
3+
from pylsl import StreamInlet, resolve_byprop
44
from time import sleep
55
import numpy as np
66
import matplotlib.pyplot as plt
@@ -9,7 +9,7 @@
99

1010
# first resolve an EEG stream on the lab network
1111
print("looking for an EEG stream...")
12-
streams = resolve_stream('type', 'EXG')
12+
streams = resolve_byprop('type', 'EXG')
1313

1414
# create a new inlet to read from the stream
1515
inlet = StreamInlet(streams[0])

Networking-Test-Kit/LSL/lslStreamTest_FFTplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Run the OpenBCI GUI
22
### Set Networking mode to LSL, FFT data type, and # Chan to 125
33
### Thanks to @Sentdex - Nov 2019
4-
from pylsl import StreamInlet, resolve_stream
4+
from pylsl import StreamInlet, resolve_byprop
55
import numpy as np
66
import time
77
import matplotlib.pyplot as plt
@@ -15,7 +15,7 @@
1515

1616
# first resolve an EEG stream on the lab network
1717
print("looking for an EEG stream...")
18-
streams = resolve_stream('type', 'FFT')
18+
streams = resolve_byprop('type', 'FFT')
1919
# create a new inlet to read from the stream
2020
inlet = StreamInlet(streams[0])
2121

Networking-Test-Kit/LSL/lslStreamTest_PullSample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Here we show that we can use push_sample to send and pull_chunk to receive a sample."""
22
import time
3-
from pylsl import StreamInlet, resolve_stream
3+
from pylsl import StreamInlet, resolve_byprop
44
from time import sleep
55

66
# first resolve an EEG stream on the lab network
77
print("looking for an EEG stream...")
8-
streams = resolve_stream('type', 'FOCUS')
8+
streams = resolve_byprop('type', 'FOCUS')
99

1010
# create a new inlet to read from the stream
1111
inlet = StreamInlet(streams[0])

0 commit comments

Comments
 (0)