@synapticon/motion-master-client 6.0.0-alpha.97 → 6.0.0-alpha.98
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/generated/Api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlStatusCode, AutoTuningError, AutoTuningRunRequest, AutoTuningRunResponse, AutoTuningStatus, BrakeState, Cia402Status, DcSyncStatus, DeviceDiagnostics, DeviceFile, DeviceParameter, Encoders, EscRegister, EsiParseResult, FirmwareCompatibility, FirmwarePackageName, FoeErrorCode, GameLoopHealth, HardwareDescription, HrdRecording, IntegroVariant, IntegroVariantOption, MailboxErrorCode, Monitoring, ObjectDataTypeInfo, OperationModes, OutputStageResult, ParameterCacheEntry, ParameterValue, PdoMapping, PdoMappingRequest, ProcedureListing, ProcedureRequest, ProcedureSnapshot, ProcessDataWatchdog, ProcessImageObject, SdoAbortCode, SlaveConfig, SlaveInformationInterface, UserCacheListing } from "./data-contracts.js";
|
|
1
|
+
import { AlStatusCode, AutoTuningError, AutoTuningRunRequest, AutoTuningRunResponse, AutoTuningStatus, BrakeState, CaptureSummary, Cia402Status, DcSyncStatus, DeviceDiagnostics, DeviceFile, DeviceParameter, Encoders, EscRegister, EsiParseResult, FirmwareCompatibility, FirmwarePackageName, FoeErrorCode, GameLoopHealth, HardwareDescription, HrdRecording, IntegroVariant, IntegroVariantOption, MailboxErrorCode, Monitoring, ObjectDataTypeInfo, OperationModes, OutputStageResult, ParameterCacheEntry, ParameterValue, PdoMapping, PdoMappingRequest, ProcedureListing, ProcedureRequest, ProcedureSnapshot, ProcessDataWatchdog, ProcessImageObject, SdoAbortCode, SlaveConfig, SlaveInformationInterface, UserCacheListing } from "./data-contracts.js";
|
|
2
2
|
import { HttpClient, RequestParams } from "./http-client.js";
|
|
3
3
|
export declare class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
4
4
|
/**
|
|
@@ -1320,6 +1320,54 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
1320
1320
|
*/
|
|
1321
1321
|
error: string;
|
|
1322
1322
|
}>>;
|
|
1323
|
+
/**
|
|
1324
|
+
* @description Runs the capture program `motion-master-capture`, which ships beside the server binary, on the adapter the bus is on, waits for it to exit, and answers the summary. The program records every EtherCAT frame that leaves or enters the adapter with a kernel timestamp and writes them as a pcap file under `captures/` in the user cache, so the file is listed, downloaded and deleted through the `/api/user-cache` routes and opens in Wireshark. The summary matches each frame the master sent to the frame that came back for it, by the index and the header of its first datagram, and reports per kind of frame how late the returns were. The cyclic process-data frame is one kind; mailbox and register datagrams, the control plane, are the other. The bands are the three waits the driver uses, 2 ms, 20 ms and 100 ms, and they are cumulative: a frame later than 100 ms counts in all three. A frame sent again with the same index and header while its first copy had no answer counts once, as `resent`, and its return is timed from the first copy. The time is the kernel's, taken at the boundary to the NIC driver on both sides: when the frame is handed to the driver, and when the driver hands its return back. So the number covers the NIC, the wire and the device, and not the host's own queues and scheduling between that boundary and Motion Master. A capture that shows late frames puts the delay on the wire or in the device. A clean capture beside the server's own warnings, "mailbox write(s) got no frame back", puts it inside the host. Read the two together. One capture at a time. The capture adds no frame to the bus and runs on a thread of its own, so the bus is not touched. The program needs `CAP_NET_RAW`, which the packages grant it at install.
|
|
1325
|
+
*
|
|
1326
|
+
* @name RunCapture
|
|
1327
|
+
* @summary Record the EtherCAT frames of the bus adapter for a number of seconds
|
|
1328
|
+
* @request POST:/api/captures
|
|
1329
|
+
*/
|
|
1330
|
+
runCapture: (data?: {
|
|
1331
|
+
/**
|
|
1332
|
+
* How long to record. A capture is a measurement a person starts.
|
|
1333
|
+
* @min 1
|
|
1334
|
+
* @max 120
|
|
1335
|
+
* @default 30
|
|
1336
|
+
*/
|
|
1337
|
+
seconds?: number;
|
|
1338
|
+
/**
|
|
1339
|
+
* The adapter to record, when no bus is up. Defaults to the adapter of the bus.
|
|
1340
|
+
* @example "enp0s13f0u1u2"
|
|
1341
|
+
*/
|
|
1342
|
+
adapter?: string;
|
|
1343
|
+
}, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<{
|
|
1344
|
+
/**
|
|
1345
|
+
* The pcap file, relative to the user-cache root
|
|
1346
|
+
* @example "captures/capture-20261022-143005-enp0s13f0u1u2.pcap"
|
|
1347
|
+
*/
|
|
1348
|
+
path: string;
|
|
1349
|
+
/** @example "enp0s13f0u1u2" */
|
|
1350
|
+
adapter: string;
|
|
1351
|
+
/** @example 30 */
|
|
1352
|
+
seconds: number;
|
|
1353
|
+
/** How late the frames of a capture came back. See `POST /api/captures`. */
|
|
1354
|
+
summary: CaptureSummary;
|
|
1355
|
+
}, void | {
|
|
1356
|
+
error: string;
|
|
1357
|
+
}>>;
|
|
1358
|
+
/**
|
|
1359
|
+
* @description Reads `captures/{name}` from the user cache and answers the summary that `POST /api/captures` answers, over any Ethernet pcap: a file the server recorded, or one from `tcpdump` on another host that a user put into `captures/` with `PUT /api/user-cache/captures/{name}`. Microsecond and nanosecond timestamps and both byte orders are read.
|
|
1360
|
+
*
|
|
1361
|
+
* @name GetCaptureSummary
|
|
1362
|
+
* @summary Summarise a pcap file in the user cache
|
|
1363
|
+
* @request GET:/api/captures/{name}
|
|
1364
|
+
*/
|
|
1365
|
+
getCaptureSummary: (name: string, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<{
|
|
1366
|
+
/** @example "captures/capture-20261022-143005-enp0s13f0u1u2.pcap" */
|
|
1367
|
+
path: string;
|
|
1368
|
+
/** How late the frames of a capture came back. See `POST /api/captures`. */
|
|
1369
|
+
summary: CaptureSummary;
|
|
1370
|
+
}, void>>;
|
|
1323
1371
|
/**
|
|
1324
1372
|
* @description Reads the current EtherCAT Application Layer state for one or more devices. Omit the `positions` query parameter to query all discovered devices.
|
|
1325
1373
|
*
|
package/dist/generated/Api.js
CHANGED
|
@@ -972,6 +972,34 @@ export class Api extends HttpClient {
|
|
|
972
972
|
format: "json",
|
|
973
973
|
...params,
|
|
974
974
|
});
|
|
975
|
+
/**
|
|
976
|
+
* @description Runs the capture program `motion-master-capture`, which ships beside the server binary, on the adapter the bus is on, waits for it to exit, and answers the summary. The program records every EtherCAT frame that leaves or enters the adapter with a kernel timestamp and writes them as a pcap file under `captures/` in the user cache, so the file is listed, downloaded and deleted through the `/api/user-cache` routes and opens in Wireshark. The summary matches each frame the master sent to the frame that came back for it, by the index and the header of its first datagram, and reports per kind of frame how late the returns were. The cyclic process-data frame is one kind; mailbox and register datagrams, the control plane, are the other. The bands are the three waits the driver uses, 2 ms, 20 ms and 100 ms, and they are cumulative: a frame later than 100 ms counts in all three. A frame sent again with the same index and header while its first copy had no answer counts once, as `resent`, and its return is timed from the first copy. The time is the kernel's, taken at the boundary to the NIC driver on both sides: when the frame is handed to the driver, and when the driver hands its return back. So the number covers the NIC, the wire and the device, and not the host's own queues and scheduling between that boundary and Motion Master. A capture that shows late frames puts the delay on the wire or in the device. A clean capture beside the server's own warnings, "mailbox write(s) got no frame back", puts it inside the host. Read the two together. One capture at a time. The capture adds no frame to the bus and runs on a thread of its own, so the bus is not touched. The program needs `CAP_NET_RAW`, which the packages grant it at install.
|
|
977
|
+
*
|
|
978
|
+
* @name RunCapture
|
|
979
|
+
* @summary Record the EtherCAT frames of the bus adapter for a number of seconds
|
|
980
|
+
* @request POST:/api/captures
|
|
981
|
+
*/
|
|
982
|
+
runCapture = (data, params = {}) => this.request({
|
|
983
|
+
path: `/api/captures`,
|
|
984
|
+
method: "POST",
|
|
985
|
+
body: data,
|
|
986
|
+
type: ContentType.Json,
|
|
987
|
+
format: "json",
|
|
988
|
+
...params,
|
|
989
|
+
});
|
|
990
|
+
/**
|
|
991
|
+
* @description Reads `captures/{name}` from the user cache and answers the summary that `POST /api/captures` answers, over any Ethernet pcap: a file the server recorded, or one from `tcpdump` on another host that a user put into `captures/` with `PUT /api/user-cache/captures/{name}`. Microsecond and nanosecond timestamps and both byte orders are read.
|
|
992
|
+
*
|
|
993
|
+
* @name GetCaptureSummary
|
|
994
|
+
* @summary Summarise a pcap file in the user cache
|
|
995
|
+
* @request GET:/api/captures/{name}
|
|
996
|
+
*/
|
|
997
|
+
getCaptureSummary = (name, params = {}) => this.request({
|
|
998
|
+
path: `/api/captures/${name}`,
|
|
999
|
+
method: "GET",
|
|
1000
|
+
format: "json",
|
|
1001
|
+
...params,
|
|
1002
|
+
});
|
|
975
1003
|
/**
|
|
976
1004
|
* @description Reads the current EtherCAT Application Layer state for one or more devices. Omit the `positions` query parameter to query all discovered devices.
|
|
977
1005
|
*
|
|
@@ -1420,6 +1420,84 @@ export interface DcSyncStatus {
|
|
|
1420
1420
|
*/
|
|
1421
1421
|
systemTimeDifference: number;
|
|
1422
1422
|
}
|
|
1423
|
+
/** The counts for one kind of frame. The bands are cumulative. */
|
|
1424
|
+
export interface CaptureKindSummary {
|
|
1425
|
+
/**
|
|
1426
|
+
* Frames the master sent. A frame sent again counts once.
|
|
1427
|
+
* @example 60021
|
|
1428
|
+
*/
|
|
1429
|
+
sent: number;
|
|
1430
|
+
/**
|
|
1431
|
+
* Frames sent again with the same index and header while the first copy had no answer yet. A register datagram goes out again every 2 ms, so a late one shows here too.
|
|
1432
|
+
* @example 12
|
|
1433
|
+
*/
|
|
1434
|
+
resent: number;
|
|
1435
|
+
/**
|
|
1436
|
+
* Sent frames that came back
|
|
1437
|
+
* @example 60018
|
|
1438
|
+
*/
|
|
1439
|
+
returned: number;
|
|
1440
|
+
/**
|
|
1441
|
+
* Sent frames with no return before the capture ended
|
|
1442
|
+
* @example 3
|
|
1443
|
+
*/
|
|
1444
|
+
lost: number;
|
|
1445
|
+
/**
|
|
1446
|
+
* Returns later than 2 ms after the first send
|
|
1447
|
+
* @example 1210
|
|
1448
|
+
*/
|
|
1449
|
+
over2Ms: number;
|
|
1450
|
+
/**
|
|
1451
|
+
* Returns later than 20 ms. Counted in over2Ms as well.
|
|
1452
|
+
* @example 1198
|
|
1453
|
+
*/
|
|
1454
|
+
over20Ms: number;
|
|
1455
|
+
/**
|
|
1456
|
+
* Returns later than 100 ms. Counted in the two above as well.
|
|
1457
|
+
* @example 1195
|
|
1458
|
+
*/
|
|
1459
|
+
over100Ms: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* The latest return, in microseconds after its first send
|
|
1462
|
+
* @format int64
|
|
1463
|
+
* @example 221748
|
|
1464
|
+
*/
|
|
1465
|
+
latestUs: number;
|
|
1466
|
+
}
|
|
1467
|
+
/** How late the frames of a capture came back. See `POST /api/captures`. */
|
|
1468
|
+
export interface CaptureSummary {
|
|
1469
|
+
/**
|
|
1470
|
+
* Every record in the capture
|
|
1471
|
+
* @example 120050
|
|
1472
|
+
*/
|
|
1473
|
+
frames: number;
|
|
1474
|
+
/**
|
|
1475
|
+
* Records that are not an EtherCAT command frame
|
|
1476
|
+
* @example 0
|
|
1477
|
+
*/
|
|
1478
|
+
notEtherCat: number;
|
|
1479
|
+
/**
|
|
1480
|
+
* Frames from the slaves with no send to match, such as the second answer to a frame sent twice
|
|
1481
|
+
* @example 8
|
|
1482
|
+
*/
|
|
1483
|
+
unmatchedReturns: number;
|
|
1484
|
+
/**
|
|
1485
|
+
* Timestamp of the first record, epoch microseconds
|
|
1486
|
+
* @format int64
|
|
1487
|
+
* @example 1761143405000123
|
|
1488
|
+
*/
|
|
1489
|
+
firstUs: number;
|
|
1490
|
+
/**
|
|
1491
|
+
* Timestamp of the last record, epoch microseconds
|
|
1492
|
+
* @format int64
|
|
1493
|
+
* @example 1761143435000456
|
|
1494
|
+
*/
|
|
1495
|
+
lastUs: number;
|
|
1496
|
+
/** The counts for one kind of frame. The bands are cumulative. */
|
|
1497
|
+
control: CaptureKindSummary;
|
|
1498
|
+
/** The counts for one kind of frame. The bands are cumulative. */
|
|
1499
|
+
cyclic: CaptureKindSummary;
|
|
1500
|
+
}
|
|
1423
1501
|
export interface AlStatusCode {
|
|
1424
1502
|
/**
|
|
1425
1503
|
* AL Status Code value (ETG.1000.6 §6.4.1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synapticon/motion-master-client",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.98",
|
|
4
4
|
"description": "Isomorphic TypeScript client for Motion Master: the generated HTTP API client, the WebSocket connection, and helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|