SimTX API v24/Packets/IqBlock
Appearance
| Packet ID | 2(0x02)
|
|---|---|
| Direction | Server → client |
| Session | Receiver |
| Body size | 8 + chunkSamples × 4 bytes (INT16) |
| Permission | None |
IqBlock carries one block of received complex baseband samples. A receiver session with role 1 receives a continuous stream of them after the IqStreamDescriptor, at the rate of the simulation. Role 6 receives TimedIqBlock instead.
Layout[edit | edit source]
| Field | Type | Description |
|---|---|---|
packetId |
u8 |
Always 2.
|
payloadLength |
i32 |
Length of the payload in bytes. At most 1 MiB. |
blockScale |
f32 |
First 4 bytes of the payload. Scale factor for this block. |
samples |
chunkSamples × (I, Q) |
Remainder of the payload. Interleaved I and Q integers: i16 each for INT16, i8 each for INT8.
|
Decoding[edit | edit source]
I = i_raw × blockScale / 32767 (INT16; use 127 for INT8)
Q = q_raw × blockScale / 32767
- A client should check that
payloadLengthequals4 + chunkSamples × 2 × bytesPerComponentand treat anything else as a protocol error. blockScaleis the block's peak component magnitude, at least 10−9. The server quantises each component asround(x × 32767 / blockScale).- A magnitude of 1.0 corresponds to −12 dBm at the receiver input. Components are clipped at ±1.0 before quantisation, so strong signals overload the receiver.
Delivery[edit | edit source]
- Blocks are sent in real time. The server queues at most 8 blocks per connection and drops the oldest when the queue is full. Missing blocks are not marked; a client that needs to detect gaps should use role 6 and its timestamps.
- A client that does not read for 5 seconds is disconnected.