Author: Are Oelsner
Gateway gRPC code simulating communication between an app and a simple neural implant with four electrodes.
The App and the device communicate through gRPC for getting and setting individual electrode states.
get: get <(int) electrode number (0-3)>
set: set <(int) electrode number (0-3)> <(int) electrode state(>=0)>
from gRPC_Gateway directory
// <python protoc compiler> -I<path to protos folder> --python_out=<path to new pb2 file> --grpc_python_out=<path to new pb2_grpc file> <path to proto file>
$ python -m grpc_tools.protoc -I./protos --python_out=./python --grpc_python_out=./python ./protos/gateway.proto
python ./python/gateway_server.py
python ./python/gateway_client.py
< see Client command formats above>
PS C:\PATH\gRPC_Gateway> python .\python\gateway_server.py
PS C:\PATH\gRPC_Gateway> python .\python\gateway_client.py
please enter command: get 1
getting electrode 1 state...
electrode 1 state: 0
please enter command: set 1 100
setting electrode 1 state to 100...
electrode 1 state set to 100
please enter command: get 1
getting electrode 1 state...
electrode 1 state: 100
dotnet build .\csharp\Gateway\
dotnet run --project .\csharp\Gateway\GatewayServer\GatewayServer.csproj
dotnet run --project .\csharp\Gateway\GatewayClient\GatewayClient.csproj
<see client command formats above>
$ doxygen doxygen-config-file
Load constructed documentation/API by accessing ./documentation/html/index.html in your browser