SimTX API/Packets/IqStreamDescriptor
Appearance
| Frame | ServerFrame, field 11
|
|---|---|
| Member | iq_descriptor
|
| Direction | Server → client |
| Session | Receiver |
| Roles | ROLE_RECEIVER.
|
| Permission | None |
| Answers | ReceiverStart |
| Defined in | session.proto
|
IqStreamDescriptor states the parameters of the IQ stream a receiver is about to get. The server sends it once, after SessionStatus BOUND and before the first IqBlock. Its values are authoritative and may differ from the request.
Definition
message IqStreamDescriptor {
int32 sample_rate = 1; // complex samples per second
double center_frequency_hz = 2;
int32 chunk_samples = 3; // complex samples per IqBlock
SampleFormat sample_format = 4;
bool timestamped = 5;
}
Fields
| # | Field | Type | Description |
|---|---|---|---|
| 1 | sample_rate |
int32 |
Negotiated sample rate, complex samples per second. |
| 2 | center_frequency_hz |
double |
Centre frequency in Hz. |
| 3 | chunk_samples |
int32 |
Complex samples in every following IqBlock. |
| 4 | sample_format |
SampleFormat | Format of IqBlock.samples.
|
| 5 | timestamped |
bool |
True when every IqBlock carries a first-sample timestamp. |
Usage
- Size buffers from
chunk_samplesandsample_format: each IqBlock carries exactlychunk_samples × 2 × bytesPerComponentsample bytes, wherebytesPerComponentis 2 forINT16and 1 forINT8. - No second descriptor is sent after a ReceiverRetune. Track the frequency from the retune confirmations.
Example
Complete frames, including the varint length prefix, from the protocol's golden test vectors (protocol/simtx/v25/testdata/frames.json).
iq_descriptor_timestamped (server to client, 21 bytes):
14 frame length 20
5A 12 iq_descriptor (IqStreamDescriptor), 18 bytes
08 80 F7 02 sample_rate = 48000
11 00 00 00 00 34 FC 5A 41 center_frequency_hz = 7074000.0
18 80 20 chunk_samples = 4096
28 01 timestamped = true