SimTX API/Packets/TxUpdateAck
Appearance
| Frame | ServerFrame, field 18
|
|---|---|
| Member | tx_update_ack
|
| Direction | Server → client |
| Session | Transmitter |
| Roles | ROLE_TX_AUDIO, ROLE_TX_GENERATED.
|
| Permission | None |
| Answers | TxUpdate |
| Defined in | session.proto
|
TxUpdateAck reports the outcome of a TxUpdate, one result per field that was set.
Definition[edit | edit source]
message TxUpdateAck {
message Result {
TxLiveField field = 1;
bool accepted = 2;
double applied_value = 3;
}
int64 request_id = 1;
repeated Result results = 2;
}
Fields[edit | edit source]
| # | Field | Type | Description |
|---|---|---|---|
| 1 | request_id |
int64 |
The update's request_id.
|
| 2 | results |
repeated Result |
One result per field of the update. |
Result[edit | edit source]
| # | Field | Type | Description |
|---|---|---|---|
| 1 | field |
TxLiveField | The live field. TX_LIVE_FIELD_UNSPECIFIED or an unknown value names a field this client does not know; ignore that result.
|
| 2 | accepted |
bool |
True if the value was applied or was already in effect. |
| 3 | applied_value |
double |
The value now in effect, after clamping and the PA cap. For a refused field, the current unchanged value. |
Live fields[edit | edit source]
| Value | Name | Meaning |
|---|---|---|
| 0 | TX_LIVE_FIELD_UNSPECIFIED |
In a TxUpdateAck result, like an unknown value: a field this client does not know. Ignore that result. |
| 1 | TX_LIVE_FIELD_FREQUENCY |
frequency_hz
|
| 2 | TX_LIVE_FIELD_POWER |
power_watts
|
| 3 | TX_LIVE_FIELD_BANDWIDTH |
bandwidth_hz
|
| 4 | TX_LIVE_FIELD_LOW_CUT |
audio_low_cut_hz
|
| 5 | TX_LIVE_FIELD_FINAL_DRIVE |
final_drive_db
|
| 6 | TX_LIVE_FIELD_PA_HEADROOM |
pa_headroom_db
|
| 7 | TX_LIVE_FIELD_AUDIO_COMPRESSION |
audio_compression_db
|
| 8 | TX_LIVE_FIELD_AUDIO_GAIN |
audio_gain
|
Interpreting results[edit | edit source]
| Situation | accepted |
applied_value
|
|---|---|---|
| Applied | true | The value now in effect, after clamping and the PA cap. |
| Value already in effect | true | The current value. |
| Refused (out of range or too soon) | false | The current, unchanged value. |
Always update the user interface from applied_value, not from the value that was requested. A power request of 1,500 W with a 400 W PA cap is accepted with applied_value = 400. A server that does not know a field ignores it and returns no result for it.
Example[edit | edit source]
Complete frames, including the varint length prefix.
tx_update_ack (server to client, 34 bytes):
21 frame length 33
92 01 1E tx_update_ack (TxUpdateAck), 30 bytes
08 07 request_id = 7
12 0D results (Result), 13 bytes
08 01 field = 1 (TX_LIVE_FIELD_FREQUENCY)
10 01 accepted = true
19 00 00 00 20 A6 E9 5A 41 applied_value = 7055000.5
12 0B results (Result), 11 bytes
08 02 field = 2 (TX_LIVE_FIELD_POWER)
19 00 00 00 00 00 00 39 40 applied_value = 25.0