Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions api/datatype.proto
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,24 @@ message AnnotatedTensor {
// e.g. pipeline latencies
map<string, google.protobuf.Value> metadata = 2;
}

enum PixelFormat {
kPixelFormatUnknown = 0;
kYUV420_888 = 1;
kRGB888 = 2;
kRGBA8888 = 3;
kGrayscale8 = 4;
kRAW10 = 5;
kRAW16 = 6;
kNV12 = 7;
kNV21 = 8;
}

message ImageFrame {
uint32 width = 1;
uint32 height = 2;
PixelFormat format = 3;
uint64 sequence_number = 4;
uint64 timestamp_ns = 5;
bytes data = 6;
}
1 change: 1 addition & 0 deletions api/device.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ message Peripheral {
kElectricalStimulation = 2;
kOpticalStimulation = 3;
kSpikeSource = 4;
kCamera = 5;
}
string name = 1;
string vendor = 2;
Expand Down
8 changes: 8 additions & 0 deletions api/node.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import "api/nodes/disk_writer.proto";
import "api/nodes/spike_source.proto";
import "api/nodes/spike_binner.proto";
import "api/nodes/application.proto";
import "api/nodes/image_source.proto";
import "api/nodes/image_sink.proto";

enum NodeType {
kNodeTypeUnknown = 0;
Expand All @@ -27,6 +29,8 @@ enum NodeType {
kDiskWriter = 9;
kSpikeBinner = 10;
kApplication = 11;
kImageSource = 12;
kImageSink = 13;
}

message NodeConfig {
Expand All @@ -47,6 +51,8 @@ message NodeConfig {
SpikeSourceConfig spike_source = 12;
SpikeBinnerConfig spike_binner = 13;
ApplicationNodeConfig application = 14;
ImageSourceConfig image_source = 15;
ImageSinkConfig image_sink = 16;
}
}

Expand All @@ -63,6 +69,8 @@ message NodeStatus {
ApplicationNodeStatus application = 7;
OpticalStimulationStatus optical_stimulation = 8;
DiskWriterStatus disk_writer = 10;
ImageSourceStatus image_source = 11;
ImageSinkStatus image_sink = 12;
}
}

Expand Down
14 changes: 14 additions & 0 deletions api/nodes/image_sink.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";

package synapse;

message ImageSinkConfig {
uint32 peripheral_id = 1;
uint32 frame_rate_hz = 2;
}

message ImageSinkStatus {
uint64 frames_exported = 1;
float actual_rate_hz = 2;
float latency_ms = 3;
}
18 changes: 18 additions & 0 deletions api/nodes/image_source.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package synapse;

import "api/datatype.proto";

message ImageSourceConfig {
uint32 peripheral_id = 1;
uint32 width = 2;
uint32 height = 3;
PixelFormat format = 4;
uint32 frame_rate_hz = 5;
}

message ImageSourceStatus {
uint64 frames_produced = 1;
uint64 frames_dropped = 2;
}
Loading