Releases: neurotechcenter/BCI2000RemoteNET
Version 1.0.0-b3
- Events can be accessed on a per-sample basis, through an overload of GetEvent with a sample parameter
- Parameters can be set to an empty string
- Put messages to the system log via Log(), Warn(), and Error().
- Fixed an exception when shutting down BCI2000
- Corrected timing of parameters loading, they now load after modules start (This is because loading parameters only loads their values. Adding parameters must be done with AddParameter before modules load)
Version 1.0.0-b2
Enhancements and bugfixes from 1.0.0-b1
Enhancements
- Removed visualize option from AddEvent
Because of how BCI2000 works, the visualize option does not work. Instead, use the Visualize method. - Code now uses full C# null checking
- StartupModules now takes
IDictionary<string, IEnumerable<string>?>instead ofDictionary<string, List<string>?>. This makes it more flexible, and also enables better interfacing with F#. Unfortunately, it also makes it impossible to use new() type deduction when passing the parameter. Passing the modules parameter is done like so:
StartupModules(new Dictionary<string, IEnumerable<string>?> () {
//In the .NET 8.0 version
{"ModuleName1", ["parameter1=value1", "parameter2=value2"]},
//In either the .NET Standard 2.1 or .NET 8.0 version
{"ModuleName2", new string[] {"parameter1=value1", "parameter2=value2"}},
//Passing no module parameters
{"ModuleName3", null}
});
- Added delay parameter to
StartOperator, in order to give the operator time to start before attempting to connect. By default, the library will block for 200ms after starting the operator.
Bug fixes
- Fixed bug in which
SendCommandis not called when callingExecute<T> - Fixed
WaitForSystemStateexpecting boolean response when called with no timeout parameter
Version 1.0.0-b1
Version 1.0.0 is a full rewrite of BCI2000RemoteNET for greater performance and reliability.
The changes are extensive; the most notable ones are as follows:
-
BCI2000Remoteno longer inherits fromBCI2000Connection. Instead, it holds a public readonly member variable of typeBCI2000Connection. This is to keep better separation of interfaces between basic functionality of connecting to BCI2000 and full control of BCI2000. It means that some methods such asQuit()must be called through theconnectionvariable within ``BCI2000Remote`. -
Starting up a local operator is now explicit. Call the
StartOperator()method with the path to operator executable and listening IP address to start a local instance of the operator.Connect()is still used to connect to the operator, but it takes IP address arguments regardless of if the operator has started locally or not. If both of these methods are called with default values, the operator will start listening on127.0.0.1:3999. If using an already-running operator, just callConnect()with the desired address. -
There are now two versions of BCI2000RemoteNET, targeting .NET 8.0 and .NET Standard 2.1. The .NET 8.0 version should be treated as the main version. The .NET Standard version primarily exists for use with Unity, for the time being until Unity implements support for .NET 8.0. The two versions are mostly identical, except for the behavior of
BCI2000Connection.Execute(), which is described below. -
Executeis now simplified. In the .NET 8.0 version,Executeeither takes 0 or one type parameter implementingIParsable. The zero-argument version executes the specified command and receives the response. Be default, if it receives a non-blank response, it will throw an exception, as most BCI2000 commands return nothing if successful. If the argumentexpectEmptyResponseis instead set to false, the method will discard the response. The single-type-argument version will attempt to parse whatever response it receives to the given type, and throw otherwise. -
In the .NET Standard version,
Execute<T>is split into multiple methods (ExecuteBool, ExecuteString, ExecuteUInt32, ExecuteDouble), which parse the response as the specified type and return it. This is because .NET Standard does not support the genericIParsableinterface which first appeared in .NET 7.0. If you wish to parse the response as another type, useExecuteStringand parse the returned response.
Version 0.4.0-b
-Changed Connect to take a list of type (string. uint) where the number is the bit width of the event.
Version 0.3.0-b
Changed response handling to be closer to BCI2000Remote and to keep synchronization with operator. This means that connection with the operator no longer breaks if bci2000 takes a long time to start up modules
0.2.3
Fixed SimpleCommand always returning false, it now returns true if it receives a prompt character ('>'), which probably messes up its error reporting, but fixed more than it breaks, so its fine
0.2.2
BCI2000Connections now actually closes the log stream.
v0.2.1
Fixed license file, and added icons for nuget. Also added package to nuget.
v0.2.0: add gpl
Added license as well as Connect() no longer calls Disconnect(), do it manually.