covenant-bridge 0.1.5 → 0.2.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/dist/backend.js +4503 -12
- package/dist/backend.js.map +1 -1
- package/manifest.json +4 -3
- package/package.json +14 -13
- package/dist/backend.d.ts +0 -8
- package/dist/backend.d.ts.map +0 -1
- package/dist/services/gcode.d.ts +0 -11
- package/dist/services/gcode.d.ts.map +0 -1
- package/dist/services/gcode.js +0 -55
- package/dist/services/gcode.js.map +0 -1
- package/dist/services/hal.d.ts +0 -12
- package/dist/services/hal.d.ts.map +0 -1
- package/dist/services/hal.js +0 -342
- package/dist/services/hal.js.map +0 -1
- package/dist/services/linuxcnc.d.ts +0 -11
- package/dist/services/linuxcnc.d.ts.map +0 -1
- package/dist/services/linuxcnc.js +0 -246
- package/dist/services/linuxcnc.js.map +0 -1
- package/dist/services/position-logger.d.ts +0 -11
- package/dist/services/position-logger.d.ts.map +0 -1
- package/dist/services/position-logger.js +0 -148
- package/dist/services/position-logger.js.map +0 -1
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LinuxCNC Service
|
|
3
|
-
*
|
|
4
|
-
* Exposes LinuxCNC status monitoring and command execution via AppBus.
|
|
5
|
-
* Implements LinuxCNCProtocol from covenant-protocol.
|
|
6
|
-
*/
|
|
7
|
-
import { StatChannel, CommandChannel, ErrorChannel } from "@linuxcnc-node/core";
|
|
8
|
-
import delve from "dlv";
|
|
9
|
-
const SERVICE_NAME = "linuxcnc";
|
|
10
|
-
// Shared state across all connections
|
|
11
|
-
let statChannel = null;
|
|
12
|
-
let commandChannel = null;
|
|
13
|
-
let errorChannel = null;
|
|
14
|
-
// Connected clients
|
|
15
|
-
const connections = new Map();
|
|
16
|
-
/**
|
|
17
|
-
* Broadcast stat delta to all connected clients
|
|
18
|
-
*/
|
|
19
|
-
function broadcastDelta(changes) {
|
|
20
|
-
if (changes.length === 0 || !statChannel)
|
|
21
|
-
return;
|
|
22
|
-
const message = {
|
|
23
|
-
changes,
|
|
24
|
-
cursor: statChannel.getCursor(),
|
|
25
|
-
timestamp: Date.now(),
|
|
26
|
-
};
|
|
27
|
-
for (const conn of connections.values()) {
|
|
28
|
-
try {
|
|
29
|
-
conn.send("stat-delta", message);
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
console.error("[LinuxCNC] Error sending delta:", err);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Initialize the LinuxCNC service
|
|
38
|
-
*/
|
|
39
|
-
export function initLinuxCNCService() {
|
|
40
|
-
// Create channels (shared across all connections)
|
|
41
|
-
statChannel = new StatChannel({ pollInterval: 50 });
|
|
42
|
-
commandChannel = new CommandChannel();
|
|
43
|
-
errorChannel = new ErrorChannel({ pollInterval: 100 });
|
|
44
|
-
// Listen to native delta updates from StatChannel
|
|
45
|
-
statChannel.on("delta", broadcastDelta);
|
|
46
|
-
// Forward error channel events
|
|
47
|
-
errorChannel.on("message", (error) => {
|
|
48
|
-
for (const conn of connections.values()) {
|
|
49
|
-
try {
|
|
50
|
-
conn.send("error-channel-event", error);
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
console.error("[LinuxCNC] Error forwarding error event:", err);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
// Expose the service
|
|
58
|
-
worker.appBus.exposeService(SERVICE_NAME, (connection, { appId: clientAppId }) => {
|
|
59
|
-
console.log(`[LinuxCNC] Client connected: ${clientAppId}`);
|
|
60
|
-
const typedConn = connection;
|
|
61
|
-
connections.set(clientAppId, typedConn);
|
|
62
|
-
// Handle disconnect
|
|
63
|
-
connection.onClose(() => {
|
|
64
|
-
console.log(`[LinuxCNC] Client disconnected: ${clientAppId}`);
|
|
65
|
-
connections.delete(clientAppId);
|
|
66
|
-
});
|
|
67
|
-
// === STAT HANDLERS ===
|
|
68
|
-
typedConn.handle("stat/sync", () => {
|
|
69
|
-
const stat = statChannel.get();
|
|
70
|
-
if (!stat) {
|
|
71
|
-
throw new Error("StatChannel not ready");
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
stat,
|
|
75
|
-
cursor: statChannel.getCursor(),
|
|
76
|
-
};
|
|
77
|
-
});
|
|
78
|
-
typedConn.handle("stat/get-value", ({ path }) => {
|
|
79
|
-
const stat = statChannel.get();
|
|
80
|
-
if (!stat) {
|
|
81
|
-
throw new Error("StatChannel not ready");
|
|
82
|
-
}
|
|
83
|
-
return { value: delve(stat, path) };
|
|
84
|
-
});
|
|
85
|
-
// === COMMAND HANDLERS ===
|
|
86
|
-
typedConn.handle("cmd/set-task-mode", async ({ mode }) => {
|
|
87
|
-
return commandChannel.setTaskMode(mode);
|
|
88
|
-
});
|
|
89
|
-
typedConn.handle("cmd/set-state", async ({ state }) => {
|
|
90
|
-
return commandChannel.setState(state);
|
|
91
|
-
});
|
|
92
|
-
typedConn.handle("cmd/mdi", async ({ command }) => {
|
|
93
|
-
return commandChannel.mdi(command);
|
|
94
|
-
});
|
|
95
|
-
typedConn.handle("cmd/abort", async () => {
|
|
96
|
-
return commandChannel.abortTask();
|
|
97
|
-
});
|
|
98
|
-
typedConn.handle("cmd/task-plan-synch", async () => {
|
|
99
|
-
return commandChannel.taskPlanSynch();
|
|
100
|
-
});
|
|
101
|
-
typedConn.handle("cmd/reset-interpreter", async () => {
|
|
102
|
-
return commandChannel.resetInterpreter();
|
|
103
|
-
});
|
|
104
|
-
// Program control
|
|
105
|
-
typedConn.handle("cmd/program-open", async ({ filePath }) => {
|
|
106
|
-
return commandChannel.programOpen(filePath);
|
|
107
|
-
});
|
|
108
|
-
typedConn.handle("cmd/program-run", async ({ startLine }) => {
|
|
109
|
-
return commandChannel.runProgram(startLine ?? 0);
|
|
110
|
-
});
|
|
111
|
-
typedConn.handle("cmd/program-pause", async () => {
|
|
112
|
-
return commandChannel.pauseProgram();
|
|
113
|
-
});
|
|
114
|
-
typedConn.handle("cmd/program-resume", async () => {
|
|
115
|
-
return commandChannel.resumeProgram();
|
|
116
|
-
});
|
|
117
|
-
typedConn.handle("cmd/program-step", async () => {
|
|
118
|
-
return commandChannel.stepProgram();
|
|
119
|
-
});
|
|
120
|
-
typedConn.handle("cmd/program-reverse", async () => {
|
|
121
|
-
return commandChannel.reverseProgram();
|
|
122
|
-
});
|
|
123
|
-
typedConn.handle("cmd/program-forward", async () => {
|
|
124
|
-
return commandChannel.forwardProgram();
|
|
125
|
-
});
|
|
126
|
-
// Motion control
|
|
127
|
-
typedConn.handle("cmd/set-feed-rate", async ({ scale }) => {
|
|
128
|
-
return commandChannel.setFeedRate(scale);
|
|
129
|
-
});
|
|
130
|
-
typedConn.handle("cmd/set-rapid-rate", async ({ scale }) => {
|
|
131
|
-
return commandChannel.setRapidRate(scale);
|
|
132
|
-
});
|
|
133
|
-
typedConn.handle("cmd/set-max-velocity", async ({ velocity }) => {
|
|
134
|
-
return commandChannel.setMaxVelocity(velocity);
|
|
135
|
-
});
|
|
136
|
-
typedConn.handle("cmd/set-traj-mode", async ({ mode }) => {
|
|
137
|
-
return commandChannel.setTrajMode(mode);
|
|
138
|
-
});
|
|
139
|
-
typedConn.handle("cmd/teleop-enable", async ({ enable }) => {
|
|
140
|
-
return commandChannel.teleopEnable(enable);
|
|
141
|
-
});
|
|
142
|
-
typedConn.handle("cmd/set-feed-override-enable", async ({ enable }) => {
|
|
143
|
-
return commandChannel.setFeedOverrideEnable(enable);
|
|
144
|
-
});
|
|
145
|
-
typedConn.handle("cmd/set-feed-hold-enable", async ({ enable }) => {
|
|
146
|
-
return commandChannel.setFeedHoldEnable(enable);
|
|
147
|
-
});
|
|
148
|
-
typedConn.handle("cmd/set-adaptive-feed-enable", async ({ enable }) => {
|
|
149
|
-
return commandChannel.setAdaptiveFeedEnable(enable);
|
|
150
|
-
});
|
|
151
|
-
// Jogging - note: CommandChannel uses (axis, isJoint, speed) order
|
|
152
|
-
typedConn.handle("cmd/jog-continuous", async ({ axis, speed, isJoint }) => {
|
|
153
|
-
return commandChannel.jogContinuous(axis, isJoint ?? false, speed);
|
|
154
|
-
});
|
|
155
|
-
typedConn.handle("cmd/jog-increment", async ({ axis, speed, increment, isJoint }) => {
|
|
156
|
-
return commandChannel.jogIncrement(axis, isJoint ?? false, speed, increment);
|
|
157
|
-
});
|
|
158
|
-
typedConn.handle("cmd/jog-stop", async ({ axis, isJoint }) => {
|
|
159
|
-
return commandChannel.jogStop(axis, isJoint ?? false);
|
|
160
|
-
});
|
|
161
|
-
// Homing
|
|
162
|
-
typedConn.handle("cmd/home", async ({ joint }) => {
|
|
163
|
-
return commandChannel.homeJoint(joint);
|
|
164
|
-
});
|
|
165
|
-
typedConn.handle("cmd/unhome", async ({ joint }) => {
|
|
166
|
-
return commandChannel.unhomeJoint(joint);
|
|
167
|
-
});
|
|
168
|
-
typedConn.handle("cmd/set-min-position-limit", async ({ joint, limit }) => {
|
|
169
|
-
return commandChannel.setMinPositionLimit(joint, limit);
|
|
170
|
-
});
|
|
171
|
-
typedConn.handle("cmd/set-max-position-limit", async ({ joint, limit }) => {
|
|
172
|
-
return commandChannel.setMaxPositionLimit(joint, limit);
|
|
173
|
-
});
|
|
174
|
-
// Spindle
|
|
175
|
-
typedConn.handle("cmd/spindle-on", async ({ speed, spindle, wait }) => {
|
|
176
|
-
return commandChannel.spindleOn(speed, spindle ?? 0, wait ?? false);
|
|
177
|
-
});
|
|
178
|
-
typedConn.handle("cmd/spindle-off", async ({ spindle }) => {
|
|
179
|
-
return commandChannel.spindleOff(spindle ?? 0);
|
|
180
|
-
});
|
|
181
|
-
typedConn.handle("cmd/spindle-override", async ({ scale, spindle }) => {
|
|
182
|
-
return commandChannel.setSpindleOverride(scale, spindle ?? 0);
|
|
183
|
-
});
|
|
184
|
-
typedConn.handle("cmd/spindle-brake", async ({ engage, spindle }) => {
|
|
185
|
-
return commandChannel.spindleBrake(engage, spindle ?? 0);
|
|
186
|
-
});
|
|
187
|
-
typedConn.handle("cmd/spindle-increase", async ({ spindle }) => {
|
|
188
|
-
return commandChannel.spindleIncrease(spindle ?? 0);
|
|
189
|
-
});
|
|
190
|
-
typedConn.handle("cmd/spindle-decrease", async ({ spindle }) => {
|
|
191
|
-
return commandChannel.spindleDecrease(spindle ?? 0);
|
|
192
|
-
});
|
|
193
|
-
typedConn.handle("cmd/set-spindle-override-enable", async ({ enable, spindle }) => {
|
|
194
|
-
return commandChannel.setSpindleOverrideEnable(enable, spindle ?? 0);
|
|
195
|
-
});
|
|
196
|
-
// Coolant
|
|
197
|
-
typedConn.handle("cmd/set-mist", async ({ on }) => {
|
|
198
|
-
return commandChannel.setMist(on);
|
|
199
|
-
});
|
|
200
|
-
typedConn.handle("cmd/set-flood", async ({ on }) => {
|
|
201
|
-
return commandChannel.setFlood(on);
|
|
202
|
-
});
|
|
203
|
-
// Tool
|
|
204
|
-
typedConn.handle("cmd/load-tool-table", async () => {
|
|
205
|
-
return commandChannel.loadToolTable();
|
|
206
|
-
});
|
|
207
|
-
typedConn.handle("cmd/set-tool", async ({ tool }) => {
|
|
208
|
-
return commandChannel.setTool(tool);
|
|
209
|
-
});
|
|
210
|
-
// I/O
|
|
211
|
-
typedConn.handle("cmd/set-digital-output", async ({ index, value }) => {
|
|
212
|
-
return commandChannel.setDigitalOutput(index, value);
|
|
213
|
-
});
|
|
214
|
-
typedConn.handle("cmd/set-analog-output", async ({ index, value }) => {
|
|
215
|
-
return commandChannel.setAnalogOutput(index, value);
|
|
216
|
-
});
|
|
217
|
-
// Misc
|
|
218
|
-
typedConn.handle("cmd/override-limits", async () => {
|
|
219
|
-
return commandChannel.overrideLimits();
|
|
220
|
-
});
|
|
221
|
-
typedConn.handle("cmd/set-optional-stop", async ({ enable }) => {
|
|
222
|
-
return commandChannel.setOptionalStop(enable);
|
|
223
|
-
});
|
|
224
|
-
typedConn.handle("cmd/set-block-delete", async ({ enable }) => {
|
|
225
|
-
return commandChannel.setBlockDelete(enable);
|
|
226
|
-
});
|
|
227
|
-
typedConn.handle("cmd/set-debug-level", async ({ level }) => {
|
|
228
|
-
return commandChannel.setDebugLevel(level);
|
|
229
|
-
});
|
|
230
|
-
typedConn.handle("cmd/send-operator-error", async ({ message }) => {
|
|
231
|
-
return commandChannel.sendOperatorError(message);
|
|
232
|
-
});
|
|
233
|
-
typedConn.handle("cmd/send-operator-text", async ({ message }) => {
|
|
234
|
-
return commandChannel.sendOperatorText(message);
|
|
235
|
-
});
|
|
236
|
-
typedConn.handle("cmd/send-operator-display", async ({ message }) => {
|
|
237
|
-
return commandChannel.sendOperatorDisplay(message);
|
|
238
|
-
});
|
|
239
|
-
// Connection
|
|
240
|
-
typedConn.handle("ping", () => {
|
|
241
|
-
return { timestamp: Date.now() };
|
|
242
|
-
});
|
|
243
|
-
}, { description: "LinuxCNC status monitoring and command execution" });
|
|
244
|
-
console.log(`[LinuxCNC] Service exposed as '${SERVICE_NAME}'`);
|
|
245
|
-
}
|
|
246
|
-
//# sourceMappingURL=linuxcnc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linuxcnc.js","sourceRoot":"","sources":["../../src/services/linuxcnc.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIhF,OAAO,KAAK,MAAM,KAAK,CAAC;AACxB,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,sCAAsC;AACtC,IAAI,WAAW,GAAuB,IAAI,CAAC;AAC3C,IAAI,cAAc,GAA0B,IAAI,CAAC;AACjD,IAAI,YAAY,GAAwB,IAAI,CAAC;AAE7C,oBAAoB;AACpB,MAAM,WAAW,GAAG,IAAI,GAAG,EAA4C,CAAC;AAExE;;GAEG;AACH,SAAS,cAAc,CAAC,OAAqB;IAC3C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW;QAAE,OAAO;IAEjD,MAAM,OAAO,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,KAAK,EAAE,EAAE,EAAE;YAC1D,OAAO,cAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,MAAM,CAAC,yBAAyB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAChE,OAAO,cAAe,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,MAAM,CAAC,wBAAwB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAC/D,OAAO,cAAe,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,MAAM,CAAC,2BAA2B,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAClE,OAAO,cAAe,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,aAAa;QACb,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE;YAC5B,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC,EACD,EAAE,WAAW,EAAE,kDAAkD,EAAE,CACpE,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,kCAAkC,YAAY,GAAG,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Position Logger Service
|
|
3
|
-
*
|
|
4
|
-
* Exposes machine position logging and history streaming via AppBus.
|
|
5
|
-
* Implements PositionLoggerProtocol from covenant-protocol.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Initialize the Position Logger service
|
|
9
|
-
*/
|
|
10
|
-
export declare function initPositionLoggerService(): void;
|
|
11
|
-
//# sourceMappingURL=position-logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"position-logger.d.ts","sourceRoot":"","sources":["../../src/services/position-logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqEH;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CA4GhD"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Position Logger Service
|
|
3
|
-
*
|
|
4
|
-
* Exposes machine position logging and history streaming via AppBus.
|
|
5
|
-
* Implements PositionLoggerProtocol from covenant-protocol.
|
|
6
|
-
*/
|
|
7
|
-
import { PositionLogger } from "@linuxcnc-node/core";
|
|
8
|
-
import { POSITION_STRIDE } from "@linuxcnc-node/types";
|
|
9
|
-
const SERVICE_NAME = "position-logger";
|
|
10
|
-
const UPDATE_INTERVAL_MS = 50;
|
|
11
|
-
// Shared position logger instance
|
|
12
|
-
let logger = null;
|
|
13
|
-
// Cursor tracking
|
|
14
|
-
let cursor = 0;
|
|
15
|
-
let lastHistoryCount = 0;
|
|
16
|
-
// Connected clients
|
|
17
|
-
const connections = new Map();
|
|
18
|
-
// Update interval for pushing position updates
|
|
19
|
-
let updateInterval = null;
|
|
20
|
-
/**
|
|
21
|
-
* Start the update loop for pushing position deltas to clients
|
|
22
|
-
*/
|
|
23
|
-
function startUpdateLoop() {
|
|
24
|
-
if (updateInterval)
|
|
25
|
-
return;
|
|
26
|
-
updateInterval = setInterval(() => {
|
|
27
|
-
if (!logger || connections.size === 0)
|
|
28
|
-
return;
|
|
29
|
-
const currentCount = logger.getHistoryCount();
|
|
30
|
-
if (currentCount <= lastHistoryCount)
|
|
31
|
-
return;
|
|
32
|
-
// Get new points since last update
|
|
33
|
-
const newPointCount = currentCount - lastHistoryCount;
|
|
34
|
-
const newPoints = logger.getMotionHistory(lastHistoryCount, newPointCount);
|
|
35
|
-
cursor++;
|
|
36
|
-
lastHistoryCount = currentCount;
|
|
37
|
-
// Push to all connected clients - cast to any to handle type conflicts
|
|
38
|
-
const message = {
|
|
39
|
-
points: newPoints,
|
|
40
|
-
count: newPointCount,
|
|
41
|
-
cursor,
|
|
42
|
-
};
|
|
43
|
-
for (const conn of connections.values()) {
|
|
44
|
-
try {
|
|
45
|
-
conn.send("position-update", message);
|
|
46
|
-
}
|
|
47
|
-
catch (err) {
|
|
48
|
-
console.error("[PositionLogger] Error sending update:", err);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, UPDATE_INTERVAL_MS);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Stop the update loop
|
|
55
|
-
*/
|
|
56
|
-
function stopUpdateLoop() {
|
|
57
|
-
if (updateInterval) {
|
|
58
|
-
clearInterval(updateInterval);
|
|
59
|
-
updateInterval = null;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Initialize the Position Logger service
|
|
64
|
-
*/
|
|
65
|
-
export function initPositionLoggerService() {
|
|
66
|
-
// Create shared logger instance
|
|
67
|
-
logger = new PositionLogger();
|
|
68
|
-
worker.appBus.exposeService(SERVICE_NAME, (connection, { appId: clientAppId }) => {
|
|
69
|
-
console.log(`[PositionLogger] Client connected: ${clientAppId}`);
|
|
70
|
-
const typedConn = connection;
|
|
71
|
-
connections.set(clientAppId, typedConn);
|
|
72
|
-
// Handle disconnect
|
|
73
|
-
connection.onClose(() => {
|
|
74
|
-
console.log(`[PositionLogger] Client disconnected: ${clientAppId}`);
|
|
75
|
-
connections.delete(clientAppId);
|
|
76
|
-
// Stop update loop if no clients
|
|
77
|
-
if (connections.size === 0) {
|
|
78
|
-
stopUpdateLoop();
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
// Start handler
|
|
82
|
-
typedConn.handle("start", ({ interval, maxHistory }) => {
|
|
83
|
-
if (!logger) {
|
|
84
|
-
return { success: false, cursor: 0 };
|
|
85
|
-
}
|
|
86
|
-
logger.start({
|
|
87
|
-
interval: interval ?? 0.01,
|
|
88
|
-
maxHistorySize: maxHistory ?? 10000,
|
|
89
|
-
});
|
|
90
|
-
lastHistoryCount = 0;
|
|
91
|
-
cursor++;
|
|
92
|
-
// Start update loop if not running
|
|
93
|
-
startUpdateLoop();
|
|
94
|
-
return { success: true, cursor };
|
|
95
|
-
});
|
|
96
|
-
// Stop handler
|
|
97
|
-
typedConn.handle("stop", () => {
|
|
98
|
-
if (!logger) {
|
|
99
|
-
return { success: false };
|
|
100
|
-
}
|
|
101
|
-
logger.stop();
|
|
102
|
-
return { success: true };
|
|
103
|
-
});
|
|
104
|
-
// Clear handler
|
|
105
|
-
typedConn.handle("clear", () => {
|
|
106
|
-
if (!logger) {
|
|
107
|
-
return { success: false };
|
|
108
|
-
}
|
|
109
|
-
logger.clear();
|
|
110
|
-
lastHistoryCount = 0;
|
|
111
|
-
cursor++;
|
|
112
|
-
return { success: true };
|
|
113
|
-
});
|
|
114
|
-
typedConn.handle("sync", () => {
|
|
115
|
-
if (!logger) {
|
|
116
|
-
return {
|
|
117
|
-
history: new Float64Array(0),
|
|
118
|
-
count: 0,
|
|
119
|
-
cursor: 0,
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
const currentCount = logger.getHistoryCount();
|
|
123
|
-
const history = logger.getMotionHistory(0, currentCount);
|
|
124
|
-
return {
|
|
125
|
-
history,
|
|
126
|
-
count: history.length / POSITION_STRIDE,
|
|
127
|
-
cursor,
|
|
128
|
-
};
|
|
129
|
-
});
|
|
130
|
-
typedConn.handle("get-current", () => {
|
|
131
|
-
if (!logger) {
|
|
132
|
-
return { position: null };
|
|
133
|
-
}
|
|
134
|
-
const position = logger.getCurrentPosition();
|
|
135
|
-
return { position };
|
|
136
|
-
});
|
|
137
|
-
// Get cursor
|
|
138
|
-
typedConn.handle("get-cursor", () => {
|
|
139
|
-
return { cursor };
|
|
140
|
-
});
|
|
141
|
-
// Ping
|
|
142
|
-
typedConn.handle("ping", () => {
|
|
143
|
-
return { timestamp: Date.now() };
|
|
144
|
-
});
|
|
145
|
-
}, { description: "Machine position logging and history streaming" });
|
|
146
|
-
console.log(`[PositionLogger] Service exposed as '${SERVICE_NAME}'`);
|
|
147
|
-
}
|
|
148
|
-
//# sourceMappingURL=position-logger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"position-logger.js","sourceRoot":"","sources":["../../src/services/position-logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD,MAAM,YAAY,GAAG,iBAAiB,CAAC;AACvC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,kCAAkC;AAClC,IAAI,MAAM,GAA0B,IAAI,CAAC;AAEzC,kBAAkB;AAClB,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAEzB,oBAAoB;AACpB,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkD,CAAC;AAE9E,+CAA+C;AAC/C,IAAI,cAAc,GAA0B,IAAI,CAAC;AAEjD;;GAEG;AACH,SAAS,eAAe;IACtB,IAAI,cAAc;QAAE,OAAO;IAE3B,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,IAAI,CAAC,MAAM,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC;YAAE,OAAO;QAE9C,MAAM,YAAY,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAC9C,IAAI,YAAY,IAAI,gBAAgB;YAAE,OAAO;QAE7C,mCAAmC;QACnC,MAAM,aAAa,GAAG,YAAY,GAAG,gBAAgB,CAAC;QACtD,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAE3E,MAAM,EAAE,CAAC;QACT,gBAAgB,GAAG,YAAY,CAAC;QAEhC,uEAAuE;QACvE,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,aAAa;YACp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