@science-corporation/synapse 2.2.7 → 2.2.9

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.
package/src/device.ts CHANGED
@@ -221,6 +221,31 @@ class Device {
221
221
  });
222
222
  }
223
223
 
224
+ // Settings
225
+
226
+ async updateDeviceSettings(
227
+ settings: synapse.IDeviceSettings,
228
+ options: CallOptions = {}
229
+ ): Promise<{ status: Status; response?: synapse.UpdateDeviceSettingsResponse }> {
230
+ return new Promise((resolve, reject) => {
231
+ const request: synapse.IUpdateDeviceSettingsRequest = { settings };
232
+ this.rpc.updateDeviceSettings(
233
+ request,
234
+ options,
235
+ (err: ServiceError, res: synapse.UpdateDeviceSettingsResponse) => {
236
+ if (err) {
237
+ reject(err);
238
+ } else if (!res) {
239
+ reject(new Error("No response from updateDeviceSettings"));
240
+ } else {
241
+ const status = res.status ? this._handleStatusResponse(res.status) : new Status();
242
+ resolve({ status, response: res });
243
+ }
244
+ }
245
+ );
246
+ });
247
+ }
248
+
224
249
  deployApp(
225
250
  options: CallOptions = {},
226
251
  callbacks: {
@@ -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
 
@@ -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