6 #ifndef SWIFT_CORE_AFV_DTO_H
7 #define SWIFT_CORE_AFV_DTO_H
10 #include <QJsonObject>
14 #include "msgpack.hpp"
16 namespace swift::core::afv
37 json[
"hmacKey"] = QString(
hmacKey);
46 dto.
channelTag = json.value(
"channelTag").toString();
47 dto.
aeadReceiveKey = QByteArray::fromBase64(json.value(
"aeadReceiveKey").toString().toLocal8Bit());
48 dto.
aeadTransmitKey = QByteArray::fromBase64(json.value(
"aeadTransmitKey").toString().toLocal8Bit());
49 dto.
hmacKey = QByteArray::fromBase64(json.value(
"hmacKey").toString().toLocal8Bit());
78 dto.
addressIpV4 = json.value(
"addressIpV4").toString();
79 dto.
addressIpV6 = json.value(
"addressIpV6").toString();
146 dto.
id =
static_cast<quint16
>(json.value(
"id").toInt());
147 dto.
frequencyHz =
static_cast<quint32
>(json.value(
"frequency").toInt());
148 dto.
LatDeg = json.value(
"latDeg").toDouble();
149 dto.
LonDeg = json.value(
"lonDeg").toDouble();
150 dto.
HeightMslM = json.value(
"heightMslM").toDouble();
151 dto.
HeightAglM = json.value(
"heightAglM").toDouble();
171 dto.
id = QUuid(json.value(
"id").toString());
172 dto.
name = json.value(
"name").toString();
173 dto.
frequencyHz =
static_cast<quint32
>(json.value(
"frequency").toInt());
174 dto.
frequencyAliasHz =
static_cast<quint32
>(json.value(
"frequencyAlias").toInt());
239 static QByteArray
getDtoName() {
return "AudioTxOnTransceiversDto"; }
259 static QByteArray
getDtoName() {
return "AudioRxOnTransceiversDto"; }
AudioRxOnTransceiversDto.
std::vector< RxTransceiverDto > transceivers
Properties.
bool lastPacket
Properties.
static QByteArray getDtoName()
Names.
uint sequenceCounter
Properties.
static QByteArray getShortDtoName()
Names.
std::string callsign
Properties.
std::vector< char > audio
Properties.
AudioTxOnTransceiversDto.
uint sequenceCounter
Properties.
std::vector< char > audio
Properties.
bool lastPacket
Properties.
std::vector< TxTransceiverDto > transceivers
Properties.
static QByteArray getShortDtoName()
Names.
static QByteArray getDtoName()
Names.
std::string callsign
Properties.
QString channelTag
Properties.
QByteArray aeadReceiveKey
Properties.
QByteArray aeadTransmitKey
Properties.
QJsonObject toJson() const
To JSON.
QByteArray hmacKey
Properties.
static CryptoDtoChannelConfigDto fromJson(const QJsonObject &json)
From JSON.
static QByteArray getDtoName()
Name.
static QByteArray getShortDtoName()
Name.
static QByteArray getShortDtoName()
Name.
std::string callsign
callsign
static QByteArray getDtoName()
Name.
bool lastPacket
Used to indicate to receiver that the sender has stopped sending.
QByteArray audio
Opus compressed audio.
QString callsign
Callsign that audio originates from.
uint sequenceCounter
Receiver optionally uses this in reordering algorithm/gap detection.
QJsonObject toJson() const
To JSON.
VoiceServerConnectionDataDto VoiceServer
Properties.
static PostCallsignResponseDto fromJson(const QJsonObject &json)
From JSON.
float distanceRatio
Properties.
uint32_t frequency
Properties.
quint32 frequencyAliasHz
Properties.
static StationDto fromJson(const QJsonObject &json)
From JSON.
quint32 frequencyHz
Properties.
QJsonObject toJson() const
To JSON.
double HeightMslM
Properties.
double HeightAglM
Properties.
static TransceiverDto fromJson(const QJsonObject &json)
From JSON.
quint32 frequencyHz
Properties.
Transmit transceiver DTO.
TxTransceiverDto(const TransceiverDto &dto)
Ctor.
TxTransceiverDto(uint16_t value)
Ctor.
TxTransceiverDto()=default
Ctor.
QString addressIpV4
Properties.
QJsonObject toJson() const
To JSON.
static VoiceServerConnectionDataDto fromJson(const QJsonObject &json)
From JSON.
CryptoDtoChannelConfigDto channelConfig
Properties.
QString addressIpV6
Properties.