-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
break: Remove Electrical/Optical broadband - make single BroadbandCon…
…fig (#29) # Summary Breaking changes made to the API regarding Broadband naming. Specifically * Removes NodeType::kElectricalBroadband * Removes NodeType::kOpticalBroadband * Adds NodeType::kBroadbandSource * Adds NodeType::kSpikeSource * Refactors the BroadbandSourceConfig to have a oneof for the signal type and consolidates the shared fields # Testing * Added a CI for compilation
- Loading branch information
1 parent
c841ecb
commit 6b02951
Showing
10 changed files
with
121 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Proto Compilation Check | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.proto' | ||
pull_request: | ||
paths: | ||
- '**.proto' | ||
|
||
jobs: | ||
check-proto: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Protobuf Compiler | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y protobuf-compiler | ||
- name: Check protoc version | ||
run: protoc --version | ||
|
||
- name: Create temp directory for compilation | ||
run: mkdir -p /tmp/proto_compiled | ||
|
||
- name: Compile Proto files | ||
run: | | ||
PROTO_FILES=$(find api -name '*.proto') | ||
echo "Compiling $PROTO_FILES" | ||
protoc --proto_path=. $PROTO_FILES --cpp_out=/tmp/proto_compiled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
syntax = "proto3"; | ||
|
||
import "api/nodes/signal_config.proto"; | ||
import "api/nodes/signal_status.proto"; | ||
|
||
package synapse; | ||
|
||
message BroadbandSourceConfig { | ||
uint32 peripheral_id = 1; | ||
uint32 bit_width = 2; | ||
uint32 sample_rate_hz = 3; | ||
float gain = 4; | ||
|
||
// Implementation specific configurations | ||
SignalConfig signal = 5; | ||
} | ||
|
||
message BroadbandSourceStatus { | ||
SignalStatus status = 1; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
|
||
import "api/channel.proto"; | ||
|
||
package synapse; | ||
|
||
message ElectrodeConfig { | ||
repeated Channel channels = 1; | ||
float low_cutoff_hz = 2; | ||
float high_cutoff_hz = 3; | ||
} | ||
|
||
message PixelConfig { | ||
repeated uint32 pixel_mask = 1; | ||
} | ||
|
||
message SignalConfig { | ||
oneof signal_type { | ||
ElectrodeConfig electrode = 1; | ||
PixelConfig pixel = 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
syntax = "proto3"; | ||
|
||
package synapse; | ||
|
||
message ElectrodeStatus { | ||
float lsb_uV = 1; | ||
} | ||
|
||
message PixelStatus { | ||
|
||
} | ||
|
||
message SignalStatus { | ||
oneof signal_type { | ||
ElectrodeStatus electrode = 1; | ||
PixelStatus pixel = 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
syntax = "proto3"; | ||
|
||
import "api/channel.proto"; | ||
import "api/nodes/signal_config.proto"; | ||
|
||
package synapse; | ||
|
||
message SpikeSourceConfig { | ||
uint32 peripheral_id = 1; | ||
uint32 sample_rate_hz = 2; | ||
float spike_window_ms = 3; | ||
float gain = 4; | ||
float threshold_uV = 5; | ||
|
||
ElectrodeConfig electrodes = 6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters