50 if (topObj.contains(
"protocol"))
52 QJsonObject obj2110 = topObj[
"protocol"].toObject();
56 if (topObj.contains(
"network2110"))
58 QJsonObject obj2110 = topObj[
"network2110"].toObject();
62 if (topObj.contains(
"receiveVideo2110"))
64 QJsonArray receiveVideoArray = topObj[
"receiveVideo2110"].toArray();
68 if (topObj.contains(
"receiveAudio2110"))
70 QJsonArray receiveAudioArray = topObj[
"receiveAudio2110"].toArray();
74 if (topObj.contains(
"receiveAnc2110"))
76 QJsonArray receiveAncArray = topObj[
"receiveAnc2110"].toArray();
80 if (topObj.contains(
"transmitVideo2110"))
82 QJsonArray transmitVideoArray = topObj[
"transmitVideo2110"].toArray();
86 if (topObj.contains(
"transmitAudio2110"))
88 QJsonArray transmitAudioArray = topObj[
"transmitAudio2110"].toArray();
92 if (topObj.contains(
"transmitAnc2110"))
94 QJsonArray transmitAncArray = topObj[
"transmitAnc2110"].toArray();
98 QJsonObject newTopObj;
100 newTopObj.insert(
"network2110",
m_netJson);
218 return (enableBoolString ==
"true");
233 if (samplingString ==
"RGB")
259 if (channelString ==
"channel1")
261 else if (channelString ==
"channel2")
263 else if (channelString ==
"channel3")
265 else if (channelString ==
"channel4")
295 if (sfpString ==
"sfp1")
297 else if (sfpString ==
"sfp2")
311 else if (sfp ==
SFP_2)
323 if (streamString ==
"video1")
325 else if (streamString ==
"video2")
327 else if (streamString ==
"video3")
329 else if (streamString ==
"video4")
359 if (streamString ==
"audio1")
361 else if (streamString ==
"audio2")
363 else if (streamString ==
"audio3")
365 else if (streamString ==
"audio4")
395 if (streamString ==
"anc1")
397 else if (streamString ==
"anc2")
399 else if (streamString ==
"anc3")
401 else if (streamString ==
"anc4")
431 if (pktIntervalString ==
"1000us")
433 else if (pktIntervalString ==
"125us")
457 QString idstr = QString::fromStdString(str);
458 for (
int i=0; i<8; i++)
465 if (idstr.contains(
'-') || idstr.contains(
':'))
467 QByteArray vals = QByteArray::fromHex(idstr.toLatin1());
468 if (vals.size() == 8)
470 for (
int i=0; i<8; i++)
482 sprintf(buf,
"%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X",
483 id[0],
id[1],
id[2],
id[3],
id[4],
id[5],
id[6],
id[7]);
492 std::cout <<
"Network2110" << std::endl;
494 n2110.
ptpDomain = topObj[
"ptpDomain"].toInt();
497 str = topObj[
"ptpPreferredGMID"].toString().toStdString();
498 if (
m_verbose) std::cout <<
" ptpPreferredGMID " << str.c_str() << std::endl;
501 str = topObj[
"setup4k"].toString().toStdString();
502 if (
m_verbose) std::cout <<
" setup4k " << str.c_str() << std::endl;
505 str = topObj[
"multiSDP"].toString().toStdString();
506 if (
m_verbose) std::cout <<
" multiSDP " << str.c_str() << std::endl;
509 str = topObj[
"audioCombine"].toString().toStdString();
510 if (
m_verbose) std::cout <<
" audioCombine " << str.c_str() << std::endl;
517 QJsonArray sfpArray = topObj[
"sfps"].toArray();
522 for (uint32_t i=0; i<n2110.
numSFPs; i++)
524 if (
m_verbose) std::cout <<
" SFP " << i << std::endl;
526 QJsonObject sfpObj = sfpArray[i].toObject();
528 str = sfpObj[
"designator"].toString().toStdString();
529 if (
m_verbose) std::cout <<
" designator " << str.c_str() << std::endl;
532 str = sfpObj[
"ipAddress"].toString().toStdString();
533 if (
m_verbose) std::cout <<
" ipAddress " << str.c_str() << std::endl;
536 str = sfpObj[
"subnetMask"].toString().toStdString();
537 if (
m_verbose) std::cout <<
" subnetMask " << str.c_str() << std::endl;
540 str = sfpObj[
"gateWay"].toString().toStdString();
541 if (
m_verbose) std::cout <<
" gateWay " << str.c_str() << std::endl;
544 str = sfpObj[
"enable"].toString().toStdString();
545 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl << std::endl;
554 topObj.insert(
"ptpDomain", QJsonValue((
int)n2110.
ptpDomain));
563 topObj.insert(
"rxMatchOverride", QJsonValue((
int)n2110.
rxMatchOverride));
567 for (uint32_t i=0; i<n2110.
numSFPs; i++)
571 obj.insert(
"designator", QJsonValue(QString(
"sfp1")));
573 obj.insert(
"designator", QJsonValue(QString(
"sfp2")));
575 obj.insert(
"ipAddress", QJsonValue(QString(n2110.
sfp[i].
ipAddress)));
576 obj.insert(
"subnetMask", QJsonValue(QString(n2110.
sfp[i].
subnetMask)));
577 obj.insert(
"gateWay", QJsonValue(QString(n2110.
sfp[i].
gateWay)));
579 sfpArray += QJsonValue(obj);
583 topObj.insert(
"sfps", QJsonValue(sfpArray));
592 std::cout <<
"ReceiveVideo2110" << std::endl;
603 QJsonObject vObj = vArray[i].toObject();
609 str = vObj[
"sfp1srcIPAddress"].toString().toStdString();
610 if (
m_verbose) std::cout <<
" sfp1srcIPAddress " << str.c_str() << std::endl;
612 str = vObj[
"sfp1DestIPAddress"].toString().toStdString();
613 if (
m_verbose) std::cout <<
" sfp1DestIPAddress " << str.c_str() << std::endl;
615 str = vObj[
"sfp1Enable"].toString().toStdString();
616 if (
m_verbose) std::cout <<
" sfp1Enable " << str.c_str() << std::endl;
623 str = vObj[
"sfp2srcIPAddress"].toString().toStdString();
624 if (
m_verbose) std::cout <<
" sfp2srcIPAddress " << str.c_str() << std::endl;
626 str = vObj[
"sfp2DestIPAddress"].toString().toStdString();
627 if (
m_verbose) std::cout <<
" sfp2DestIPAddress " << str.c_str() << std::endl;
629 str = vObj[
"sfp2Enable"].toString().toStdString();
630 if (
m_verbose) std::cout <<
" sfp2Enable " << str.c_str() << std::endl;
639 str = vObj[
"videoFormat"].toString().toStdString();
640 if (
m_verbose) std::cout <<
" videoFormat " << str.c_str() << std::endl;
646 str = vObj[
"enable"].toString().toStdString();
647 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl;
649 str = vObj[
"stream"].toString().toStdString();
650 if (
m_verbose) std::cout <<
" stream " << str.c_str() << std::endl << std::endl;
663 obj.insert(
"sfp1srcPort", QJsonValue(
static_cast<int>(rVideo2110.
rxVideoCh[i].
sourcePort[0])));
664 obj.insert(
"sfp1DestPort", QJsonValue(
static_cast<int>(rVideo2110.
rxVideoCh[i].
destPort[0])));
665 obj.insert(
"sfp1srcIPAddress", QJsonValue(QString(rVideo2110.
rxVideoCh[i].
sourceIP[0])));
666 obj.insert(
"sfp1DestIPAddress", QJsonValue(QString(rVideo2110.
rxVideoCh[i].
destIP[0])));
669 obj.insert(
"sfp2srcPort", QJsonValue(
static_cast<int>(rVideo2110.
rxVideoCh[i].
sourcePort[1])));
670 obj.insert(
"sfp2DestPort", QJsonValue(
static_cast<int>(rVideo2110.
rxVideoCh[i].
destPort[1])));
671 obj.insert(
"sfp2srcIPAddress", QJsonValue(QString(rVideo2110.
rxVideoCh[i].
sourceIP[1])));
672 obj.insert(
"sfp2DestIPAddress", QJsonValue(QString(rVideo2110.
rxVideoCh[i].
destIP[1])));
674 obj.insert(
"vlan", QJsonValue(
static_cast<int>(rVideo2110.
rxVideoCh[i].
vlan)));
675 obj.insert(
"ssrc", QJsonValue(
static_cast<int>(rVideo2110.
rxVideoCh[i].
ssrc)));
680 vArray += QJsonValue(obj);
690 std::cout <<
"ReceiveAudio2110" << std::endl;
701 QJsonObject vObj = aArray[i].toObject();
707 str = vObj[
"sfp1srcIPAddress"].toString().toStdString();
708 if (
m_verbose) std::cout <<
" sfp1srcIPAddress " << str.c_str() << std::endl;
710 str = vObj[
"sfp1DestIPAddress"].toString().toStdString();
711 if (
m_verbose) std::cout <<
" sfp1DestIPAddress " << str.c_str() << std::endl;
713 str = vObj[
"sfp1Enable"].toString().toStdString();
714 if (
m_verbose) std::cout <<
" sfp1Enable " << str.c_str() << std::endl;
721 str = vObj[
"sfp2srcIPAddress"].toString().toStdString();
722 if (
m_verbose) std::cout <<
" sfp2srcIPAddress " << str.c_str() << std::endl;
724 str = vObj[
"sfp2DestIPAddress"].toString().toStdString();
725 if (
m_verbose) std::cout <<
" sfp2DestIPAddress " << str.c_str() << std::endl;
727 str = vObj[
"sfp2Enable"].toString().toStdString();
728 if (
m_verbose) std::cout <<
" sfp2Enable " << str.c_str() << std::endl;
740 str = vObj[
"audioPktInterval"].toString().toStdString();
741 if (
m_verbose) std::cout <<
" audioPktInterval " << str.c_str() << std::endl;
743 str = vObj[
"enable"].toString().toStdString();
744 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl;
746 str = vObj[
"designator"].toString().toStdString();
747 if (
m_verbose) std::cout <<
" designator " << str.c_str() << std::endl << std::endl;
749 str = vObj[
"stream"].toString().toStdString();
750 if (
m_verbose) std::cout <<
" stream " << str.c_str() << std::endl;
763 obj.insert(
"sfp1srcPort", QJsonValue(
static_cast<int>(rAudio2110.
rxAudioCh[i].
sourcePort[0])));
764 obj.insert(
"sfp1DestPort", QJsonValue(
static_cast<int>(rAudio2110.
rxAudioCh[i].
destPort[0])));
765 obj.insert(
"sfp1srcIPAddress", QJsonValue(QString(rAudio2110.
rxAudioCh[i].
sourceIP[0])));
766 obj.insert(
"sfp1DestIPAddress", QJsonValue(QString(rAudio2110.
rxAudioCh[i].
destIP[0])));
769 obj.insert(
"sfp2srcPort", QJsonValue(
static_cast<int>(rAudio2110.
rxAudioCh[i].
sourcePort[1])));
770 obj.insert(
"sfp2DestPort", QJsonValue(
static_cast<int>(rAudio2110.
rxAudioCh[i].
destPort[1])));
771 obj.insert(
"sfp2srcIPAddress", QJsonValue(QString(rAudio2110.
rxAudioCh[i].
sourceIP[1])));
772 obj.insert(
"sfp2DestIPAddress", QJsonValue(QString(rAudio2110.
rxAudioCh[i].
destIP[1])));
774 obj.insert(
"vlan", QJsonValue(
static_cast<int>(rAudio2110.
rxAudioCh[i].
vlan)));
775 obj.insert(
"ssrc", QJsonValue(
static_cast<int>(rAudio2110.
rxAudioCh[i].
ssrc)));
784 aArray += QJsonValue(obj);
794 std::cout <<
"ReceiveAnc2110" << std::endl;
805 QJsonObject vObj = aArray[i].toObject();
811 str = vObj[
"sfp1srcIPAddress"].toString().toStdString();
812 if (
m_verbose) std::cout <<
" sfp1srcIPAddress " << str.c_str() << std::endl;
814 str = vObj[
"sfp1DestIPAddress"].toString().toStdString();
815 if (
m_verbose) std::cout <<
" sfp1DestIPAddress " << str.c_str() << std::endl;
817 str = vObj[
"sfp1Enable"].toString().toStdString();
818 if (
m_verbose) std::cout <<
" sfp1Enable " << str.c_str() << std::endl;
825 str = vObj[
"sfp2srcIPAddress"].toString().toStdString();
826 if (
m_verbose) std::cout <<
" sfp2srcIPAddress " << str.c_str() << std::endl;
828 str = vObj[
"sfp2DestIPAddress"].toString().toStdString();
829 if (
m_verbose) std::cout <<
" sfp2DestIPAddress " << str.c_str() << std::endl;
831 str = vObj[
"sfp2Enable"].toString().toStdString();
832 if (
m_verbose) std::cout <<
" sfp2Enable " << str.c_str() << std::endl;
842 str = vObj[
"enable"].toString().toStdString();
843 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl;
845 str = vObj[
"stream"].toString().toStdString();
846 if (
m_verbose) std::cout <<
" stream " << str.c_str() << std::endl;
859 obj.insert(
"sfp1srcPort", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
sourcePort[0])));
860 obj.insert(
"sfp1DestPort", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
destPort[0])));
861 obj.insert(
"sfp1srcIPAddress", QJsonValue(QString(rAnc2110.
rxAncCh[i].
sourceIP[0])));
862 obj.insert(
"sfp1DestIPAddress", QJsonValue(QString(rAnc2110.
rxAncCh[i].
destIP[0])));
865 obj.insert(
"sfp2srcPort", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
sourcePort[1])));
866 obj.insert(
"sfp2DestPort", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
destPort[1])));
867 obj.insert(
"sfp2srcIPAddress", QJsonValue(QString(rAnc2110.
rxAncCh[i].
sourceIP[1])));
868 obj.insert(
"sfp2DestIPAddress", QJsonValue(QString(rAnc2110.
rxAncCh[i].
destIP[1])));
870 obj.insert(
"vlan", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
vlan)));
871 obj.insert(
"ssrc", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
ssrc)));
872 obj.insert(
"payloadType", QJsonValue(
static_cast<int>(rAnc2110.
rxAncCh[i].
payloadType)));
877 aArray += QJsonValue(obj);
887 std::cout <<
"TransmitVideo2110" << std::endl;
898 QJsonObject vObj = vArray[i].toObject();
904 str = vObj[
"sfp1RemoteIPAddress"].toString().toStdString();
905 if (
m_verbose) std::cout <<
" sfp1RemoteIPAddress " << str.c_str() << std::endl;
907 str = vObj[
"sfp1Enable"].toString().toStdString();
908 if (
m_verbose) std::cout <<
" sfp1Enable " << str.c_str() << std::endl;
915 str = vObj[
"sfp2RemoteIPAddress"].toString().toStdString();
916 if (
m_verbose) std::cout <<
" sfp2RemoteIPAddress " << str.c_str() << std::endl;
918 str = vObj[
"sfp2Enable"].toString().toStdString();
919 if (
m_verbose) std::cout <<
" sfp2Enable " << str.c_str() << std::endl;
929 str = vObj[
"sampling"].toString().toStdString();
930 if (
m_verbose) std::cout <<
" sampling " << str.c_str() << std::endl;
933 str = vObj[
"videoFormat"].toString().toStdString();
934 if (
m_verbose) std::cout <<
" videoFormat " << str.c_str() << std::endl;
940 str = vObj[
"enable"].toString().toStdString();
941 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl;
943 str = vObj[
"stream"].toString().toStdString();
944 if (
m_verbose) std::cout <<
" stream " << str.c_str() << std::endl << std::endl;
956 obj.insert(
"sfp1LocalPort", QJsonValue(
static_cast<int>(tVideo2110.
txVideoCh[i].
localPort[0])));
957 obj.insert(
"sfp1RemoteIPAddress", QJsonValue(QString(tVideo2110.
txVideoCh[i].
remoteIP[0])));
958 obj.insert(
"sfp1RemotePort", QJsonValue(
static_cast<int>(tVideo2110.
txVideoCh[i].
remotePort[0])));
961 obj.insert(
"sfp2LocalPort", QJsonValue(
static_cast<int>(tVideo2110.
txVideoCh[i].
localPort[1])));
962 obj.insert(
"sfp2RemoteIPAddress", QJsonValue(QString(tVideo2110.
txVideoCh[i].
remoteIP[1])));
963 obj.insert(
"sfp2RemotePort", QJsonValue(
static_cast<int>(tVideo2110.
txVideoCh[i].
remotePort[1])));
966 obj.insert(
"ttl", QJsonValue(
static_cast<int>(tVideo2110.
txVideoCh[i].
ttl)));
967 obj.insert(
"ssrc", QJsonValue(
static_cast<int>(tVideo2110.
txVideoCh[i].
ssrc)));
974 vArray += QJsonValue(obj);
984 std::cout <<
"TransmitAudio2110" << std::endl;
995 QJsonObject vObj = aArray[i].toObject();
1001 str = vObj[
"sfp1RemoteIPAddress"].toString().toStdString();
1002 if (
m_verbose) std::cout <<
" sfp1RemoteIPAddress " << str.c_str() << std::endl;
1004 str = vObj[
"sfp1Enable"].toString().toStdString();
1005 if (
m_verbose) std::cout <<
" sfp1Enable " << str.c_str() << std::endl;
1012 str = vObj[
"sfp2RemoteIPAddress"].toString().toStdString();
1013 if (
m_verbose) std::cout <<
" sfp2RemoteIPAddress " << str.c_str() << std::endl;
1015 str = vObj[
"sfp2Enable"].toString().toStdString();
1016 if (
m_verbose) std::cout <<
" sfp2Enable " << str.c_str() << std::endl;
1030 str = vObj[
"audioPktInterval"].toString().toStdString();
1031 if (
m_verbose) std::cout <<
" audioPktInterval " << str.c_str() << std::endl;
1033 str = vObj[
"enable"].toString().toStdString();
1034 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl;
1036 str = vObj[
"stream"].toString().toStdString();
1037 if (
m_verbose) std::cout <<
" stream " << str.c_str() << std::endl;
1039 str = vObj[
"designator"].toString().toStdString();
1040 if (
m_verbose) std::cout <<
" designator " << str.c_str() << std::endl << std::endl;
1052 obj.insert(
"sfp1LocalPort", QJsonValue(
static_cast<int>(tAudio2110.
txAudioCh[i].
localPort[0])));
1053 obj.insert(
"sfp1RemoteIPAddress", QJsonValue(QString(tAudio2110.
txAudioCh[i].
remoteIP[0])));
1054 obj.insert(
"sfp1RemotePort", QJsonValue(
static_cast<int>(tAudio2110.
txAudioCh[i].
remotePort[0])));
1057 obj.insert(
"sfp2LocalPort", QJsonValue(
static_cast<int>(tAudio2110.
txAudioCh[i].
localPort[1])));
1058 obj.insert(
"sfp2RemoteIPAddress", QJsonValue(QString(tAudio2110.
txAudioCh[i].
remoteIP[1])));
1059 obj.insert(
"sfp2RemotePort", QJsonValue(
static_cast<int>(tAudio2110.
txAudioCh[i].
remotePort[1])));
1062 obj.insert(
"ttl", QJsonValue(
static_cast<int>(tAudio2110.
txAudioCh[i].
ttl)));
1063 obj.insert(
"ssrc", QJsonValue(
static_cast<int>(tAudio2110.
txAudioCh[i].
ssrc)));
1072 aArray += QJsonValue(obj);
1082 std::cout <<
"TransmitAnc2110" << std::endl;
1093 QJsonObject vObj = aArray[i].toObject();
1099 str = vObj[
"sfp1RemoteIPAddress"].toString().toStdString();
1100 if (
m_verbose) std::cout <<
" sfp1RemoteIPAddress " << str.c_str() << std::endl;
1102 str = vObj[
"sfp1Enable"].toString().toStdString();
1103 if (
m_verbose) std::cout <<
" sfp1Enable " << str.c_str() << std::endl;
1110 str = vObj[
"sfp2RemoteIPAddress"].toString().toStdString();
1111 if (
m_verbose) std::cout <<
" sfp2RemoteIPAddress " << str.c_str() << std::endl;
1113 str = vObj[
"sfp2Enable"].toString().toStdString();
1114 if (
m_verbose) std::cout <<
" sfp2Enable " << str.c_str() << std::endl;
1117 tAnc2110.
txAncCh[i].
ttl = vObj[
"ttl"].toInt();
1124 str = vObj[
"enable"].toString().toStdString();
1125 if (
m_verbose) std::cout <<
" enable " << str.c_str() << std::endl;
1127 str = vObj[
"stream"].toString().toStdString();
1128 if (
m_verbose) std::cout <<
" stream " << str.c_str() << std::endl;
1140 obj.insert(
"sfp1LocalPort", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
localPort[0])));
1141 obj.insert(
"sfp1RemoteIPAddress", QJsonValue(QString(tAnc2110.
txAncCh[i].
remoteIP[0])));
1142 obj.insert(
"sfp1RemotePort", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
remotePort[0])));
1145 obj.insert(
"sfp2LocalPort", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
localPort[1])));
1146 obj.insert(
"sfp2RemoteIPAddress", QJsonValue(QString(tAnc2110.
txAncCh[i].
remoteIP[1])));
1147 obj.insert(
"sfp2RemotePort", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
remotePort[1])));
1150 obj.insert(
"ttl", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
ttl)));
1151 obj.insert(
"ssrc", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
ssrc)));
1152 obj.insert(
"payloadType", QJsonValue(
static_cast<int>(tAnc2110.
txAncCh[i].
payloadType)));
1156 aArray += QJsonValue(obj);
1169 QJsonObject& topObj)
1171 QJsonObject netJson;
1176 QJsonArray vidRecJson;
1180 QJsonArray audRecJson;
1184 QJsonArray ancRecJson;
1189 QJsonArray vidTransJson;
1193 QJsonArray audTransJson;
1197 QJsonArray ancTransJson;
1202 topObj.insert(
"protocol", QJsonValue(QString(
"2110")));
1203 topObj.insert(
"network2110",
m_netJson);