@3dverse/livelink.core 0.7.4 → 0.7.5
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/dist/_prebuild/GatewayConnection.d.ts +2 -1
- package/dist/_prebuild/GatewayMessageHandler.d.ts +12 -2
- package/dist/_prebuild/messages/gateway/enums.d.ts +3 -0
- package/dist/sources/LivelinkCore.d.ts +5 -0
- package/dist/sources/controllers/ActivityWatcher.d.ts +18 -0
- package/dist/sources/controllers/GatewayController.d.ts +21 -0
- package/dist/sources/types/constants.d.ts +2 -0
- package/dist/sources/types/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* See : https://gitlab.com/3dverse/platform/libs/js/asyncapi-server-generator
|
|
5
5
|
*/
|
|
6
6
|
import { AssignClientToScriptMessage, AuthenticationResponse, ClientConfig, ClientConfigResponse, FireEventMessage, HighlightEntitiesMessage, InputState, RemoveComponentsCommand, RemoveFilterMessage, ResizeResponse, ScreenSpaceRayQuery, ScreenSpaceRayResult, SessionAuth, SetFilterMessage, SkeletonPoseMessage, ToggleFilterMessage, UpdateEntitiesFromBytesMessage, UpdateEntitiesFromJsonMessage, ViewportConfigs } from "./messages/gateway";
|
|
7
|
-
import { UUID, Vec2ui16 } from "../sources/types";
|
|
7
|
+
import { UUID, Vec2ui16, GatewayDisconnectedReason } from "../sources/types";
|
|
8
8
|
/**
|
|
9
9
|
* Message handlers interface.
|
|
10
10
|
* This follows the Livelink protocol specifications for the gateway messages.
|
|
@@ -24,7 +24,17 @@ export declare class GatewayMessageHandler extends EventTarget {
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
_onConnected(): void;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
_onDisconnected({ reason }: {
|
|
32
|
+
reason: GatewayDisconnectedReason;
|
|
33
|
+
}): void;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
_onMessageSent(is_heart_beat?: boolean): void;
|
|
28
38
|
/***************************************************************************
|
|
29
39
|
* AUTHENTICATION (0)
|
|
30
40
|
**************************************************************************/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AssignClientToScriptMessage, ClientConfig, ClientConfigResponse, FireEventMessage, HighlightEntitiesMessage, InputState, RemoveComponentsCommand, RemoveFilterMessage, ScreenSpaceRayQuery, ScreenSpaceRayResult, SetFilterMessage, SkeletonPoseMessage, ToggleFilterMessage, UpdateEntitiesFromBytesMessage, UpdateEntitiesFromJsonMessage, ViewportConfigs } from "../_prebuild/messages/gateway";
|
|
2
|
+
import { ActivityWatcher } from "./controllers/ActivityWatcher";
|
|
2
3
|
import { Serializer } from "./Serializer";
|
|
3
4
|
import { RTID, UUID, Vec2i } from "./types";
|
|
4
5
|
import { EntityInterface } from "./interfaces/EntityInterface";
|
|
@@ -19,6 +20,10 @@ import { ComponentType } from "./core";
|
|
|
19
20
|
*/
|
|
20
21
|
export declare class LivelinkCore {
|
|
21
22
|
#private;
|
|
23
|
+
/**
|
|
24
|
+
* Get the gateway activity watcher.
|
|
25
|
+
*/
|
|
26
|
+
get activity_watcher(): ActivityWatcher;
|
|
22
27
|
/**
|
|
23
28
|
* Connect to the session
|
|
24
29
|
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watch activity on the gateway.
|
|
3
|
+
*/
|
|
4
|
+
export declare class ActivityWatcher extends EventTarget {
|
|
5
|
+
#private;
|
|
6
|
+
/**
|
|
7
|
+
* Start the timeouts.
|
|
8
|
+
*/
|
|
9
|
+
start(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Stop the timeouts if running.
|
|
12
|
+
*/
|
|
13
|
+
stop(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Reset the timeouts.
|
|
16
|
+
*/
|
|
17
|
+
reset(): void;
|
|
18
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GatewayMessageHandler } from "../../_prebuild/GatewayMessageHandler";
|
|
2
2
|
import { SessionInterface } from "../interfaces/SessionInterface";
|
|
3
|
+
import { ActivityWatcher } from "./ActivityWatcher";
|
|
3
4
|
import { UUID } from "../types";
|
|
4
5
|
/**
|
|
5
6
|
* The gateway controller is the exposed interface of the Livelink gateway protocol.
|
|
@@ -9,6 +10,10 @@ import { UUID } from "../types";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class GatewayController extends GatewayMessageHandler {
|
|
11
12
|
#private;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
get activity_watcher(): ActivityWatcher;
|
|
12
17
|
/**
|
|
13
18
|
* Opens a connection to the gateway where the provided session is running.
|
|
14
19
|
*
|
|
@@ -27,4 +32,20 @@ export declare class GatewayController extends GatewayMessageHandler {
|
|
|
27
32
|
* Closes the connection to the gateway.
|
|
28
33
|
*/
|
|
29
34
|
disconnect(): void;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
_onInactivityTimeout: () => void;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
_onConnected(): void;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
_onDisconnected(): void;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
_onMessageSent(is_heart_beat?: boolean): void;
|
|
30
51
|
}
|
|
@@ -5,3 +5,5 @@ export declare const FTL_EDITOR_ROP_HEADER_SIZE: 25;
|
|
|
5
5
|
export declare const LITTLE_ENDIAN: true;
|
|
6
6
|
export declare const BIG_ENDIAN: false;
|
|
7
7
|
export declare const HEARTBEAT_PERIOD_IN_MS: 2000;
|
|
8
|
+
export declare const INACTIVITY_WARNING_IN_SEC: 300;
|
|
9
|
+
export declare const INACTIVITY_TIMEOUT_IN_SEC: 360;
|