linuxcnc-grpc 1.0.0-beta.4 → 1.0.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/README.md +72 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!-- AUTO-GENERATED from root README.md — do not edit directly -->
|
|
2
|
+
<!-- Regenerate with: ./scripts/generate-package-readmes.sh -->
|
|
3
|
+
|
|
4
|
+
# linuxcnc-grpc
|
|
5
|
+
|
|
6
|
+
[](https://pypi.org/project/linuxcnc-grpc/)
|
|
7
|
+
[](https://www.npmjs.com/package/linuxcnc-grpc)
|
|
8
|
+
[](https://crates.io/crates/linuxcnc-grpc)
|
|
9
|
+
[](https://pkg.go.dev/github.com/dougcalobrisi/linuxcnc-grpc)
|
|
10
|
+
|
|
11
|
+
gRPC interface for LinuxCNC machine control and HAL (Hardware Abstraction Layer).
|
|
12
|
+
|
|
13
|
+
## Why gRPC?
|
|
14
|
+
|
|
15
|
+
LinuxCNC's native Python API only works locally. This project exposes it over gRPC, enabling:
|
|
16
|
+
|
|
17
|
+
- **Remote monitoring** - Build web dashboards, mobile apps, or desktop GUIs
|
|
18
|
+
- **Multi-machine management** - Monitor a fleet of CNC machines from one place
|
|
19
|
+
- **Any-language integration** - Use Go, Node.js, Rust, or any gRPC-supported language
|
|
20
|
+
- **Real-time streaming** - Subscribe to status updates instead of polling
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install linuxcnc-grpc
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> [npm package](https://www.npmjs.com/package/linuxcnc-grpc)
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import * as grpc from "@grpc/grpc-js";
|
|
32
|
+
import { LinuxCNCServiceClient, GetStatusRequest } from "linuxcnc-grpc";
|
|
33
|
+
|
|
34
|
+
const client = new LinuxCNCServiceClient("localhost:50051", grpc.credentials.createInsecure());
|
|
35
|
+
|
|
36
|
+
client.getStatus(GetStatusRequest.create(), (err, status) => {
|
|
37
|
+
console.log(`Position: X=${status.position.x.toFixed(3)} Y=${status.position.y.toFixed(3)}`);
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
See the [examples directory](https://github.com/dougcalobrisi/linuxcnc-grpc/blob/main/examples/node) for complete Node.js/TypeScript examples:
|
|
44
|
+
|
|
45
|
+
- `get_status` — Poll machine status
|
|
46
|
+
- `stream_status` — Real-time status streaming
|
|
47
|
+
- `jog_axis` — Jog axes with keyboard
|
|
48
|
+
- `mdi_command` — Execute G-code via MDI
|
|
49
|
+
- `hal_query` — Query HAL pins/signals
|
|
50
|
+
- `upload_file` — Upload, list, delete G-code files
|
|
51
|
+
|
|
52
|
+
## Services
|
|
53
|
+
|
|
54
|
+
- **LinuxCNCService** — Machine control: status, jogging, MDI, program execution, file management
|
|
55
|
+
- **HalService** — HAL introspection: query pins, signals, parameters (read-only)
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
See the [full documentation](https://github.com/dougcalobrisi/linuxcnc-grpc/blob/main/docs) for server setup, API reference, and tutorials.
|
|
60
|
+
|
|
61
|
+
## Safety Warning
|
|
62
|
+
|
|
63
|
+
This package communicates with a gRPC server that controls real CNC machinery. Ensure proper safety measures:
|
|
64
|
+
|
|
65
|
+
- Use only on trusted networks
|
|
66
|
+
- Implement authentication in production (gRPC supports TLS/mTLS)
|
|
67
|
+
- Never leave machines unattended during remote operation
|
|
68
|
+
- Verify E-stop and safety systems are functional
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
[MIT](https://github.com/dougcalobrisi/linuxcnc-grpc/blob/main/LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linuxcnc-grpc",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "TypeScript/JavaScript gRPC client for LinuxCNC machine control and HAL",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"hal",
|
|
31
31
|
"typescript"
|
|
32
32
|
],
|
|
33
|
-
"author": "",
|
|
33
|
+
"author": "Doug Calobrisi",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|