abb-rws-client 0.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.
@@ -0,0 +1,73 @@
1
+ /**
2
+ * ResponseParser — pure functions that parse RWS 1.0 XML/XHTML responses into typed objects.
3
+ *
4
+ * RWS returns XHTML with <li class="..."> elements containing <span class="..."> children.
5
+ * Parsing uses regex + string methods only — no external XML libraries.
6
+ * All functions throw RwsError('PARSE_ERROR') on malformed or missing data.
7
+ */
8
+ import type { ControllerState, OperationMode, ExecutionState, JointTarget, RobTarget, Signal, RapidTask } from './types.js';
9
+ /**
10
+ * Parse a /rw/panel/ctrlstate XML response into a ControllerState.
11
+ * XML: <li class="pnl-ctrlstate"><span class="ctrlstate">motoron</span></li>
12
+ */
13
+ export declare function parseControllerState(xml: string): ControllerState;
14
+ /**
15
+ * Parse a /rw/panel/opmode XML response into an OperationMode.
16
+ * XML: <li class="pnl-opmode"><span class="opmode">AUTO</span></li>
17
+ */
18
+ export declare function parseOperationMode(xml: string): OperationMode;
19
+ /**
20
+ * Parse a /rw/rapid/execution XML response into an ExecutionState.
21
+ * XML: <li class="rap-execution"><span class="excstate">running</span></li>
22
+ *
23
+ * Note: some firmware versions emit the <li> with class "rap-execution-state" — we
24
+ * try both and also fall back to a flat span search.
25
+ */
26
+ export declare function parseExecutionState(xml: string): ExecutionState;
27
+ /**
28
+ * Parse a /rw/mechunit/{unit}/joint-target XML response into a JointTarget.
29
+ * XML: <li class="rap-jointtarget">
30
+ * <span class="rax_1">10.00</span> ... <span class="rax_6">-90.00</span>
31
+ * </li>
32
+ */
33
+ export declare function parseJointTarget(xml: string): JointTarget;
34
+ /**
35
+ * Parse a /rw/mechunit/{unit}/robtarget XML response into a RobTarget.
36
+ * XML: <li class="rap-robtarget">
37
+ * <span class="x">...</span><span class="y">...</span>...
38
+ * </li>
39
+ */
40
+ export declare function parseRobTarget(xml: string): RobTarget;
41
+ /**
42
+ * Parse a single I/O signal from a /rw/iosystem/signals/... XML response.
43
+ * XML: <li class="ios-signal-li">
44
+ * <span class="name">DI_1</span>
45
+ * <span class="lvalue">0</span>
46
+ * <span class="type">DI</span>
47
+ * </li>
48
+ *
49
+ * Can also be called with a single <li> block extracted by parseSignalList.
50
+ */
51
+ export declare function parseSignal(xml: string): Signal;
52
+ /**
53
+ * Parse a list of I/O signals from a /rw/iosystem/signals XML response.
54
+ * Extracts every <li class="ios-signal-li"> block and calls parseSignal on each.
55
+ */
56
+ export declare function parseSignalList(xml: string): Signal[];
57
+ /**
58
+ * Parse a /rw/rapid/tasks XML response into an array of RapidTask objects.
59
+ * XML: multiple <li class="rap-task-li"> elements.
60
+ */
61
+ export declare function parseRapidTasks(xml: string): RapidTask[];
62
+ /**
63
+ * Extract the subscription ID from a Location header value returned by POST /subscription.
64
+ *
65
+ * The caller should pass the raw Location header string, e.g.:
66
+ * 'http://192.168.125.1/subscription/1'
67
+ * Returns '1'.
68
+ *
69
+ * If passed full XML instead (some firmware versions put the ID in the body),
70
+ * the function also tries to extract a numeric trailing path segment.
71
+ */
72
+ export declare function parseSubscriptionId(locationOrXml: string): string;
73
+ //# sourceMappingURL=ResponseParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseParser.d.ts","sourceRoot":"","sources":["../src/ResponseParser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,MAAM,EACN,SAAS,EACV,MAAM,YAAY,CAAC;AA2FpB;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAMjE;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAQ7D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAsB/D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAwBzD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CA2BrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA+B/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAKrD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,CA2CxD;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAajE"}
@@ -0,0 +1,294 @@
1
+ /**
2
+ * ResponseParser — pure functions that parse RWS 1.0 XML/XHTML responses into typed objects.
3
+ *
4
+ * RWS returns XHTML with <li class="..."> elements containing <span class="..."> children.
5
+ * Parsing uses regex + string methods only — no external XML libraries.
6
+ * All functions throw RwsError('PARSE_ERROR') on malformed or missing data.
7
+ */
8
+ import { RwsError } from './types.js';
9
+ // ─── Internal helpers ────────────────────────────────────────────────────────
10
+ /**
11
+ * Decode the minimum set of HTML entities that may appear in RWS span values.
12
+ */
13
+ function decodeEntities(s) {
14
+ return s
15
+ .replace(/&amp;/g, '&')
16
+ .replace(/&lt;/g, '<')
17
+ .replace(/&gt;/g, '>')
18
+ .replace(/&quot;/g, '"')
19
+ .replace(/&#39;/g, "'");
20
+ }
21
+ /**
22
+ * Find the first <li> whose class attribute contains `liClass` as a whole word,
23
+ * then within that block find the first <span> whose class attribute contains
24
+ * `spanClass` as a whole word. Returns the trimmed inner text, or undefined.
25
+ *
26
+ * Uses the \b word boundary so 'rap-task-li' does not match 'rap-task-li-selected'.
27
+ * The 'is' flag makes '.' match newlines and matching case-insensitive.
28
+ */
29
+ function extractSpanValue(xml, liClass, spanClass) {
30
+ // Phase 1: find the <li> block
31
+ const liPattern = new RegExp(`<li[^>]*class="[^"]*\\b${liClass}\\b[^"]*"[^>]*>(.*?)</li>`, 'is');
32
+ const liMatch = xml.match(liPattern);
33
+ if (!liMatch)
34
+ return undefined;
35
+ const liContent = liMatch[1];
36
+ // Phase 2: find the <span> within that block
37
+ const spanPattern = new RegExp(`<span[^>]*class="[^"]*\\b${spanClass}\\b[^"]*"[^>]*>(.*?)</span>`, 'is');
38
+ const spanMatch = liContent.match(spanPattern);
39
+ if (!spanMatch)
40
+ return undefined;
41
+ return decodeEntities(spanMatch[1].trim());
42
+ }
43
+ /**
44
+ * Like extractSpanValue but searches the entire xml string for a <span> with the given class.
45
+ * Used for flat responses that have no <li> wrapper.
46
+ */
47
+ function extractSpanValueFlat(xml, spanClass) {
48
+ const spanPattern = new RegExp(`<span[^>]*class="[^"]*\\b${spanClass}\\b[^"]*"[^>]*>(.*?)</span>`, 'is');
49
+ const spanMatch = xml.match(spanPattern);
50
+ if (!spanMatch)
51
+ return undefined;
52
+ return decodeEntities(spanMatch[1].trim());
53
+ }
54
+ function requireSpan(xml, liClass, spanClass, context) {
55
+ const val = extractSpanValue(xml, liClass, spanClass);
56
+ if (val === undefined || val === '') {
57
+ throw new RwsError(`PARSE_ERROR: missing <span class="${spanClass}"> in <li class="${liClass}"> (${context})`, 'PARSE_ERROR');
58
+ }
59
+ return val;
60
+ }
61
+ function requireFloat(raw, field) {
62
+ const n = parseFloat(raw);
63
+ if (isNaN(n)) {
64
+ throw new RwsError(`PARSE_ERROR: expected float for "${field}", got "${raw}"`, 'PARSE_ERROR');
65
+ }
66
+ return n;
67
+ }
68
+ // ─── Public parsers ──────────────────────────────────────────────────────────
69
+ const VALID_CONTROLLER_STATES = new Set([
70
+ 'init',
71
+ 'motoroff',
72
+ 'motoron',
73
+ 'guardstop',
74
+ 'emergencystop',
75
+ 'emergencystopreset',
76
+ 'sysfail',
77
+ ]);
78
+ /**
79
+ * Parse a /rw/panel/ctrlstate XML response into a ControllerState.
80
+ * XML: <li class="pnl-ctrlstate"><span class="ctrlstate">motoron</span></li>
81
+ */
82
+ export function parseControllerState(xml) {
83
+ const raw = requireSpan(xml, 'pnl-ctrlstate', 'ctrlstate', 'parseControllerState');
84
+ if (!VALID_CONTROLLER_STATES.has(raw)) {
85
+ throw new RwsError(`PARSE_ERROR: unknown controller state "${raw}"`, 'PARSE_ERROR');
86
+ }
87
+ return raw;
88
+ }
89
+ const VALID_OPERATION_MODES = new Set(['AUTO', 'MANR', 'MANF']);
90
+ /**
91
+ * Parse a /rw/panel/opmode XML response into an OperationMode.
92
+ * XML: <li class="pnl-opmode"><span class="opmode">AUTO</span></li>
93
+ */
94
+ export function parseOperationMode(xml) {
95
+ const raw = requireSpan(xml, 'pnl-opmode', 'opmode', 'parseOperationMode');
96
+ // RWS may return lower-case variants; normalise to upper
97
+ const upper = raw.toUpperCase();
98
+ if (!VALID_OPERATION_MODES.has(upper)) {
99
+ throw new RwsError(`PARSE_ERROR: unknown operation mode "${raw}"`, 'PARSE_ERROR');
100
+ }
101
+ return upper;
102
+ }
103
+ /**
104
+ * Parse a /rw/rapid/execution XML response into an ExecutionState.
105
+ * XML: <li class="rap-execution"><span class="excstate">running</span></li>
106
+ *
107
+ * Note: some firmware versions emit the <li> with class "rap-execution-state" — we
108
+ * try both and also fall back to a flat span search.
109
+ */
110
+ export function parseExecutionState(xml) {
111
+ let raw = extractSpanValue(xml, 'rap-execution', 'ctrlexecstate') ??
112
+ extractSpanValue(xml, 'rap-execution', 'excstate') ??
113
+ extractSpanValue(xml, 'rap-execution-state', 'ctrlexecstate') ??
114
+ extractSpanValue(xml, 'rap-execution-state', 'excstate') ??
115
+ extractSpanValueFlat(xml, 'ctrlexecstate') ??
116
+ extractSpanValueFlat(xml, 'excstate');
117
+ if (!raw) {
118
+ throw new RwsError('PARSE_ERROR: missing ctrlexecstate/excstate in execution response', 'PARSE_ERROR');
119
+ }
120
+ raw = raw.toLowerCase();
121
+ // 'stop' is the value the IRC5 returns; normalise to 'stopped'
122
+ if (raw === 'stop')
123
+ raw = 'stopped';
124
+ if (raw !== 'running' && raw !== 'stopped') {
125
+ throw new RwsError(`PARSE_ERROR: unknown execution state "${raw}"`, 'PARSE_ERROR');
126
+ }
127
+ return raw;
128
+ }
129
+ /**
130
+ * Parse a /rw/mechunit/{unit}/joint-target XML response into a JointTarget.
131
+ * XML: <li class="rap-jointtarget">
132
+ * <span class="rax_1">10.00</span> ... <span class="rax_6">-90.00</span>
133
+ * </li>
134
+ */
135
+ export function parseJointTarget(xml) {
136
+ const axes = ['rax_1', 'rax_2', 'rax_3', 'rax_4', 'rax_5', 'rax_6'];
137
+ // Find the containing <li> block first
138
+ const liPattern = /<li[^>]*class="[^"]*\bms-jointtarget\b[^"]*"[^>]*>(.*?)<\/li>/is;
139
+ const liMatch = xml.match(liPattern);
140
+ if (!liMatch) {
141
+ throw new RwsError('PARSE_ERROR: missing <li class="ms-jointtarget">', 'PARSE_ERROR');
142
+ }
143
+ const block = liMatch[1];
144
+ const result = {};
145
+ for (const ax of axes) {
146
+ const spanPattern = new RegExp(`<span[^>]*class="[^"]*\\b${ax}\\b[^"]*"[^>]*>(.*?)</span>`, 'is');
147
+ const m = block.match(spanPattern);
148
+ if (!m) {
149
+ throw new RwsError(`PARSE_ERROR: missing <span class="${ax}">`, 'PARSE_ERROR');
150
+ }
151
+ result[ax] = requireFloat(m[1].trim(), ax);
152
+ }
153
+ return result;
154
+ }
155
+ /**
156
+ * Parse a /rw/mechunit/{unit}/robtarget XML response into a RobTarget.
157
+ * XML: <li class="rap-robtarget">
158
+ * <span class="x">...</span><span class="y">...</span>...
159
+ * </li>
160
+ */
161
+ export function parseRobTarget(xml) {
162
+ const liPattern = /<li[^>]*class="[^"]*\bms-robtargets\b[^"]*"[^>]*>(.*?)<\/li>/is;
163
+ const liMatch = xml.match(liPattern);
164
+ if (!liMatch) {
165
+ throw new RwsError('PARSE_ERROR: missing <li class="ms-robtargets">', 'PARSE_ERROR');
166
+ }
167
+ const block = liMatch[1];
168
+ function getField(cls) {
169
+ const spanPattern = new RegExp(`<span[^>]*class="[^"]*\\b${cls}\\b[^"]*"[^>]*>(.*?)</span>`, 'is');
170
+ const m = block.match(spanPattern);
171
+ if (!m)
172
+ throw new RwsError(`PARSE_ERROR: missing <span class="${cls}">`, 'PARSE_ERROR');
173
+ return requireFloat(m[1].trim(), cls);
174
+ }
175
+ return {
176
+ x: getField('x'),
177
+ y: getField('y'),
178
+ z: getField('z'),
179
+ q1: getField('q1'),
180
+ q2: getField('q2'),
181
+ q3: getField('q3'),
182
+ q4: getField('q4'),
183
+ };
184
+ }
185
+ /**
186
+ * Parse a single I/O signal from a /rw/iosystem/signals/... XML response.
187
+ * XML: <li class="ios-signal-li">
188
+ * <span class="name">DI_1</span>
189
+ * <span class="lvalue">0</span>
190
+ * <span class="type">DI</span>
191
+ * </li>
192
+ *
193
+ * Can also be called with a single <li> block extracted by parseSignalList.
194
+ */
195
+ export function parseSignal(xml) {
196
+ // Individual signal endpoint returns <li class="ios-signal">
197
+ // Signal list endpoint returns <li class="ios-signal-li">
198
+ const nameRaw = extractSpanValue(xml, 'ios-signal', 'name') ??
199
+ extractSpanValue(xml, 'ios-signal-li', 'name') ??
200
+ extractSpanValueFlat(xml, 'name');
201
+ const lvalueRaw = extractSpanValue(xml, 'ios-signal', 'lvalue') ??
202
+ extractSpanValue(xml, 'ios-signal-li', 'lvalue') ??
203
+ extractSpanValueFlat(xml, 'lvalue');
204
+ const typeRaw = extractSpanValue(xml, 'ios-signal', 'type') ??
205
+ extractSpanValue(xml, 'ios-signal-li', 'type') ??
206
+ extractSpanValueFlat(xml, 'type');
207
+ if (!nameRaw)
208
+ throw new RwsError('PARSE_ERROR: missing signal name', 'PARSE_ERROR');
209
+ if (lvalueRaw === undefined)
210
+ throw new RwsError('PARSE_ERROR: missing signal lvalue', 'PARSE_ERROR');
211
+ if (!typeRaw)
212
+ throw new RwsError('PARSE_ERROR: missing signal type', 'PARSE_ERROR');
213
+ const validTypes = new Set(['DI', 'DO', 'AI', 'AO', 'GI', 'GO']);
214
+ if (!validTypes.has(typeRaw)) {
215
+ throw new RwsError(`PARSE_ERROR: unknown signal type "${typeRaw}"`, 'PARSE_ERROR');
216
+ }
217
+ return {
218
+ name: nameRaw,
219
+ value: lvalueRaw,
220
+ type: typeRaw,
221
+ lvalue: lvalueRaw,
222
+ };
223
+ }
224
+ /**
225
+ * Parse a list of I/O signals from a /rw/iosystem/signals XML response.
226
+ * Extracts every <li class="ios-signal-li"> block and calls parseSignal on each.
227
+ */
228
+ export function parseSignalList(xml) {
229
+ const blocks = [
230
+ ...xml.matchAll(/<li[^>]*class="[^"]*\bios-signal-li\b[^"]*"[^>]*>.*?<\/li>/gis),
231
+ ];
232
+ return blocks.map(([block]) => parseSignal(block));
233
+ }
234
+ /**
235
+ * Parse a /rw/rapid/tasks XML response into an array of RapidTask objects.
236
+ * XML: multiple <li class="rap-task-li"> elements.
237
+ */
238
+ export function parseRapidTasks(xml) {
239
+ const blocks = [
240
+ ...xml.matchAll(/<li[^>]*class="[^"]*\brap-task-li\b[^"]*"[^>]*>.*?<\/li>/gis),
241
+ ];
242
+ if (blocks.length === 0) {
243
+ throw new RwsError('PARSE_ERROR: no <li class="rap-task-li"> found', 'PARSE_ERROR');
244
+ }
245
+ return blocks.map(([block]) => {
246
+ function getSpan(cls) {
247
+ const m = block.match(new RegExp(`<span[^>]*class="[^"]*\\b${cls}\\b[^"]*"[^>]*>(.*?)</span>`, 'is'));
248
+ return m ? decodeEntities(m[1].trim()) : '';
249
+ }
250
+ const name = getSpan('name');
251
+ if (!name)
252
+ throw new RwsError('PARSE_ERROR: RAPID task missing name', 'PARSE_ERROR');
253
+ let excstateRaw = getSpan('excstate').toLowerCase();
254
+ // IRC5 returns 'stop' instead of 'stopped'
255
+ if (excstateRaw === 'stop')
256
+ excstateRaw = 'stopped';
257
+ if (excstateRaw !== 'running' && excstateRaw !== 'stopped') {
258
+ throw new RwsError(`PARSE_ERROR: unknown excstate "${excstateRaw}" in task "${name}"`, 'PARSE_ERROR');
259
+ }
260
+ // 'active' may be 'On'/'Off' or 'true'/'false' depending on firmware version
261
+ const activeRaw = getSpan('active').toLowerCase();
262
+ const active = activeRaw === 'true' || activeRaw === 'on';
263
+ return {
264
+ name,
265
+ type: getSpan('type'),
266
+ taskstate: getSpan('taskstate'),
267
+ excstate: excstateRaw,
268
+ active,
269
+ motiontask: getSpan('motiontask').toLowerCase() === 'true',
270
+ };
271
+ });
272
+ }
273
+ /**
274
+ * Extract the subscription ID from a Location header value returned by POST /subscription.
275
+ *
276
+ * The caller should pass the raw Location header string, e.g.:
277
+ * 'http://192.168.125.1/subscription/1'
278
+ * Returns '1'.
279
+ *
280
+ * If passed full XML instead (some firmware versions put the ID in the body),
281
+ * the function also tries to extract a numeric trailing path segment.
282
+ */
283
+ export function parseSubscriptionId(locationOrXml) {
284
+ // IRC5 RWS 1.0 may return /subscription/{id} or /poll/{id}
285
+ const urlMatch = locationOrXml.match(/\/(?:subscription|poll)\/(\d+)/);
286
+ if (urlMatch)
287
+ return urlMatch[1];
288
+ // Fallback: look for a self-link in the XML body
289
+ const hrefMatch = locationOrXml.match(/href="[^"]*\/(?:subscription|poll)\/(\d+)"/i);
290
+ if (hrefMatch)
291
+ return hrefMatch[1];
292
+ throw new RwsError(`PARSE_ERROR: cannot extract subscription ID from "${locationOrXml}"`, 'PARSE_ERROR');
293
+ }
294
+ //# sourceMappingURL=ResponseParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseParser.js","sourceRoot":"","sources":["../src/ResponseParser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAWtC,gFAAgF;AAEhF;;GAEG;AACH,SAAS,cAAc,CAAC,CAAS;IAC/B,OAAO,CAAC;SACL,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;SACtB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,OAAO,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AAO,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM;SAC3D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,aAAqB;IACvD,2DAA2D;IAC3D,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACvE,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEjC,iDAAiD;IACjD,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACrF,IAAI,SAAS;QAAE,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;IAEnC,MAAM,IAAI,QAAQ,CAChB,qDAAqD,aAAa,GAAG,EACrE,aAAa,CACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,156 @@
1
+ /**
2
+ * RwsClient — the single public class for the abb-rws-client package.
3
+ *
4
+ * Assembles HttpSession, ResourceMapper, ResponseParser, and WsSubscriber into
5
+ * a convenient typed API for ABB IRC5 robot controllers using RWS 1.0.
6
+ *
7
+ * Compatible with RobotWare 6.x only. NOT compatible with RWS 2.0 / RobotWare 7.x / OmniCore.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const client = new RwsClient({ host: '127.0.0.1' });
12
+ * await client.connect();
13
+ * const state = await client.getControllerState();
14
+ * await client.disconnect();
15
+ * ```
16
+ */
17
+ import type { RwsClientOptions, ControllerState, OperationMode, ExecutionState, JointTarget, RobTarget, Signal, RapidTask, SubscriptionResource, SubscriptionEvent } from './types.js';
18
+ export declare class RwsClient {
19
+ private readonly session;
20
+ private readonly subscriber;
21
+ constructor(options: RwsClientOptions);
22
+ /**
23
+ * Establish a session with the controller.
24
+ * Triggers digest authentication and verifies connectivity by reading controller state.
25
+ * Must be called before any other method.
26
+ *
27
+ * @throws {RwsError} code='NETWORK_ERROR' if the controller is unreachable
28
+ * @throws {RwsError} code='AUTH_FAILED' if credentials are incorrect
29
+ */
30
+ connect(): Promise<void>;
31
+ /**
32
+ * Disconnect from the controller.
33
+ * Closes all WebSocket subscriptions and clears the session.
34
+ */
35
+ disconnect(): Promise<void>;
36
+ /**
37
+ * Read the current controller state.
38
+ *
39
+ * @returns 'motoron' | 'motoroff' | 'init' | 'guardstop' | 'emergencystop' |
40
+ * 'emergencystopreset' | 'sysfail'
41
+ * @throws {RwsError} code='PARSE_ERROR' on unexpected response format
42
+ */
43
+ getControllerState(): Promise<ControllerState>;
44
+ /**
45
+ * Read the current operation mode.
46
+ *
47
+ * @returns 'AUTO' | 'MANR' | 'MANF'
48
+ * @throws {RwsError} code='PARSE_ERROR' on unexpected response format
49
+ */
50
+ getOperationMode(): Promise<OperationMode>;
51
+ /**
52
+ * Read the current RAPID execution state.
53
+ *
54
+ * @returns 'running' | 'stopped'
55
+ */
56
+ getRapidExecutionState(): Promise<ExecutionState>;
57
+ /**
58
+ * Retrieve all RAPID tasks and their current states.
59
+ *
60
+ * @returns Array of RapidTask objects
61
+ */
62
+ getRapidTasks(): Promise<RapidTask[]>;
63
+ /**
64
+ * Start RAPID program execution.
65
+ * The controller must be in AUTO mode with motors on.
66
+ *
67
+ * @throws {RwsError} code='MOTORS_OFF' if motors are not on
68
+ * @throws {RwsError} code='CONTROLLER_BUSY' if the controller is already busy
69
+ */
70
+ startRapid(): Promise<void>;
71
+ /**
72
+ * Stop RAPID program execution.
73
+ */
74
+ stopRapid(): Promise<void>;
75
+ /**
76
+ * Reset the RAPID program pointer to main.
77
+ * RAPID must be stopped before calling this.
78
+ */
79
+ resetRapid(): Promise<void>;
80
+ /**
81
+ * Read the current joint-space positions for a mechanical unit.
82
+ *
83
+ * @param mechunit - Mechanical unit name; default 'ROB_1'
84
+ * @returns JointTarget with rax_1 … rax_6 in degrees
85
+ */
86
+ getJointPositions(mechunit?: string): Promise<JointTarget>;
87
+ /**
88
+ * Read the current Cartesian robot target (TCP position and orientation).
89
+ *
90
+ * @param mechunit - Mechanical unit; default 'ROB_1'
91
+ * @param tool - Active tool frame; default 'tool0'
92
+ * @param wobj - Active work object; default 'wobj0'
93
+ * @returns RobTarget with x, y, z (mm) and q1–q4 quaternion components
94
+ */
95
+ getCartesianPosition(mechunit?: string, tool?: string, wobj?: string): Promise<RobTarget>;
96
+ /**
97
+ * Upload a RAPID module file to the controller filesystem.
98
+ * The file content is uploaded as UTF-8 bytes via PUT /fileservice/{remotePath}.
99
+ *
100
+ * @param remotePath - Controller path, e.g. '$HOME/MyMod.mod'
101
+ * @param content - RAPID module source as a string
102
+ */
103
+ uploadModule(remotePath: string, content: string): Promise<void>;
104
+ /**
105
+ * Load a RAPID module from the controller filesystem into a task.
106
+ * The module must have been uploaded first (see uploadModule).
107
+ *
108
+ * @param taskName - RAPID task name, e.g. 'T_ROB1'
109
+ * @param modulePath - Controller path to the module file, e.g. '$HOME/MyMod.mod'
110
+ * @throws {RwsError} code='MODULE_NOT_FOUND' if the module file does not exist
111
+ */
112
+ loadModule(taskName: string, modulePath: string, replace?: boolean): Promise<void>;
113
+ /**
114
+ * List the names of all modules currently loaded in a RAPID task.
115
+ *
116
+ * @param taskName - RAPID task name, e.g. 'T_ROB1'
117
+ * @returns Array of module names
118
+ */
119
+ listModules(taskName: string): Promise<string[]>;
120
+ /**
121
+ * Read an I/O signal value.
122
+ *
123
+ * @param network - I/O network name, e.g. 'Local'
124
+ * @param device - I/O device name, e.g. 'DRV_1'
125
+ * @param name - Signal name, e.g. 'DI_1'
126
+ * @returns Signal object with name, value, type, and lvalue
127
+ */
128
+ readSignal(network: string, device: string, name: string): Promise<Signal>;
129
+ /**
130
+ * Write a value to a digital or analog output signal.
131
+ *
132
+ * @param network - I/O network name
133
+ * @param device - I/O device name
134
+ * @param name - Signal name
135
+ * @param value - New signal value, e.g. '1' (DO high), '0' (DO low), '3.14' (AO)
136
+ */
137
+ writeSignal(network: string, device: string, name: string, value: string): Promise<void>;
138
+ /**
139
+ * Subscribe to one or more RWS resource events via WebSocket.
140
+ *
141
+ * @param resources - Resources to subscribe to (execution, controllerstate, signal, etc.)
142
+ * @param handler - Called with each SubscriptionEvent as it arrives
143
+ * @returns - Async unsubscribe function; call to cancel and clean up
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * const unsubscribe = await client.subscribe(['execution'], (event) => {
148
+ * console.log(event.resource, event.value);
149
+ * });
150
+ * // later...
151
+ * await unsubscribe();
152
+ * ```
153
+ */
154
+ subscribe(resources: SubscriptionResource[], handler: (event: SubscriptionEvent) => void): Promise<() => Promise<void>>;
155
+ }
156
+ //# sourceMappingURL=RwsClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RwsClient.d.ts","sourceRoot":"","sources":["../src/RwsClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,MAAM,EACN,SAAS,EACT,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AA2BpB,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAe;gBAE9B,OAAO,EAAE,gBAAgB;IAcrC;;;;;;;OAOG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAU9B;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUjC;;;;;;OAMG;IACG,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAUpD;;;;;OAKG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;IAYhD;;;;OAIG;IACG,sBAAsB,IAAI,OAAO,CAAC,cAAc,CAAC;IAUvD;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAU3C;;;;;;OAMG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBjC;;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