matlab/matlab-agentic-toolkit / skills-catalog/wireless-communications/matlab-simulate-wireless-network
matlab-simulate-wireless-network
VerifiedSet up and run wireless network simulations using the Wireless Network Toolbox. Use this skill when creating system-level simulations with wirelessNetworkSimulator, adding traffic sources (networkTrafficOnOff, networkTrafficFTP, networkTrafficVoIP, networkTrafficVideoConference), configuring node mobility, logging events or IQ samples, visualizing traffic, scheduling actions during simulation, running parametric sweeps, writing PCAP files with pcapWriter or technology-specific PCAP writers, registering event callbacks on wireless nodes, accessing event data fields, or combining multiple capture/visualization tools in a simulation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.7 KB |
| manifest.yaml | config | 456 B |
| references/bluetooth-capture.md | markdown | 4.8 KB |
| references/custom-node.md | markdown | 10.9 KB |
| references/event-tracing-iq-logging.md | markdown | 3.1 KB |
| references/mobility-models.md | markdown | 2.4 KB |
| references/parametric-sweep-pattern.md | markdown | 2.1 KB |
| references/traffic-models.md | markdown | 2.9 KB |
references/event-tracing-iq-logging.md
View on GitHub# Event Tracing, IQ Logging, and Traffic Visualization
Must be created **before** `run()`.
| Tool | Custom `wnet.Node` | Technology nodes (BLE, BR/EDR, WLAN, NR) |
|------|--------------------|-----------------------------------------|
| `wirelessNetworkEventTracer` | Supported — uses `registerEventCallback` on the node (must be overridden in custom node) | Supported |
| `wirelessIQLogger` | **Not supported** — technology nodes only | Supported |
| `wirelessTrafficViewer` | **Not supported** — technology nodes only | Supported |
For custom node implementation details, see `references/custom-node.md`.
## wirelessNetworkEventTracer
```matlab
eventTracer = wirelessNetworkEventTracer(FileName="sim_events.mat");
addNodes(eventTracer, nodes, EventName=["TransmissionStarted", "ReceptionEnded"]);
```
**How it works:** `addNodes` calls `registerEventCallback` on each node for each specified `EventName`. For technology nodes, this works automatically. For custom `wnet.Node` subclasses, your node's `registerEventCallback` override must support the event names you pass to `addNodes` — the tracer registers its internal logging callback via `registerEventCallback`, and your node must store and fire it at the appropriate points (see `references/custom-node.md` for the full pattern).
**Valid events for technology nodes:** `"TransmissionStarted"`, `"ReceptionEnded"`, `"AppPacketGenerated"`.
**Valid events for custom nodes:** Any event name string that your custom node's `registerEventCallback` override stores and that your node fires via the stored callback (e.g., from `run()` for transmission events, from `pushReceivedPacket()` for reception events). The event names are not restricted to the technology-node list — they can be any string your node supports.
Reading with filters:
```matlab
events = read(eventTracer);
txEvents = read(eventTracer, EventName="TransmissionStarted");
nodeEvents = read(eventTracer, NodeName="AP1");
timeWindow = read(eventTracer, TimeRange=[0.1, 0.3]);
```
Each event struct: `EventName`, `NodeName`, `NodeID`, `Timestamp`, `TechnologyType`, `EventData` (technology-specific nested payload).
**Note:** Errors if MAT file already exists — use unique names for repeated runs.
## wirelessIQLogger
```matlab
iqLogger = wirelessIQLogger(receiverNodes, FileName="iq_data.mat");
iqLogger = wirelessIQLogger(nodes(1:2), FileName=["iq_node1.mat", "iq_node2.mat"]);
```
Nodes fixed at construction. Output MAT contains: `Waveform` (complex single N×1), `Fs` (Hz), `Metadata`.
## wirelessTrafficViewer
Real-time state transitions and channel occupancy. Properties: `ViewType` (`"all"`, `"state-transition-plot"`, `"channel-occupancy-plot"`), `RefreshRate` (0–1000 Hz, default 100).
```matlab
viewer = wirelessTrafficViewer;
addNodes(viewer, nodes);
```
## Decision Guide
| Need | Tool |
|------|------|
| Post-hoc event analysis | `wirelessNetworkEventTracer` |
| Real-time protocol debugging | `wirelessTrafficViewer` |
| PHY-level signal analysis | `wirelessIQLogger` |
| Custom per-packet logic | `registerEventCallback` |
Prefer `wirelessNetworkEventTracer` over manual callbacks for logging.
<!-- Copyright 2026 The MathWorks, Inc. -->
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |