@neurodevs/ndx-native 7.0.0 → 7.1.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,7 +1,9 @@
1
1
  import {
2
+ AddBleCharCallbacksOptions,
2
3
  BleBackendOptions,
3
4
  WriteBleCharacteristicOptions,
4
- FtdiBackendOptions,
5
+ UsbBackendOptions,
6
+ WriteUsbBackendOptions,
5
7
  Libndx,
6
8
  LibndxAdapterOptions,
7
9
  StartBleBackendOptions,
@@ -15,13 +17,15 @@ export default class FakeLibndx implements Libndx {
15
17
  public static callsToDiscoverBleUuid: DiscoverBleUuidOptions[] = []
16
18
  public static callsToCreateBleBackend: BleBackendOptions[] = []
17
19
  public static callsToStartBleBackend: StartBleBackendOptions[] = []
20
+ public static callsToAddBleCharCallbacks: AddBleCharCallbacksOptions[] = []
18
21
  public static callsToWriteBleCharacteristic: WriteBleCharacteristicOptions[] =
19
22
  []
20
23
  public static callsToStopBleBackend: BleBackendOptions[] = []
21
24
  public static callsToSetBleRssiInterval: BleRssiOptions[] = []
22
- public static callsToCreateFtdiBackend: FtdiBackendOptions[] = []
23
- public static callsToStartFtdiBackend: FtdiBackendOptions[] = []
24
- public static callsToStopFtdiBackend: FtdiBackendOptions[] = []
25
+ public static callsToCreateUsbBackend: UsbBackendOptions[] = []
26
+ public static callsToStartUsbBackend: UsbBackendOptions[] = []
27
+ public static callsToWriteUsbBackend: WriteUsbBackendOptions[] = []
28
+ public static callsToStopUsbBackend: UsbBackendOptions[] = []
25
29
 
26
30
  public static fakeResult: NativeResult = { status: 200 }
27
31
 
@@ -44,6 +48,11 @@ export default class FakeLibndx implements Libndx {
44
48
  return FakeLibndx.fakeResult
45
49
  }
46
50
 
51
+ public addBleCharCallbacks(options: AddBleCharCallbacksOptions) {
52
+ FakeLibndx.callsToAddBleCharCallbacks.push(options)
53
+ return FakeLibndx.fakeResult
54
+ }
55
+
47
56
  public writeBleCharacteristic(options: WriteBleCharacteristicOptions) {
48
57
  FakeLibndx.callsToWriteBleCharacteristic.push(options)
49
58
  return FakeLibndx.fakeResult
@@ -59,18 +68,23 @@ export default class FakeLibndx implements Libndx {
59
68
  return FakeLibndx.fakeResult
60
69
  }
61
70
 
62
- public createFtdiBackend(options: FtdiBackendOptions) {
63
- FakeLibndx.callsToCreateFtdiBackend.push(options)
71
+ public createUsbBackend(options: UsbBackendOptions) {
72
+ FakeLibndx.callsToCreateUsbBackend.push(options)
73
+ return FakeLibndx.fakeResult
74
+ }
75
+
76
+ public startUsbBackend(options: UsbBackendOptions) {
77
+ FakeLibndx.callsToStartUsbBackend.push(options)
64
78
  return FakeLibndx.fakeResult
65
79
  }
66
80
 
67
- public startFtdiBackend(options: FtdiBackendOptions) {
68
- FakeLibndx.callsToStartFtdiBackend.push(options)
81
+ public writeUsbBackend(options: WriteUsbBackendOptions) {
82
+ FakeLibndx.callsToWriteUsbBackend.push(options)
69
83
  return FakeLibndx.fakeResult
70
84
  }
71
85
 
72
- public stopFtdiBackend(options: FtdiBackendOptions) {
73
- FakeLibndx.callsToStopFtdiBackend.push(options)
86
+ public stopUsbBackend(options: UsbBackendOptions) {
87
+ FakeLibndx.callsToStopUsbBackend.push(options)
74
88
  return FakeLibndx.fakeResult
75
89
  }
76
90
 
@@ -79,11 +93,13 @@ export default class FakeLibndx implements Libndx {
79
93
  FakeLibndx.callsToDiscoverBleUuid = []
80
94
  FakeLibndx.callsToCreateBleBackend = []
81
95
  FakeLibndx.callsToStartBleBackend = []
96
+ FakeLibndx.callsToAddBleCharCallbacks = []
82
97
  FakeLibndx.callsToWriteBleCharacteristic = []
83
98
  FakeLibndx.callsToStopBleBackend = []
84
99
  FakeLibndx.callsToSetBleRssiInterval = []
85
- FakeLibndx.callsToCreateFtdiBackend = []
86
- FakeLibndx.callsToStartFtdiBackend = []
87
- FakeLibndx.callsToStopFtdiBackend = []
100
+ FakeLibndx.callsToCreateUsbBackend = []
101
+ FakeLibndx.callsToStartUsbBackend = []
102
+ FakeLibndx.callsToWriteUsbBackend = []
103
+ FakeLibndx.callsToStopUsbBackend = []
88
104
  }
89
105
  }