alphatheta-connect 0.25.3 → 0.26.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.
- package/lib/cli.js +22 -13
- package/lib/cli.js.map +1 -1
- package/lib/index.js +22 -13
- package/lib/index.js.map +1 -1
- package/lib/remotedb/fields.d.ts +6 -6
- package/lib/virtualcdj/stagehand.d.ts +13 -3
- package/package.json +3 -1
package/lib/remotedb/fields.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare const UInt8: {
|
|
|
65
65
|
data: Buffer;
|
|
66
66
|
};
|
|
67
67
|
type: NumberFieldType;
|
|
68
|
-
bytesToRead: 1 |
|
|
68
|
+
bytesToRead: 1 | 2 | 4;
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* Field representing a UInt16
|
|
@@ -81,7 +81,7 @@ export declare const UInt16: {
|
|
|
81
81
|
data: Buffer;
|
|
82
82
|
};
|
|
83
83
|
type: NumberFieldType;
|
|
84
|
-
bytesToRead: 1 |
|
|
84
|
+
bytesToRead: 1 | 2 | 4;
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
87
|
* Field representing a UInt32
|
|
@@ -97,7 +97,7 @@ export declare const UInt32: {
|
|
|
97
97
|
data: Buffer;
|
|
98
98
|
};
|
|
99
99
|
type: NumberFieldType;
|
|
100
|
-
bytesToRead: 1 |
|
|
100
|
+
bytesToRead: 1 | 2 | 4;
|
|
101
101
|
};
|
|
102
102
|
/**
|
|
103
103
|
* Field representing a null-terminated big endian UTF-16 string
|
|
@@ -131,7 +131,7 @@ declare const fieldMap: {
|
|
|
131
131
|
data: Buffer;
|
|
132
132
|
};
|
|
133
133
|
type: NumberFieldType;
|
|
134
|
-
bytesToRead: 1 |
|
|
134
|
+
bytesToRead: 1 | 2 | 4;
|
|
135
135
|
};
|
|
136
136
|
readonly 16: {
|
|
137
137
|
new (value: number | Buffer): {
|
|
@@ -144,7 +144,7 @@ declare const fieldMap: {
|
|
|
144
144
|
data: Buffer;
|
|
145
145
|
};
|
|
146
146
|
type: NumberFieldType;
|
|
147
|
-
bytesToRead: 1 |
|
|
147
|
+
bytesToRead: 1 | 2 | 4;
|
|
148
148
|
};
|
|
149
149
|
readonly 17: {
|
|
150
150
|
new (value: number | Buffer): {
|
|
@@ -157,7 +157,7 @@ declare const fieldMap: {
|
|
|
157
157
|
data: Buffer;
|
|
158
158
|
};
|
|
159
159
|
type: NumberFieldType;
|
|
160
|
-
bytesToRead: 1 |
|
|
160
|
+
bytesToRead: 1 | 2 | 4;
|
|
161
161
|
};
|
|
162
162
|
readonly 20: typeof Binary;
|
|
163
163
|
readonly 38: typeof String;
|
|
@@ -11,9 +11,19 @@ export declare enum StagehandStartupStage {
|
|
|
11
11
|
KeepAlive = 6
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* The protocol-layer MAC a Stagehand device embeds in its 0x02 claim and 0x06
|
|
15
|
+
* keep-alive: the AlphaTheta OUI (c8:3d:fc) followed by the low three bytes of
|
|
16
|
+
* the interface's own MAC.
|
|
17
|
+
*
|
|
18
|
+
* This must stay stable for the life of the host. A CDJ-3000 records a peer by
|
|
19
|
+
* the identity in its claim, and once it holds a record for our IP it ignores
|
|
20
|
+
* later claims from the same IP that carry a different MAC or device number:
|
|
21
|
+
* the new peer never receives the unicast status/position stream. Observed on
|
|
22
|
+
* emulated CDJ-3000 firmware 3.20: a freshly randomized identity on every
|
|
23
|
+
* connect() was served once and then never again until the player rebooted,
|
|
24
|
+
* while the previously registered identity kept being served immediately.
|
|
15
25
|
*/
|
|
16
|
-
export declare function
|
|
26
|
+
export declare function getStagehandMac(iface: NetworkInterfaceInfoIPv4): Uint8Array;
|
|
17
27
|
/**
|
|
18
28
|
* Generates a random Stagehand device ID in the observed range of 141 to 211.
|
|
19
29
|
*/
|
|
@@ -24,7 +34,7 @@ export declare function generateStagehandDeviceId(): number;
|
|
|
24
34
|
* @param iface - The network interface to use
|
|
25
35
|
* @param id - The device ID to use (defaults to random Stagehand ID)
|
|
26
36
|
* @param name - The device name (defaults to 'Stagehand')
|
|
27
|
-
* @param macAddr - The
|
|
37
|
+
* @param macAddr - The protocol-layer MAC (defaults to one derived from iface)
|
|
28
38
|
*/
|
|
29
39
|
export declare const getVirtualStagehand: (iface: NetworkInterfaceInfoIPv4, id?: DeviceID, name?: string, macAddr?: Uint8Array<ArrayBufferLike>) => Device;
|
|
30
40
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alphatheta-connect",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "Evan Purkhiser <evanpurkhiser@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"build": "webpack",
|
|
33
33
|
"build-docs": "typedoc --out docs src/index.ts",
|
|
34
34
|
"test": "jest",
|
|
35
|
+
"build-examples": "webpack --config webpack.examples.config.ts",
|
|
36
|
+
"stagehand": "npm run build-examples && node lib/examples/stagehand-monitor.js",
|
|
35
37
|
"lint": "eslint src/**/*.ts tests/**/*.ts",
|
|
36
38
|
"preversion": "yarn lint; yarn test",
|
|
37
39
|
"prepare": "ts-patch install -s && npm run build",
|