flatudp: the source, kind, mock sender and stream probes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e8e71b32f
commit
78a29fbc39
13 files changed
+962
-7
No files matched your search
@@ -135,6 +135,25 @@ python3 tools/mock_e1608.py --port 54711 &
|
||||
--source-opt ai0=BIP10V --source-opt ai1=BIP5V --source-opt plot0=1
|
||||
```
|
||||
|
||||
`--source flatudp` receives the MARTe2 `UDPSender` datasource (one datagram per cycle: the signals
|
||||
concatenated in declaration order, no header, no padding). The datagram carries **no description**, so the
|
||||
settings are the whole contract: `port` 44488, `bind`, `multicast` and `iface` (a group to join and the local
|
||||
interface for it), `rate` (the sender's cycle rate in Hz; **required**, it sizes the ring and the ingest
|
||||
decimation and spaces the samples within a frame), `endian` `little|big`, and `signals`
|
||||
`name:type[count],...` with types `uint8/16/32/64`, `int8/16/32/64`, `float32`, `float64` (a count above 1
|
||||
makes a vector signal: one channel whose `count` values per datagram are consecutive samples, as a UDPStreamer
|
||||
block signal), e.g. `Trigger:uint8,Ia:float32,Wave:float32[16]`. A datagram of any other size than
|
||||
the list implies is dropped and counted as stale; each distinct wrong size is reported once on stderr as
|
||||
`[flatudp] ...`. Loss is never reported: the stream has no counter. `tools/mock_flatudp.py` is a sender for
|
||||
a signal spec (`--rate`, `--signals`, `--big-endian`, `--gap S,D`, `--bad-every S`, `--multicast G --mcast-if A`,
|
||||
`--log FILE`).
|
||||
|
||||
```sh
|
||||
python3 tools/mock_flatudp.py --port 44588 --rate 1000 --signals Trigger:uint8,Ia:float32,Wave:int16[4] &
|
||||
./build/udpscope --source flatudp --source-opt port=44588 --source-opt rate=1000 \
|
||||
--source-opt signals=Trigger:uint8,Ia:float32,Wave:int16[4]
|
||||
```
|
||||
|
||||
`tools/mock_udpstreamer.py` has waveform-injection options used by the probes:
|
||||
|
||||
- `--square-harmonics N` shapes `square`: `N` odd harmonics of the ideal step's Fourier
|
||||
|
||||
Reference in new issue
Block a user