@openrfid/simulator 0.1.0 → 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 +87 -0
- package/package.json +7 -6
package/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/rfidsoftwares/openrfid-simulator/main/assets/logo.svg" alt="OpenRFID Simulator Logo" width="180" />
|
|
4
|
+
|
|
5
|
+
# `@openrfid/simulator`
|
|
6
|
+
|
|
7
|
+
### High-Throughput Tag Inventory Simulation Engine (5,000+ Reads/Sec)
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@openrfid/simulator)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://rfidsoftwares.com)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🚀 Overview
|
|
18
|
+
|
|
19
|
+
`@openrfid/simulator` is the core inventory simulation engine for **OpenRFID Simulator**. It implements a decoupled, high-performance event loop capable of benchmarking **5,000+ RFID tag reads/sec** across multi-reader, multi-antenna setups with configurable read probability distributions, tag movement intervals, and RSSI signal attenuation.
|
|
20
|
+
|
|
21
|
+
Developed & Maintained by **[RFID Software India Private Limited](https://rfidsoftwares.com)**.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📦 Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# npm
|
|
29
|
+
npm install @openrfid/simulator
|
|
30
|
+
|
|
31
|
+
# pnpm
|
|
32
|
+
pnpm add @openrfid/simulator
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 💻 Code Example
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { SimulationEngine } from '@openrfid/simulator';
|
|
41
|
+
import { TagGenerator } from '@openrfid/tags';
|
|
42
|
+
|
|
43
|
+
// Instantiate core simulation engine
|
|
44
|
+
const engine = new SimulationEngine();
|
|
45
|
+
|
|
46
|
+
// Generate 1,000 simulated SGTIN-96 GS1 RFID tags
|
|
47
|
+
const tags = TagGenerator.generatePool({
|
|
48
|
+
count: 1000,
|
|
49
|
+
format: 'sgtin-96',
|
|
50
|
+
companyPrefix: '0614141'
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Load tag inventory into simulation memory
|
|
54
|
+
engine.inventoryManager.loadTags(tags);
|
|
55
|
+
|
|
56
|
+
// Start non-blocking inventory simulation loop
|
|
57
|
+
await engine.start();
|
|
58
|
+
|
|
59
|
+
console.log('Simulation engine running at >5,000 tag reads/sec...');
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 📚 Features
|
|
65
|
+
|
|
66
|
+
* **High-Throughput Scheduler**: Non-blocking asynchronous event loop optimized for bulk tag inventory cycles.
|
|
67
|
+
* **Tag Inventory Manager**: In-memory tag lookup index supporting dynamic insertion, deletion, and tag state transitions.
|
|
68
|
+
* **Simulation Statistics**: Real-time throughput metrics (reads/sec, unique tags detected, antenna distribution).
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 🌐 Monorepo Ecosystem
|
|
73
|
+
|
|
74
|
+
| Package | Description |
|
|
75
|
+
| :--- | :--- |
|
|
76
|
+
| [`@openrfid/core`](https://www.npmjs.com/package/@openrfid/core) | Core EventBus, Config, & SQLite persistence |
|
|
77
|
+
| [`@openrfid/readers`](https://www.npmjs.com/package/@openrfid/readers) | Virtual reader hardware and antenna models |
|
|
78
|
+
| [`@openrfid/tags`](https://www.npmjs.com/package/@openrfid/tags) | RFID tag domain models & memory generator |
|
|
79
|
+
| [`@openrfid/plugin-api`](https://www.npmjs.com/package/@openrfid/plugin-api) | Plugin sandbox and lifecycle interfaces |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 📄 License & Corporate Support
|
|
84
|
+
|
|
85
|
+
Licensed under the **MIT License**.
|
|
86
|
+
Brought to you by **RFID Software India Private Limited**.
|
|
87
|
+
For enterprise RFID middleware, hardware drivers, or custom protocol plugins, visit **[rfidsoftwares.com](https://rfidsoftwares.com)**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrfid/simulator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Core RFID inventory engine, read cycle loops, read probability model, and event pipeline.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
17
18
|
],
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"@openrfid/core": "
|
|
20
|
-
"@openrfid/
|
|
21
|
-
"@openrfid/
|
|
22
|
-
"@openrfid/
|
|
20
|
+
"@openrfid/core": "1.0.0",
|
|
21
|
+
"@openrfid/readers": "1.0.0",
|
|
22
|
+
"@openrfid/tags": "1.0.0",
|
|
23
|
+
"@openrfid/utils": "1.0.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"tsup": "^8.0.2",
|