@science-corporation/synapse 2.0.0 → 2.2.2

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.
Files changed (127) hide show
  1. package/README.md +7 -0
  2. package/package.json +3 -2
  3. package/src/config.ts +1 -5
  4. package/src/device.ts +1 -5
  5. package/src/nodes/index.ts +0 -2
  6. package/synapse-api/README.md +1 -1
  7. package/synapse-api/api/app.proto +55 -0
  8. package/synapse-api/api/channel.proto +15 -1
  9. package/synapse-api/api/datatype.proto +97 -1
  10. package/synapse-api/api/device.proto +65 -0
  11. package/synapse-api/api/node.proto +19 -18
  12. package/synapse-api/api/nodes/application.proto +24 -0
  13. package/synapse-api/api/nodes/broadband_source.proto +1 -0
  14. package/synapse-api/api/nodes/disk_writer.proto +17 -0
  15. package/synapse-api/api/nodes/optical_stimulation.proto +29 -0
  16. package/synapse-api/api/nodes/signal_config.proto +2 -0
  17. package/synapse-api/api/performance.proto +29 -0
  18. package/synapse-api/api/query.proto +8 -0
  19. package/synapse-api/api/status.proto +6 -1
  20. package/synapse-api/api/synapse.proto +8 -31
  21. package/synapse-api/api/tap.proto +35 -0
  22. package/synapse-api/api/time.proto +53 -0
  23. package/dist/api/api.d.ts +0 -6755
  24. package/dist/api/api.d.ts.map +0 -1
  25. package/dist/api/api.js +0 -15729
  26. package/dist/api/api.js.map +0 -1
  27. package/dist/api/proto.json +0 -1144
  28. package/dist/browser.d.ts +0 -4
  29. package/dist/browser.d.ts.map +0 -1
  30. package/dist/browser.js +0 -22
  31. package/dist/browser.js.map +0 -1
  32. package/dist/config.d.ts +0 -17
  33. package/dist/config.d.ts.map +0 -1
  34. package/dist/config.js +0 -115
  35. package/dist/config.js.map +0 -1
  36. package/dist/demo.d.ts +0 -2
  37. package/dist/demo.d.ts.map +0 -1
  38. package/dist/demo.js +0 -285
  39. package/dist/demo.js.map +0 -1
  40. package/dist/device.d.ts +0 -38
  41. package/dist/device.d.ts.map +0 -1
  42. package/dist/device.js +0 -185
  43. package/dist/device.js.map +0 -1
  44. package/dist/index.d.ts +0 -7
  45. package/dist/index.d.ts.map +0 -1
  46. package/dist/index.js +0 -30
  47. package/dist/index.js.map +0 -1
  48. package/dist/node.d.ts +0 -10
  49. package/dist/node.d.ts.map +0 -1
  50. package/dist/node.js +0 -14
  51. package/dist/node.js.map +0 -1
  52. package/dist/nodes/broadband_source.d.ts +0 -11
  53. package/dist/nodes/broadband_source.d.ts.map +0 -1
  54. package/dist/nodes/broadband_source.js +0 -28
  55. package/dist/nodes/broadband_source.js.map +0 -1
  56. package/dist/nodes/disk_writer.d.ts +0 -11
  57. package/dist/nodes/disk_writer.d.ts.map +0 -1
  58. package/dist/nodes/disk_writer.js +0 -28
  59. package/dist/nodes/disk_writer.js.map +0 -1
  60. package/dist/nodes/electrical_stimulation.d.ts +0 -11
  61. package/dist/nodes/electrical_stimulation.d.ts.map +0 -1
  62. package/dist/nodes/electrical_stimulation.js +0 -28
  63. package/dist/nodes/electrical_stimulation.js.map +0 -1
  64. package/dist/nodes/index.d.ts +0 -12
  65. package/dist/nodes/index.d.ts.map +0 -1
  66. package/dist/nodes/index.js +0 -27
  67. package/dist/nodes/index.js.map +0 -1
  68. package/dist/nodes/optical_stimulation.d.ts +0 -11
  69. package/dist/nodes/optical_stimulation.d.ts.map +0 -1
  70. package/dist/nodes/optical_stimulation.js +0 -28
  71. package/dist/nodes/optical_stimulation.js.map +0 -1
  72. package/dist/nodes/spectral_filter.d.ts +0 -11
  73. package/dist/nodes/spectral_filter.d.ts.map +0 -1
  74. package/dist/nodes/spectral_filter.js +0 -28
  75. package/dist/nodes/spectral_filter.js.map +0 -1
  76. package/dist/nodes/spike_binner.d.ts +0 -11
  77. package/dist/nodes/spike_binner.d.ts.map +0 -1
  78. package/dist/nodes/spike_binner.js +0 -28
  79. package/dist/nodes/spike_binner.js.map +0 -1
  80. package/dist/nodes/spike_detector.d.ts +0 -11
  81. package/dist/nodes/spike_detector.d.ts.map +0 -1
  82. package/dist/nodes/spike_detector.js +0 -28
  83. package/dist/nodes/spike_detector.js.map +0 -1
  84. package/dist/nodes/spike_source.d.ts +0 -11
  85. package/dist/nodes/spike_source.d.ts.map +0 -1
  86. package/dist/nodes/spike_source.js +0 -28
  87. package/dist/nodes/spike_source.js.map +0 -1
  88. package/dist/nodes/stream_in.d.ts +0 -15
  89. package/dist/nodes/stream_in.d.ts.map +0 -1
  90. package/dist/nodes/stream_in.js +0 -66
  91. package/dist/nodes/stream_in.js.map +0 -1
  92. package/dist/nodes/stream_out.d.ts +0 -23
  93. package/dist/nodes/stream_out.d.ts.map +0 -1
  94. package/dist/nodes/stream_out.js +0 -105
  95. package/dist/nodes/stream_out.js.map +0 -1
  96. package/dist/utils/client.d.ts +0 -10
  97. package/dist/utils/client.d.ts.map +0 -1
  98. package/dist/utils/client.js +0 -39
  99. package/dist/utils/client.js.map +0 -1
  100. package/dist/utils/discover.d.ts +0 -10
  101. package/dist/utils/discover.d.ts.map +0 -1
  102. package/dist/utils/discover.js +0 -49
  103. package/dist/utils/discover.js.map +0 -1
  104. package/dist/utils/enum.d.ts +0 -2
  105. package/dist/utils/enum.d.ts.map +0 -1
  106. package/dist/utils/enum.js +0 -13
  107. package/dist/utils/enum.js.map +0 -1
  108. package/dist/utils/index.d.ts +0 -2
  109. package/dist/utils/index.d.ts.map +0 -1
  110. package/dist/utils/index.js +0 -6
  111. package/dist/utils/index.js.map +0 -1
  112. package/dist/utils/ip.d.ts +0 -2
  113. package/dist/utils/ip.d.ts.map +0 -1
  114. package/dist/utils/ip.js +0 -52
  115. package/dist/utils/ip.js.map +0 -1
  116. package/dist/utils/status.d.ts +0 -28
  117. package/dist/utils/status.d.ts.map +0 -1
  118. package/dist/utils/status.js +0 -54
  119. package/dist/utils/status.js.map +0 -1
  120. package/src/api/api.d.ts +0 -6755
  121. package/src/api/api.js +0 -16783
  122. package/src/api/proto.json +0 -1144
  123. package/src/demo.ts +0 -325
  124. package/src/nodes/stream_in.ts +0 -78
  125. package/src/nodes/stream_out.ts +0 -109
  126. package/synapse-api/api/nodes/stream_in.proto +0 -14
  127. package/synapse-api/api/nodes/stream_out.proto +0 -42
package/README.md CHANGED
@@ -79,3 +79,10 @@ config.connect(broadband, streamOut);
79
79
  await device.configure(config);
80
80
  await device.start();
81
81
  ```
82
+
83
+ ## Bumping Version
84
+ ```
85
+ npm version patch # increment last part of version number
86
+ npm version minor # increment middle part
87
+ npm version major # increment first part
88
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@science-corporation/synapse",
3
- "version": "2.0.0",
3
+ "version": "2.2.2",
4
4
  "description": "Client library and CLI for the Synapse API",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -63,7 +63,8 @@
63
63
  "@grpc/proto-loader": "^0.7.13",
64
64
  "google-protobuf": "^3.21.2",
65
65
  "long": "^5.3.1",
66
- "protobufjs-cli": "^1.1.2",
66
+ "protobufjs-cli": "^1.1.3",
67
+ "tmp": "^0.2.5",
67
68
  "yargs": "^17.7.2"
68
69
  }
69
70
  }
package/src/config.ts CHANGED
@@ -8,8 +8,6 @@ import SpectralFilter from "./nodes/spectral_filter";
8
8
  import SpikeBinner from "./nodes/spike_binner";
9
9
  import SpikeDetector from "./nodes/spike_detector";
10
10
  import SpikeSource from "./nodes/spike_source";
11
- import StreamIn from "./nodes/stream_in";
12
- import StreamOut from "./nodes/stream_out";
13
11
  import { Status, StatusCode } from "./utils/status";
14
12
 
15
13
  type Connection = [number, number];
@@ -21,9 +19,7 @@ const kNodeTypeObjectMap = {
21
19
  [synapse.NodeType.kOpticalStimulation]: OpticalStimulation,
22
20
  [synapse.NodeType.kSpectralFilter]: SpectralFilter,
23
21
  [synapse.NodeType.kSpikeBinner]: SpikeBinner,
24
- [synapse.NodeType.kSpikeDetector]: SpikeDetector,
25
- [synapse.NodeType.kStreamIn]: StreamIn,
26
- [synapse.NodeType.kStreamOut]: StreamOut,
22
+ [synapse.NodeType.kSpikeDetector]: SpikeDetector
27
23
  };
28
24
 
29
25
  class Config {
package/src/device.ts CHANGED
@@ -11,7 +11,6 @@ const kSynapseService = "synapse.SynapseDevice";
11
11
  class Device {
12
12
  rpc: any | null = null;
13
13
  channel: Channel | null = null;
14
- sockets: synapse.INodeSocket[] = [];
15
14
 
16
15
  constructor(public uri: string) {
17
16
  const { status, client } = create(protos, kSynapseService)(uri, credentials.createInsecure());
@@ -48,8 +47,6 @@ class Device {
48
47
  } else if (!res) {
49
48
  reject(new Status(err.code, "failed to get device info: " + err.message));
50
49
  } else {
51
- const { sockets } = res.status;
52
- this.sockets = sockets || [];
53
50
  resolve({ status: new Status(), response: res });
54
51
  }
55
52
  });
@@ -168,11 +165,10 @@ class Device {
168
165
  }
169
166
 
170
167
  _handleStatusResponse(status: synapse.IStatus): Status {
171
- const { code, message, sockets } = status;
168
+ const { code, message } = status;
172
169
  if (code !== synapse.StatusCode.kOk) {
173
170
  return fromDeviceStatus({ code, message });
174
171
  } else {
175
- this.sockets = sockets || [];
176
172
  return new Status();
177
173
  }
178
174
  }
@@ -6,7 +6,5 @@ export { default as SpectralFilter } from "./spectral_filter";
6
6
  export { default as SpikeBinner } from "./spike_binner";
7
7
  export { default as SpikeDetector } from "./spike_detector";
8
8
  export { default as SpikeSource } from "./spike_source";
9
- export { default as StreamIn } from "./stream_in";
10
- export { default as StreamOut } from "./stream_out";
11
9
 
12
10
  export type * from "../api/api";
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Synapse Protocol defines a standard interface for interacting with a wide range of possible neural interface devices.
4
4
 
5
- Synapse uses gRPC for its control plane API and UDP for streaming data. Read the full Synapse protocol docs [here](https://science.xyz/docs/d/synapse/index).
5
+ Synapse uses gRPC for its control plane API and Taps for streaming data. Read the full Synapse protocol docs [here](https://science.xyz/docs/d/synapse/index).
6
6
 
7
7
  # Python Installation
8
8
 
@@ -0,0 +1,55 @@
1
+ syntax = "proto3";
2
+
3
+ package synapse;
4
+
5
+ import "api/status.proto";
6
+ import "api/performance.proto";
7
+ import "api/device.proto";
8
+
9
+ import "google/protobuf/struct.proto";
10
+
11
+ message AppManifest {
12
+ // Your application name
13
+ string name = 1;
14
+
15
+ // JSON Schema for validating configuration
16
+ google.protobuf.Struct config_schema = 2;
17
+
18
+ // DeviceConfiguration describing the signal chain/device config
19
+ DeviceConfiguration device_config = 3;
20
+ }
21
+
22
+ message PackageMetadata {
23
+ // the package name
24
+ // e.g. synapse-example-app_0.1.0_arm64.deb
25
+ string name = 1;
26
+
27
+ // The version of the package to be uploaded
28
+ string version = 2;
29
+
30
+ // Package size, in bytes
31
+ uint64 size = 3;
32
+
33
+ // sha256 of the package, for verification
34
+ string sha256_sum = 4;
35
+ }
36
+
37
+ message AppPackageChunk {
38
+ // The first chunk is the metadata, with subsequent chunks being the file to install
39
+ oneof data {
40
+ PackageMetadata metadata = 1;
41
+ bytes file_chunk = 2;
42
+ }
43
+ }
44
+
45
+ message AppDeployResponse {
46
+ StatusCode status = 1;
47
+
48
+ // Informational messages
49
+ string message = 2;
50
+ }
51
+
52
+ message AppPerformanceSummary {
53
+ uint64 timestamp_ns = 1;
54
+ repeated FunctionProfile function_profiles = 2;
55
+ }
@@ -2,8 +2,22 @@ syntax = "proto3";
2
2
 
3
3
  package synapse;
4
4
 
5
+ enum ChannelType {
6
+ ELECTRODE = 0;
7
+ GPIO = 1;
8
+ }
9
+
5
10
  message Channel {
6
11
  uint32 id = 1;
7
12
  uint32 electrode_id = 2;
8
13
  uint32 reference_id = 3;
9
- }
14
+ ChannelType type = 4;
15
+ }
16
+
17
+ message ChannelRange {
18
+ ChannelType type = 1;
19
+ uint32 count = 2;
20
+ // Optional: for non-contiguous channels (e.g., GPIO), specifies which
21
+ // channel ids are included, in order. Empty for contiguous
22
+ repeated uint32 channel_ids = 3;
23
+ }
@@ -2,6 +2,9 @@ syntax = "proto3";
2
2
 
3
3
  package synapse;
4
4
 
5
+ import "google/protobuf/struct.proto";
6
+ import "api/channel.proto";
7
+
5
8
  enum DataType {
6
9
  kDataTypeUnknown = 0;
7
10
  kAny = 1;
@@ -10,4 +13,97 @@ enum DataType {
10
13
  kTimestamps = 4;
11
14
  kImage = 5;
12
15
  kWaveforms = 6;
13
- }
16
+ }
17
+
18
+ // A simple tensor with timestamped data
19
+ message Tensor {
20
+ // Timestamp in ns since the unix epoch
21
+ uint64 timestamp_ns = 1;
22
+
23
+ // Shape of the tensor
24
+ // The number of values should equal to the product of the dimensions
25
+ // e.g. shape = [2, 3] => 2 rows, 3 columns
26
+ repeated int32 shape = 2;
27
+
28
+ // Expected data type to parse out
29
+ enum DType {
30
+ DT_INVALID = 0;
31
+ DT_FLOAT = 1;
32
+ DT_DOUBLE = 2;
33
+ DT_UINT8 = 3;
34
+ DT_UINT16 = 4;
35
+ DT_UINT32 = 5;
36
+ DT_UINT64 = 6;
37
+ DT_INT8 = 7;
38
+ DT_INT16 = 8;
39
+ DT_INT32 = 9;
40
+ DT_INT64 = 10;
41
+ DT_BOOL = 11;
42
+ }
43
+ DType dtype = 3;
44
+
45
+ enum Endianness {
46
+ TENSOR_LITTLE_ENDIAN = 0;
47
+ TENSOR_BIG_ENDIAN = 1;
48
+ }
49
+ // We default to little because that covers most of the use cases
50
+ Endianness endianness = 4;
51
+
52
+ // Data, stored in a flat array, see shape to reconstruct
53
+ // e.g. shape: [1, 3] would be:
54
+ // [10.0, 20.0, 30.0]
55
+ bytes data = 5;
56
+ }
57
+
58
+ // A sample of all of the channels at a specific timepoint
59
+ message BroadbandFrame {
60
+ // Monotonic timestamp when this frame was recorded based on the sampling rate
61
+ // At the start of a recording, the unix steady clock is recorded
62
+ // This timestamp is being calculated by
63
+ // start_timestamp_ns + (current_seq_num - start_seq_num) * 1e9 / sample_rate
64
+ uint64 timestamp_ns = 1;
65
+
66
+ // Monotonically increasing sequence number
67
+ // useful to detect missed or dropped frames
68
+ uint64 sequence_number = 2;
69
+
70
+ // The actual frame data, indexed by channel id
71
+ repeated sint32 frame_data = 3;
72
+
73
+ // Used for reconstructing multiple frames
74
+ uint32 sample_rate_hz = 4;
75
+
76
+ // When empty, all frame_data entries are electrode channels (legacy behavior).
77
+ // Describes contiguous ranges of channel types in frame_data, in order.
78
+ // Example:
79
+ // [{type: ELECTRODE}, count: 64, {type:GPIO, count:3, channel_ids:[0, 2, 5]}]
80
+ // This means frame_data[0..63] are electrodes, frame_data[64..66] are GPIO lines 0, 2, 5
81
+ repeated ChannelRange channel_ranges = 5;
82
+
83
+ // For legacy reasons, and syncing with other parts of the system, the current
84
+ // steady clock in unix time as reported by the system
85
+ // e.g. std::chrono::steady_clock::now().time_since_epoch()
86
+ uint64 unix_timestamp_ns = 6;
87
+ }
88
+
89
+ message Timeseries {
90
+ // An identifier for the channel of data from which the timeseries was recorded.
91
+ uint32 id = 1;
92
+
93
+ // Represents a single sample of data at a specific timepoint
94
+ message Datapoint {
95
+ uint64 timestamp_ns = 1; // Timestamp of the recorded sample in ns since the unix epoch.
96
+ sint32 sample = 2; // The actual sample value.
97
+ }
98
+ repeated Datapoint datapoints = 2; // Collection of datapoints for this timeseries.
99
+ }
100
+
101
+ // A tensor with associated metadata
102
+ message AnnotatedTensor {
103
+ // The tensor type
104
+ Tensor tensor = 1;
105
+
106
+ // Generic metadata associated with the tensor
107
+ // e.g. pipeline latencies
108
+ map<string, google.protobuf.Value> metadata = 2;
109
+ }
@@ -0,0 +1,65 @@
1
+ syntax = "proto3";
2
+
3
+ package synapse;
4
+
5
+ import "api/node.proto";
6
+ import "api/status.proto";
7
+ import "api/time.proto";
8
+
9
+ message Peripheral {
10
+ enum Type {
11
+ kUnknown = 0;
12
+ kBroadbandSource = 1;
13
+ kElectricalStimulation = 2;
14
+ kOpticalStimulation = 3;
15
+ kSpikeSource = 4;
16
+ }
17
+ string name = 1;
18
+ string vendor = 2;
19
+ uint32 peripheral_id = 3;
20
+ Type type = 4;
21
+ string address = 5;
22
+ }
23
+
24
+ message DeviceInfo {
25
+ string name = 1;
26
+ string serial = 2;
27
+ uint32 synapse_version = 3;
28
+ uint32 firmware_version = 4;
29
+ Status status = 5;
30
+ repeated Peripheral peripherals = 6;
31
+ DeviceConfiguration configuration = 7;
32
+ }
33
+
34
+ message DeviceConfiguration {
35
+ repeated NodeConfig nodes = 1;
36
+ repeated NodeConnection connections = 2;
37
+ }
38
+
39
+
40
+ // Device settings that are configurable by the user
41
+ message DeviceSettings {
42
+ string name = 1;
43
+ TimeSource time_source = 2;
44
+
45
+ // If configurable, the desired FPGA clock frequency in hz
46
+ uint32 fpga_clock_freq_hz = 3;
47
+ }
48
+
49
+ message GetSettingsQuery {
50
+
51
+ }
52
+
53
+ message GetSettingsResponse {
54
+ DeviceSettings settings = 1;
55
+ }
56
+
57
+ message UpdateDeviceSettingsRequest {
58
+ // If a field isn't populated, it will not be changed
59
+ DeviceSettings settings = 1;
60
+ }
61
+
62
+ message UpdateDeviceSettingsResponse {
63
+ Status status = 1;
64
+ DeviceSettings updated_settings = 2;
65
+ }
@@ -2,22 +2,22 @@ syntax = "proto3";
2
2
 
3
3
  package synapse;
4
4
 
5
- import "api/datatype.proto";
6
5
  import "api/nodes/broadband_source.proto";
7
6
  import "api/nodes/electrical_stimulation.proto";
8
7
  import "api/nodes/optical_stimulation.proto";
9
8
  import "api/nodes/spike_detector.proto";
10
9
  import "api/nodes/spectral_filter.proto";
11
- import "api/nodes/stream_out.proto";
12
- import "api/nodes/stream_in.proto";
13
10
  import "api/nodes/disk_writer.proto";
14
11
  import "api/nodes/spike_source.proto";
15
12
  import "api/nodes/spike_binner.proto";
13
+ import "api/nodes/application.proto";
16
14
 
17
15
  enum NodeType {
18
16
  kNodeTypeUnknown = 0;
19
- kStreamIn = 1;
20
- kStreamOut = 2;
17
+ // kStreamIn = 1;
18
+ // kStreamOut = 2;
19
+ reserved 1, 2;
20
+
21
21
  kBroadbandSource = 3;
22
22
  kElectricalStimulation = 4;
23
23
  kOpticalStimulation = 5;
@@ -26,14 +26,18 @@ enum NodeType {
26
26
  kSpectralFilter = 8;
27
27
  kDiskWriter = 9;
28
28
  kSpikeBinner = 10;
29
+ kApplication = 11;
29
30
  }
30
31
 
31
32
  message NodeConfig {
32
33
  NodeType type = 1;
33
34
  uint32 id = 2;
35
+
36
+ // StreamOutConfig stream_out = 3;
37
+ // StreamInConfig stream_in = 4;
38
+ reserved 3, 4;
39
+
34
40
  oneof config {
35
- StreamOutConfig stream_out = 3;
36
- StreamInConfig stream_in = 4;
37
41
  BroadbandSourceConfig broadband_source = 5;
38
42
  ElectricalStimulationConfig electrical_stimulation = 6;
39
43
  OpticalStimulationConfig optical_stimulation = 8;
@@ -42,17 +46,23 @@ message NodeConfig {
42
46
  DiskWriterConfig disk_writer = 11;
43
47
  SpikeSourceConfig spike_source = 12;
44
48
  SpikeBinnerConfig spike_binner = 13;
49
+ ApplicationNodeConfig application = 14;
45
50
  }
46
51
  }
47
52
 
48
53
  message NodeStatus {
49
54
  NodeType type = 1;
50
55
  uint32 id = 2;
56
+
57
+ // StreamOutStatus stream_out = 3;
58
+ // StreamInStatus stream_in = 5;
59
+ reserved 3, 5;
51
60
  oneof status {
52
- StreamOutStatus stream_out = 3;
53
61
  BroadbandSourceStatus broadband_source = 4;
54
- StreamInStatus stream_in = 5;
55
62
  ElectricalStimulationStatus electrical_stimulation = 6;
63
+ ApplicationNodeStatus application = 7;
64
+ OpticalStimulationStatus optical_stimulation = 8;
65
+ DiskWriterStatus disk_writer = 10;
56
66
  }
57
67
  }
58
68
 
@@ -60,12 +70,3 @@ message NodeConnection {
60
70
  uint32 src_node_id = 1;
61
71
  uint32 dst_node_id = 2;
62
72
  }
63
-
64
- message NodeSocket {
65
- uint32 node_id = 1;
66
- string bind = 2;
67
- DataType data_type = 3;
68
- NodeType type = 4;
69
- string label = 5;
70
- repeated uint32 shape = 6;
71
- }
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package synapse;
4
+
5
+ import "google/protobuf/struct.proto";
6
+
7
+ message ApplicationNodeConfig {
8
+ // Your application name, it should match what is deployed
9
+ string name = 1;
10
+
11
+ // Application specific configuration, will be loaded by
12
+ // the custom application during runtime
13
+ map<string, google.protobuf.Value> parameters = 2;
14
+ }
15
+
16
+ message ApplicationNodeStatus {
17
+ string name = 1;
18
+
19
+ // Is the application started and running?
20
+ bool running = 2;
21
+
22
+ // If the application failed to start, what were the logs
23
+ string error_logs = 3;
24
+ }
@@ -18,3 +18,4 @@ message BroadbandSourceConfig {
18
18
  message BroadbandSourceStatus {
19
19
  SignalStatus status = 1;
20
20
  }
21
+
@@ -5,3 +5,20 @@ package synapse;
5
5
  message DiskWriterConfig {
6
6
  string filename = 1;
7
7
  }
8
+
9
+ message DiskWriterStatus {
10
+ // The output path of the file on the path of the sftp directory
11
+ string output_path = 1;
12
+
13
+ // How many bytes has been written for this file?
14
+ uint64 bytes_written = 2;
15
+
16
+ // Are we currently writing or are we stopped?
17
+ bool is_writing = 3;
18
+
19
+ // How many bytes are available for us to use
20
+ uint64 available_disk_space_bytes = 4;
21
+
22
+ // Current write performance for this node, megabits/sec
23
+ float current_bitrate_mbps = 5;
24
+ }
@@ -8,4 +8,33 @@ message OpticalStimulationConfig {
8
8
  uint32 bit_width = 3;
9
9
  uint32 frame_rate = 4;
10
10
  float gain = 5;
11
+
12
+ // Instruct the FPGA to send out a 1xN vector
13
+ // where N is the number of LEDs with each Axon frame
14
+ bool send_receipts = 6;
15
+ }
16
+
17
+ // Core frame type for LED array optical stimulation
18
+ message OpticalStimFrame {
19
+ uint64 frame_id = 1;
20
+ uint64 sequence_number = 2;
21
+ uint64 timestamp_ns = 3;
22
+
23
+ // Frame dimensions
24
+ uint32 rows = 4;
25
+ uint32 columns = 5;
26
+
27
+ // Normalized pixel intensities (0.0 - 1.0)
28
+ // Row major ordering
29
+ // 0.0 is completely off, 1.0 is completely on
30
+ repeated float intensity = 6;
31
+
32
+ // For passive displays, this represents the row on time
33
+ // For active, this represents frame on time
34
+ uint64 duration_us = 7;
35
+ }
36
+
37
+ message OpticalStimulationStatus {
38
+ // How many frames have we written?
39
+ uint64 frames_written = 1;
11
40
  }
@@ -6,6 +6,8 @@ package synapse;
6
6
 
7
7
  message ElectrodeConfig {
8
8
  repeated Channel channels = 1;
9
+
10
+ // Analog filter settings for electrode channels
9
11
  float low_cutoff_hz = 2;
10
12
  float high_cutoff_hz = 3;
11
13
  }
@@ -0,0 +1,29 @@
1
+ syntax = "proto3";
2
+
3
+ package synapse;
4
+
5
+ // Statistics about the performance of a function call or block of computation
6
+ message FunctionProfile {
7
+ string name = 1;
8
+
9
+ // How often has this been called
10
+ uint64 call_count = 2;
11
+
12
+ // What was the minimal time it took for this function to execute
13
+ uint64 min_duration_ns = 3;
14
+
15
+ // Maximum execution for this function
16
+ uint64 max_duration_ns = 4;
17
+
18
+ // Average (mean) of this function over all samples
19
+ uint64 average_duration_ns = 5;
20
+
21
+ // Median execution time over all samples
22
+ uint64 median_duration_ns = 6;
23
+
24
+ // p99 duration
25
+ uint64 p99_duration_ns = 7;
26
+
27
+ // The last measurement duration
28
+ uint64 latest_duration_ns = 8;
29
+ }
@@ -4,6 +4,8 @@ package synapse;
4
4
 
5
5
  import "api/channel.proto";
6
6
  import "api/status.proto";
7
+ import "api/tap.proto";
8
+ import "api/device.proto";
7
9
 
8
10
  message SampleQuery {
9
11
  repeated Channel channels = 1;
@@ -46,12 +48,16 @@ message QueryRequest {
46
48
  kImpedance = 1;
47
49
  kSample = 2;
48
50
  kSelfTest = 3;
51
+ kListTaps = 4;
52
+ kGetSettings = 5;
49
53
  }
50
54
  QueryType query_type = 1;
51
55
  oneof query {
52
56
  ImpedanceQuery impedance_query = 2;
53
57
  SampleQuery sample_query = 3;
54
58
  SelfTestQuery self_test_query = 4;
59
+ ListTapsQuery list_taps_query = 5;
60
+ GetSettingsQuery get_settings_query = 6;
55
61
  }
56
62
  }
57
63
 
@@ -67,6 +73,8 @@ message QueryResponse {
67
73
  oneof response {
68
74
  ImpedanceResponse impedance_response = 3;
69
75
  SelfTestResponse self_test_response = 4;
76
+ ListTapsResponse list_taps_response = 5;
77
+ GetSettingsResponse get_settings_response = 6;
70
78
  }
71
79
  }
72
80
 
@@ -41,8 +41,13 @@ message Status {
41
41
  string message = 1;
42
42
  StatusCode code = 2;
43
43
  DeviceState state = 3;
44
- repeated NodeSocket sockets = 4;
44
+ // repeated NodeSocket sockets = 4;
45
+ reserved 4;
45
46
  DevicePower power = 5;
46
47
  DeviceStorage storage = 6;
47
48
  SignalChainStatus signal_chain = 7;
49
+
50
+ // If the device supports a time sync server (see time.proto)
51
+ // Then the UDP echo server will be available at this port
52
+ uint32 time_sync_port = 8; // Port number (0-65535) for the UDP time sync server
48
53
  }
@@ -3,41 +3,13 @@ syntax = "proto3";
3
3
  package synapse;
4
4
 
5
5
  import "google/protobuf/empty.proto";
6
- import "api/node.proto";
6
+
7
7
  import "api/query.proto";
8
8
  import "api/status.proto";
9
9
  import "api/files.proto";
10
10
  import "api/logging.proto";
11
-
12
- message Peripheral {
13
- enum Type {
14
- kUnknown = 0;
15
- kBroadbandSource = 1;
16
- kElectricalStimulation = 2;
17
- kOpticalStimulation = 3;
18
- kSpikeSource = 4;
19
- }
20
- string name = 1;
21
- string vendor = 2;
22
- uint32 peripheral_id = 3;
23
- Type type = 4;
24
- string address = 5;
25
- }
26
-
27
- message DeviceInfo {
28
- string name = 1;
29
- string serial = 2;
30
- uint32 synapse_version = 3;
31
- uint32 firmware_version = 4;
32
- Status status = 5;
33
- repeated Peripheral peripherals = 6;
34
- DeviceConfiguration configuration = 7;
35
- }
36
-
37
- message DeviceConfiguration {
38
- repeated NodeConfig nodes = 1;
39
- repeated NodeConnection connections = 2;
40
- }
11
+ import "api/app.proto";
12
+ import "api/device.proto";
41
13
 
42
14
  service SynapseDevice {
43
15
  rpc Info(google.protobuf.Empty) returns (DeviceInfo) {}
@@ -47,10 +19,15 @@ service SynapseDevice {
47
19
  rpc Query(QueryRequest) returns (QueryResponse) {}
48
20
  rpc StreamQuery(StreamQueryRequest) returns (stream StreamQueryResponse) {}
49
21
 
22
+ rpc DeployApp(stream AppPackageChunk) returns (stream AppDeployResponse) {}
23
+
50
24
  rpc ListFiles(google.protobuf.Empty) returns (ListFilesResponse) {}
51
25
  rpc WriteFile(WriteFileRequest) returns (WriteFileResponse) {}
52
26
  rpc ReadFile(ReadFileRequest) returns (stream ReadFileResponse) {}
53
27
  rpc DeleteFile(DeleteFileRequest) returns (DeleteFileResponse) {}
28
+
54
29
  rpc GetLogs(LogQueryRequest) returns (LogQueryResponse) {}
55
30
  rpc TailLogs(TailLogsRequest) returns (stream LogEntry) {}
31
+
32
+ rpc UpdateDeviceSettings(UpdateDeviceSettingsRequest) returns (UpdateDeviceSettingsResponse) {}
56
33
  }