Closed amemov closed 1 year ago
I'm afraid I don't understand the issue. It appears as though all streams are initialized to null and it's the connection listener that then sets the inlet when the resolver finds it. If MotorImagery_Incoming continues to be null even well after the application has started then I guess that means that the resolver can't find it.
Are you sure the stream Type is "Markers" (and not "Marker" or "Events" etc.)?
Do you ever see the Debug.Log for "Motor Imagery stream connected"?
A few other notes:
double
data type. usually they are strings.using StreamInlet MotorImagery_Incoming = ...
line inside the coroutine is suspicious. Are you sure this is overwriting the member variable?You are redeclaring MotorImagery_Incoming
inside the while loop with a using statement. This object is then being destroyed as soon as it goes out of scope and the global MotorImagery_Incoming
object remains null. Yielding null on each pass which is definitely not desirable. In C# yield
and IEnumerator
are used for writing iterators---typically so that you can use methods or objects in foreach
statements. These methods are not being used in that way.
In fact, I myself cannot get this snippet to compile under .NET 6. First of all, IEnumerator needs to be templated to a type, second of all, it is illegal to redeclare a variable name.
That is to say, this is not an issue with LSL, the client code is not working properly.
Hi, just a quick reminder that OpenViBE has two boxes to export LSL, the default one where a dedicated Markers stream is created (http://openvibe.inria.fr/documentation/3.5.0/Doc_BoxAlgorithm_LSLExport.html) and another one (Gipsa http://openvibe.inria.fr/documentation/3.5.0/Doc_BoxAlgorithm_LSLExportGipsa.html ) where the markers are in fact included as float values in a supplementary channel of the signal stream (but here you can choose both stream name and types). If even after correcting the code as described above you cannot find the markers stream, maybe you used Gipsa? My two cents of lurking around :upside_down_face:
Hello, I'm using OpenVIBE 3.5.0 to run some scenarios and to stream signals and markers to the Unity. I have zero issues with signals, however, when I try to get Markers from openVIBE, unity initializes
StreamInlet MotorImagery_Incoming
to null. I did make sure that the Markers channel name is the one I need, but I still get errors.