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.