@science-corporation/synapse 2.2.8 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- # Synapse API 2.0.0
1
+ # Synapse API 2.1.0
2
2
 
3
3
  The Synapse Protocol defines a standard interface for interacting with a wide range of possible neural interface devices.
4
4
 
@@ -107,3 +107,26 @@ message AnnotatedTensor {
107
107
  // e.g. pipeline latencies
108
108
  map<string, google.protobuf.Value> metadata = 2;
109
109
  }
110
+
111
+ enum PixelFormat {
112
+ kPixelFormatUnknown = 0;
113
+ kYUV420_888 = 1;
114
+ kRGB888 = 2;
115
+ kRGBA8888 = 3;
116
+ kGrayscale8 = 4;
117
+ kRAW10 = 5;
118
+ kRAW16 = 6;
119
+ kNV12 = 7;
120
+ kNV21 = 8;
121
+ }
122
+
123
+ message ImageFrame {
124
+ uint32 width = 1;
125
+ uint32 height = 2;
126
+ PixelFormat format = 3;
127
+ uint32 sample_rate_hz = 4;
128
+ uint64 sequence_number = 5;
129
+ uint64 timestamp_ns = 6;
130
+ uint64 unix_timestamp_ns = 7;
131
+ bytes data = 8;
132
+ }
@@ -4,7 +4,8 @@ package synapse;
4
4
 
5
5
  import "api/node.proto";
6
6
  import "api/status.proto";
7
- import "api/time.proto";
7
+
8
+ import "google/protobuf/struct.proto";
8
9
 
9
10
  message Peripheral {
10
11
  enum Type {
@@ -13,6 +14,7 @@ message Peripheral {
13
14
  kElectricalStimulation = 2;
14
15
  kOpticalStimulation = 3;
15
16
  kSpikeSource = 4;
17
+ kCamera = 5;
16
18
  }
17
19
  string name = 1;
18
20
  string vendor = 2;
@@ -37,13 +39,35 @@ message DeviceConfiguration {
37
39
  }
38
40
 
39
41
 
40
- // Device settings that are configurable by the user
42
+ // Device settings that are configurable by the user.
43
+ // Keys and value types are defined by the device and advertised via
44
+ // GetSettingsResponse.schema.
41
45
  message DeviceSettings {
46
+ reserved 1, 2, 3;
47
+ reserved "name", "time_source", "fpga_clock_freq_hz";
48
+
49
+ google.protobuf.Struct values = 4;
50
+ }
51
+
52
+ // Describes a single settings key that the device accepts.
53
+ message SettingDescriptor {
54
+ enum Kind {
55
+ kKindUnknown = 0;
56
+ kString = 1;
57
+ kInt = 2;
58
+ kDouble = 3;
59
+ kBool = 4;
60
+ kEnum = 5;
61
+ }
62
+
42
63
  string name = 1;
43
- TimeSource time_source = 2;
64
+ string description = 2;
65
+ Kind kind = 3;
66
+ google.protobuf.Value default_value = 4;
44
67
 
45
- // If configurable, the desired FPGA clock frequency in hz
46
- uint32 fpga_clock_freq_hz = 3;
68
+ // Allowed values for enum-kind or discrete-set settings
69
+ // (e.g. valid FPGA clock frequencies).
70
+ repeated google.protobuf.Value allowed_values = 5;
47
71
  }
48
72
 
49
73
  message GetSettingsQuery {
@@ -52,10 +76,13 @@ message GetSettingsQuery {
52
76
 
53
77
  message GetSettingsResponse {
54
78
  DeviceSettings settings = 1;
79
+
80
+ // Describes the keys this device accepts in DeviceSettings.values.
81
+ repeated SettingDescriptor schema = 2;
55
82
  }
56
83
 
57
84
  message UpdateDeviceSettingsRequest {
58
- // If a field isn't populated, it will not be changed
85
+ // Only keys present in settings.values will be updated.
59
86
  DeviceSettings settings = 1;
60
87
  }
61
88
 
@@ -11,6 +11,7 @@ import "api/nodes/disk_writer.proto";
11
11
  import "api/nodes/spike_source.proto";
12
12
  import "api/nodes/spike_binner.proto";
13
13
  import "api/nodes/application.proto";
14
+ import "api/nodes/camera.proto";
14
15
 
15
16
  enum NodeType {
16
17
  kNodeTypeUnknown = 0;
@@ -27,6 +28,7 @@ enum NodeType {
27
28
  kDiskWriter = 9;
28
29
  kSpikeBinner = 10;
29
30
  kApplication = 11;
31
+ kCamera = 12;
30
32
  }
31
33
 
32
34
  message NodeConfig {
@@ -47,6 +49,7 @@ message NodeConfig {
47
49
  SpikeSourceConfig spike_source = 12;
48
50
  SpikeBinnerConfig spike_binner = 13;
49
51
  ApplicationNodeConfig application = 14;
52
+ CameraConfig camera = 15;
50
53
  }
51
54
  }
52
55
 
@@ -63,6 +66,7 @@ message NodeStatus {
63
66
  ApplicationNodeStatus application = 7;
64
67
  OpticalStimulationStatus optical_stimulation = 8;
65
68
  DiskWriterStatus disk_writer = 10;
69
+ CameraStatus camera = 11;
66
70
  }
67
71
  }
68
72
 
@@ -0,0 +1,18 @@
1
+ syntax = "proto3";
2
+
3
+ package synapse;
4
+
5
+ import "api/datatype.proto";
6
+
7
+ message CameraConfig {
8
+ uint32 peripheral_id = 1;
9
+ uint32 width = 2;
10
+ uint32 height = 3;
11
+ PixelFormat format = 4;
12
+ uint32 frame_rate_hz = 5;
13
+ }
14
+
15
+ message CameraStatus {
16
+ uint64 frames_produced = 1;
17
+ uint64 frames_dropped = 2;
18
+ }
@@ -4,6 +4,7 @@ package synapse;
4
4
 
5
5
  message DiskWriterConfig {
6
6
  string filename = 1;
7
+ uint32 storage_device_id = 2;
7
8
  }
8
9
 
9
10
  message DiskWriterStatus {
@@ -23,9 +23,16 @@ enum DeviceState {
23
23
  kError = 4;
24
24
  }
25
25
 
26
+ message StorageDevice {
27
+ string name = 1;
28
+ uint32 storage_device_id = 2;
29
+ float total_gb = 3;
30
+ float used_gb = 4;
31
+ }
32
+
26
33
  message DeviceStorage {
27
- float total_gb = 1;
28
- float used_gb = 2;
34
+ reserved 1, 2;
35
+ repeated StorageDevice storage_devices = 3;
29
36
  }
30
37
 
31
38
  message DevicePower {
File without changes