buttplug 3.2.2 → 4.0.1
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/.eslintrc.js +25 -25
- package/.jscsrc +2 -2
- package/.jshintrc +5 -5
- package/.prettierrc.json +3 -3
- package/.yarnrc.yml +5 -5
- package/CHANGELOG.md +591 -577
- package/LICENSE +27 -27
- package/README.md +105 -97
- package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.js +6 -9
- package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.js.map +1 -1
- package/dist/main/src/client/{Client.d.ts → ButtplugClient.d.ts} +3 -4
- package/dist/main/src/client/ButtplugClient.js +232 -0
- package/dist/main/src/client/ButtplugClient.js.map +1 -0
- package/dist/main/src/client/ButtplugClientConnectorException.js +17 -7
- package/dist/main/src/client/ButtplugClientConnectorException.js.map +1 -1
- package/dist/main/src/client/ButtplugClientDevice.d.ts +13 -28
- package/dist/main/src/client/ButtplugClientDevice.js +105 -247
- package/dist/main/src/client/ButtplugClientDevice.js.map +1 -1
- package/dist/main/src/client/ButtplugClientDeviceCommand.d.ts +42 -0
- package/dist/main/src/client/ButtplugClientDeviceCommand.js +105 -0
- package/dist/main/src/client/ButtplugClientDeviceCommand.js.map +1 -0
- package/dist/main/src/client/ButtplugClientDeviceFeature.d.ts +18 -0
- package/dist/main/src/client/ButtplugClientDeviceFeature.js +166 -0
- package/dist/main/src/client/ButtplugClientDeviceFeature.js.map +1 -0
- package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.d.ts +1 -8
- package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.js +1 -4
- package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.js.map +1 -1
- package/dist/main/src/core/Exceptions.js +27 -9
- package/dist/main/src/core/Exceptions.js.map +1 -1
- package/dist/main/src/core/Logging.js +12 -6
- package/dist/main/src/core/Logging.js.map +1 -1
- package/dist/main/src/core/Messages.d.ts +119 -230
- package/dist/main/src/core/Messages.js +50 -404
- package/dist/main/src/core/Messages.js.map +1 -1
- package/dist/main/src/index.d.ts +2 -2
- package/dist/main/src/index.js +4 -2
- package/dist/main/src/index.js.map +1 -1
- package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.js +40 -52
- package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.js.map +1 -1
- package/dist/main/src/utils/ButtplugMessageSorter.js +27 -15
- package/dist/main/src/utils/ButtplugMessageSorter.js.map +1 -1
- package/dist/main/src/utils/Utils.js +1 -2
- package/dist/main/src/utils/Utils.js.map +1 -1
- package/dist/web/buttplug.js +1 -38
- package/dist/web/buttplug.mjs +595 -1984
- package/dist/web/client/ButtplugBrowserWebsocketClientConnector.d.ts +0 -7
- package/dist/web/client/{Client.d.ts → ButtplugClient.d.ts} +3 -11
- package/dist/web/client/ButtplugClientConnectorException.d.ts +0 -7
- package/dist/web/client/ButtplugClientDevice.d.ts +14 -29
- package/dist/web/client/ButtplugClientDeviceCommand.d.ts +42 -0
- package/dist/web/client/ButtplugClientDeviceFeature.d.ts +18 -0
- package/dist/web/client/ButtplugNodeWebsocketClientConnector.d.ts +1 -15
- package/dist/web/client/IButtplugClientConnector.d.ts +0 -7
- package/dist/web/core/Exceptions.d.ts +1 -1
- package/dist/web/core/Logging.d.ts +0 -7
- package/dist/web/core/Messages.d.ts +119 -229
- package/dist/web/index.d.ts +2 -2
- package/dist/web/utils/ButtplugBrowserWebsocketConnector.d.ts +0 -7
- package/examples/node/SYNC_MANIFEST.md +105 -0
- package/examples/node/application-example.ts +213 -0
- package/examples/node/async-example.ts +124 -0
- package/examples/node/connection-example.ts +76 -0
- package/examples/node/device-control-example.ts +131 -0
- package/examples/node/device-enumeration-example.ts +86 -0
- package/examples/node/device-info-example.ts +131 -0
- package/examples/node/errors-example.ts +166 -0
- package/examples/node/package-lock.json +281 -0
- package/examples/node/package.json +25 -0
- package/examples/node/remote-connector-example.ts +84 -0
- package/examples/node/tsconfig.json +14 -0
- package/examples/web/application-example.js +197 -0
- package/examples/web/async-example.js +90 -0
- package/examples/web/device-control-example.js +87 -0
- package/examples/web/device-enumeration-example.js +49 -0
- package/examples/web/device-info-example.js +100 -0
- package/examples/web/errors-example.js +110 -0
- package/examples/web/index.html +55 -0
- package/examples/web/logging.js +42 -0
- package/examples/web/ping-timeout-example.js +59 -0
- package/examples/web/remote-connector-example.js +68 -0
- package/node-test.js +24 -0
- package/node-test.ts +23 -5
- package/package.json +85 -87
- package/src/client/ButtplugBrowserWebsocketClientConnector.ts +25 -25
- package/src/client/ButtplugClient.ts +242 -0
- package/src/client/ButtplugClientConnectorException.ts +16 -16
- package/src/client/ButtplugClientDevice.ts +178 -401
- package/src/client/ButtplugClientDeviceCommand.ts +112 -0
- package/src/client/ButtplugClientDeviceFeature.ts +138 -0
- package/src/client/ButtplugNodeWebsocketClientConnector.ts +17 -17
- package/src/client/IButtplugClientConnector.ts +18 -18
- package/src/core/Exceptions.ts +107 -101
- package/src/core/Logging.ts +197 -197
- package/src/core/Messages.ts +205 -480
- package/src/core/index.d.ts +4 -4
- package/src/index.ts +21 -19
- package/src/utils/ButtplugBrowserWebsocketConnector.ts +89 -89
- package/src/utils/ButtplugMessageSorter.ts +66 -65
- package/src/utils/Utils.ts +3 -3
- package/tsconfig.json +22 -22
- package/tsfmt.json +14 -14
- package/tslint.json +27 -27
- package/typedocconfig.js +6 -6
- package/vite.config.ts +26 -26
- package/dist/main/src/client/Client.js +0 -242
- package/dist/main/src/client/Client.js.map +0 -1
- package/dist/main/src/core/MessageUtils.d.ts +0 -10
- package/dist/main/src/core/MessageUtils.js +0 -65
- package/dist/main/src/core/MessageUtils.js.map +0 -1
- package/dist/web/core/MessageUtils.d.ts +0 -10
- package/doc/.nojekyll +0 -1
- package/doc/assets/highlight.css +0 -22
- package/doc/assets/main.js +0 -58
- package/doc/assets/search.js +0 -1
- package/doc/assets/style.css +0 -1280
- package/doc/classes/ButtplugBrowserWebsocketClientConnector.html +0 -234
- package/doc/classes/ButtplugClient.html +0 -331
- package/doc/classes/ButtplugClientConnectorException.html +0 -216
- package/doc/classes/ButtplugClientDevice.html +0 -489
- package/doc/classes/ButtplugDeviceError.html +0 -218
- package/doc/classes/ButtplugDeviceMessage.html +0 -165
- package/doc/classes/ButtplugError.html +0 -220
- package/doc/classes/ButtplugInitError.html +0 -218
- package/doc/classes/ButtplugLogger.html +0 -288
- package/doc/classes/ButtplugMessage.html +0 -147
- package/doc/classes/ButtplugMessageError.html +0 -218
- package/doc/classes/ButtplugMessageSorter.html +0 -128
- package/doc/classes/ButtplugNodeWebsocketClientConnector.html +0 -239
- package/doc/classes/ButtplugPingError.html +0 -218
- package/doc/classes/ButtplugSystemMessage.html +0 -150
- package/doc/classes/ButtplugUnknownError.html +0 -218
- package/doc/classes/DeviceAdded.html +0 -186
- package/doc/classes/DeviceInfo.html +0 -114
- package/doc/classes/DeviceList.html +0 -160
- package/doc/classes/DeviceRemoved.html +0 -158
- package/doc/classes/Error.html +0 -179
- package/doc/classes/GenericDeviceMessageAttributes.html +0 -107
- package/doc/classes/GenericMessageSubcommand.html +0 -90
- package/doc/classes/LinearCmd.html +0 -187
- package/doc/classes/LogMessage.html +0 -134
- package/doc/classes/MessageAttributes.html +0 -160
- package/doc/classes/Ok.html +0 -151
- package/doc/classes/Ping.html +0 -151
- package/doc/classes/RawDeviceMessageAttributes.html +0 -86
- package/doc/classes/RawReadCmd.html +0 -188
- package/doc/classes/RawReading.html +0 -179
- package/doc/classes/RawSubscribeCmd.html +0 -170
- package/doc/classes/RawUnsubscribeCmd.html +0 -170
- package/doc/classes/RawWriteCmd.html +0 -188
- package/doc/classes/RequestDeviceList.html +0 -151
- package/doc/classes/RequestServerInfo.html +0 -169
- package/doc/classes/RotateCmd.html +0 -187
- package/doc/classes/RotateSubcommand.html +0 -108
- package/doc/classes/ScalarCmd.html +0 -170
- package/doc/classes/ScalarSubcommand.html +0 -108
- package/doc/classes/ScanningFinished.html +0 -146
- package/doc/classes/SensorDeviceMessageAttributes.html +0 -107
- package/doc/classes/SensorReadCmd.html +0 -179
- package/doc/classes/SensorReading.html +0 -188
- package/doc/classes/ServerInfo.html +0 -178
- package/doc/classes/StartScanning.html +0 -151
- package/doc/classes/StopAllDevices.html +0 -151
- package/doc/classes/StopDeviceCmd.html +0 -161
- package/doc/classes/StopScanning.html +0 -151
- package/doc/classes/VectorSubcommand.html +0 -108
- package/doc/enums/ActuatorType.html +0 -104
- package/doc/enums/ButtplugLogLevel.html +0 -97
- package/doc/enums/ErrorClass.html +0 -90
- package/doc/enums/SensorType.html +0 -90
- package/doc/functions/FromJSON.html +0 -113
- package/doc/index.html +0 -184
- package/doc/interfaces/IButtplugClientConnector.html +0 -137
- package/doc/modules.html +0 -176
- package/doc/variables/DEFAULT_MESSAGE_ID.html +0 -104
- package/doc/variables/MAX_ID.html +0 -104
- package/doc/variables/MESSAGE_SPEC_VERSION.html +0 -104
- package/doc/variables/SYSTEM_MESSAGE_ID.html +0 -104
- package/src/client/Client.ts +0 -276
- package/src/core/MessageUtils.ts +0 -48
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
+
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
+
* project root for full license information.
|
|
5
|
+
*
|
|
6
|
+
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
import { ButtplugLogger } from '../core/Logging';
|
|
12
|
+
import { EventEmitter } from 'eventemitter3';
|
|
13
|
+
import { ButtplugClientDevice } from './ButtplugClientDevice';
|
|
14
|
+
import { IButtplugClientConnector } from './IButtplugClientConnector';
|
|
15
|
+
import { ButtplugMessageSorter } from '../utils/ButtplugMessageSorter';
|
|
16
|
+
import * as Messages from '../core/Messages';
|
|
17
|
+
import {
|
|
18
|
+
ButtplugError,
|
|
19
|
+
ButtplugInitError,
|
|
20
|
+
ButtplugMessageError,
|
|
21
|
+
} from '../core/Exceptions';
|
|
22
|
+
import { ButtplugClientConnectorException } from './ButtplugClientConnectorException';
|
|
23
|
+
|
|
24
|
+
export class ButtplugClient extends EventEmitter {
|
|
25
|
+
protected _pingTimer: NodeJS.Timeout | null = null;
|
|
26
|
+
protected _connector: IButtplugClientConnector | null = null;
|
|
27
|
+
protected _devices: Map<number, ButtplugClientDevice> = new Map();
|
|
28
|
+
protected _clientName: string;
|
|
29
|
+
protected _logger = ButtplugLogger.Logger;
|
|
30
|
+
protected _isScanning = false;
|
|
31
|
+
private _sorter: ButtplugMessageSorter = new ButtplugMessageSorter(true);
|
|
32
|
+
|
|
33
|
+
constructor(clientName = 'Generic Buttplug Client') {
|
|
34
|
+
super();
|
|
35
|
+
this._clientName = clientName;
|
|
36
|
+
this._logger.Debug(`ButtplugClient: Client ${clientName} created.`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public get connected(): boolean {
|
|
40
|
+
return this._connector !== null && this._connector.Connected;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public get devices(): Map<number, ButtplugClientDevice> {
|
|
44
|
+
// While this function doesn't actually send a message, if we don't have a
|
|
45
|
+
// connector, we shouldn't have devices.
|
|
46
|
+
this.checkConnector();
|
|
47
|
+
return this._devices;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public get isScanning(): boolean {
|
|
51
|
+
return this._isScanning;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public connect = async (connector: IButtplugClientConnector) => {
|
|
55
|
+
this._logger.Info(
|
|
56
|
+
`ButtplugClient: Connecting using ${connector.constructor.name}`
|
|
57
|
+
);
|
|
58
|
+
await connector.connect();
|
|
59
|
+
this._connector = connector;
|
|
60
|
+
this._connector.addListener('message', this.parseMessages);
|
|
61
|
+
this._connector.addListener('disconnect', this.disconnectHandler);
|
|
62
|
+
await this.initializeConnection();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
public disconnect = async () => {
|
|
66
|
+
this._logger.Debug('ButtplugClient: Disconnect called');
|
|
67
|
+
this._devices.clear();
|
|
68
|
+
this.checkConnector();
|
|
69
|
+
await this.shutdownConnection();
|
|
70
|
+
await this._connector!.disconnect();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
public startScanning = async () => {
|
|
74
|
+
this._logger.Debug('ButtplugClient: StartScanning called');
|
|
75
|
+
this._isScanning = true;
|
|
76
|
+
await this.sendMsgExpectOk({ StartScanning: { Id: 1 } });
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
public stopScanning = async () => {
|
|
80
|
+
this._logger.Debug('ButtplugClient: StopScanning called');
|
|
81
|
+
this._isScanning = false;
|
|
82
|
+
await this.sendMsgExpectOk({ StopScanning: { Id: 1 } });
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
public stopAllDevices = async () => {
|
|
86
|
+
this._logger.Debug('ButtplugClient: StopCmd (all devices)');
|
|
87
|
+
await this.sendMsgExpectOk({ StopCmd: { Id: 1, DeviceIndex: undefined, FeatureIndex: undefined, Inputs: true, Outputs: true } });
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
protected disconnectHandler = () => {
|
|
91
|
+
this._logger.Info('ButtplugClient: Disconnect event receieved.');
|
|
92
|
+
this.emit('disconnect');
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
protected parseMessages = (msgs: Messages.ButtplugMessage[]) => {
|
|
96
|
+
const leftoverMsgs = this._sorter.ParseIncomingMessages(msgs);
|
|
97
|
+
for (const x of leftoverMsgs) {
|
|
98
|
+
if (x.DeviceList !== undefined) {
|
|
99
|
+
this.parseDeviceList(x.DeviceList!);
|
|
100
|
+
break;
|
|
101
|
+
} else if (x.ScanningFinished !== undefined) {
|
|
102
|
+
this._isScanning = false;
|
|
103
|
+
this.emit('scanningfinished', x);
|
|
104
|
+
} else if (x.InputReading !== undefined) {
|
|
105
|
+
// TODO this should be emitted from the device or feature, not the client
|
|
106
|
+
this.emit('inputreading', x);
|
|
107
|
+
} else {
|
|
108
|
+
console.log(`Unhandled message: ${x}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
protected initializeConnection = async (): Promise<boolean> => {
|
|
114
|
+
this.checkConnector();
|
|
115
|
+
const msg = await this.sendMessage(
|
|
116
|
+
{
|
|
117
|
+
RequestServerInfo: {
|
|
118
|
+
ClientName: this._clientName,
|
|
119
|
+
Id: 1,
|
|
120
|
+
ProtocolVersionMajor: Messages.MESSAGE_SPEC_VERSION_MAJOR,
|
|
121
|
+
ProtocolVersionMinor: Messages.MESSAGE_SPEC_VERSION_MINOR
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
if (msg.ServerInfo !== undefined) {
|
|
126
|
+
const serverinfo = msg as Messages.ServerInfo;
|
|
127
|
+
this._logger.Info(
|
|
128
|
+
`ButtplugClient: Connected to Server ${serverinfo.ServerName}`
|
|
129
|
+
);
|
|
130
|
+
// TODO: maybe store server name, do something with message template version?
|
|
131
|
+
const ping = serverinfo.MaxPingTime;
|
|
132
|
+
// If the server version is lower than the client version, the server will disconnect here.
|
|
133
|
+
if (ping > 0) {
|
|
134
|
+
/*
|
|
135
|
+
this._pingTimer = setInterval(async () => {
|
|
136
|
+
// If we've disconnected, stop trying to ping the server.
|
|
137
|
+
if (!this.Connected) {
|
|
138
|
+
await this.ShutdownConnection();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
await this.SendMessage(new Messages.Ping());
|
|
142
|
+
} , Math.round(ping / 2));
|
|
143
|
+
*/
|
|
144
|
+
}
|
|
145
|
+
await this.requestDeviceList();
|
|
146
|
+
return true;
|
|
147
|
+
} else if (msg.Error !== undefined) {
|
|
148
|
+
// Disconnect and throw an exception with the error message we got back.
|
|
149
|
+
// This will usually only error out if we have a version mismatch that the
|
|
150
|
+
// server has detected.
|
|
151
|
+
await this._connector!.disconnect();
|
|
152
|
+
const err = msg.Error as Messages.Error;
|
|
153
|
+
throw ButtplugError.LogAndError(
|
|
154
|
+
ButtplugInitError,
|
|
155
|
+
this._logger,
|
|
156
|
+
`Cannot connect to server. ${err.ErrorMessage}`
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
private parseDeviceList = (list: Messages.DeviceList) => {
|
|
163
|
+
for (let [_, d] of Object.entries(list.Devices)) {
|
|
164
|
+
if (!this._devices.has(d.DeviceIndex)) {
|
|
165
|
+
const device = ButtplugClientDevice.fromMsg(
|
|
166
|
+
d,
|
|
167
|
+
this.sendMessageClosure
|
|
168
|
+
);
|
|
169
|
+
this._logger.Debug(`ButtplugClient: Adding Device: ${device}`);
|
|
170
|
+
this._devices.set(d.DeviceIndex, device);
|
|
171
|
+
this.emit('deviceadded', device);
|
|
172
|
+
} else {
|
|
173
|
+
this._logger.Debug(`ButtplugClient: Device already added: ${d}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
for (let [index, device] of this._devices.entries()) {
|
|
177
|
+
if (!list.Devices.hasOwnProperty(index.toString())) {
|
|
178
|
+
this._devices.delete(index);
|
|
179
|
+
this.emit('deviceremoved', device);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
protected requestDeviceList = async () => {
|
|
185
|
+
this.checkConnector();
|
|
186
|
+
this._logger.Debug('ButtplugClient: ReceiveDeviceList called');
|
|
187
|
+
const response = (await this.sendMessage(
|
|
188
|
+
{
|
|
189
|
+
RequestDeviceList: { Id: 1 }
|
|
190
|
+
}
|
|
191
|
+
));
|
|
192
|
+
this.parseDeviceList(response.DeviceList!);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
protected shutdownConnection = async () => {
|
|
196
|
+
await this.stopAllDevices();
|
|
197
|
+
if (this._pingTimer !== null) {
|
|
198
|
+
clearInterval(this._pingTimer);
|
|
199
|
+
this._pingTimer = null;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
protected async sendMessage(
|
|
204
|
+
msg: Messages.ButtplugMessage
|
|
205
|
+
): Promise<Messages.ButtplugMessage> {
|
|
206
|
+
this.checkConnector();
|
|
207
|
+
const p = this._sorter.PrepareOutgoingMessage(msg);
|
|
208
|
+
await this._connector!.send(msg);
|
|
209
|
+
return await p;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
protected checkConnector() {
|
|
213
|
+
if (!this.connected) {
|
|
214
|
+
throw new ButtplugClientConnectorException(
|
|
215
|
+
'ButtplugClient not connected'
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
protected sendMsgExpectOk = async (
|
|
221
|
+
msg: Messages.ButtplugMessage
|
|
222
|
+
): Promise<void> => {
|
|
223
|
+
const response = await this.sendMessage(msg);
|
|
224
|
+
if (response.Ok !== undefined) {
|
|
225
|
+
return;
|
|
226
|
+
} else if (response.Error !== undefined) {
|
|
227
|
+
throw ButtplugError.FromError(response as Messages.Error);
|
|
228
|
+
} else {
|
|
229
|
+
throw ButtplugError.LogAndError(
|
|
230
|
+
ButtplugMessageError,
|
|
231
|
+
this._logger,
|
|
232
|
+
`Message ${response} not handled by SendMsgExpectOk`
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
protected sendMessageClosure = async (
|
|
238
|
+
msg: Messages.ButtplugMessage
|
|
239
|
+
): Promise<Messages.ButtplugMessage> => {
|
|
240
|
+
return await this.sendMessage(msg);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
-
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
-
* project root for full license information.
|
|
5
|
-
*
|
|
6
|
-
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { ButtplugError } from '../core/Exceptions';
|
|
10
|
-
import * as Messages from '../core/Messages';
|
|
11
|
-
|
|
12
|
-
export class ButtplugClientConnectorException extends ButtplugError {
|
|
13
|
-
public constructor(message: string) {
|
|
14
|
-
super(message, Messages.ErrorClass.ERROR_UNKNOWN);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
+
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
+
* project root for full license information.
|
|
5
|
+
*
|
|
6
|
+
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { ButtplugError } from '../core/Exceptions';
|
|
10
|
+
import * as Messages from '../core/Messages';
|
|
11
|
+
|
|
12
|
+
export class ButtplugClientConnectorException extends ButtplugError {
|
|
13
|
+
public constructor(message: string) {
|
|
14
|
+
super(message, Messages.ErrorClass.ERROR_UNKNOWN);
|
|
15
|
+
}
|
|
16
|
+
}
|