sccn / labstreaminglayer

LabStreamingLayer super repository comprising submodules for LSL and associated apps.
Other
522 stars 157 forks source link

How do I find device name that is being streamed through LSL? #100

Closed CalebUAz closed 2 years ago

CalebUAz commented 2 years ago
from pylsl import StreamInlet, resolve_stream, stream_info

streams = resolve_stream('type', 'NIRS')

Output of streams would be [<pylsl.pylsl.StreamInfo at 0x7x7f73a7ec70a0>,<pylsl.pylsl.StreamInfo at 0x7x7f73a7ec7160>] and this changes every time.

How do I get the device name from the StreamInfo which tells me something like Aurora(iMAC), Aurora is the software which we user to stream data and iMAC could be name of the system?

CalebUAz commented 2 years ago

I think I got it. Its streams[0].hostname(), with this you get the name of the host machine that is streaming the data.