remove platfrom driver from standards namespace
This commit is contained in:
parent
c6a969bd9a
commit
eaf49608e5
|
@ -4,7 +4,6 @@
|
|||
#include <QNetworkDatagram>
|
||||
#include <QNetworkInterface>
|
||||
|
||||
namespace SACN {
|
||||
|
||||
/**
|
||||
* @brief QSacnNode::QSacnNode
|
||||
|
@ -14,11 +13,10 @@ namespace SACN {
|
|||
QSacnNode::QSacnNode(QObject *parent, QUuid cid)
|
||||
: Appliance(UUID::uuid(cid.toString().toStdString()))
|
||||
, QUdpSocket(parent)
|
||||
, multiverse_(new MultiverseModel(this))
|
||||
{
|
||||
fctn_ = "libESTA QSacnNode";
|
||||
|
||||
bind(QHostAddress::AnyIPv4, ACN_SDT_MULTICAST_PORT);
|
||||
bind(QHostAddress::AnyIPv4, SACN::ACN_SDT_MULTICAST_PORT);
|
||||
|
||||
connect(this, &QUdpSocket::readyRead,
|
||||
this, &QSacnNode::UdpPayloadReceiver);
|
||||
|
@ -71,13 +69,13 @@ void QSacnNode::UdpPayloadReceiver()
|
|||
while (hasPendingDatagrams()) {
|
||||
QNetworkDatagram datagram = receiveDatagram();
|
||||
// Expecting IANA registered Session Data Transport traffic
|
||||
if (datagram.destinationPort() != ACN_SDT_MULTICAST_PORT)
|
||||
if (datagram.destinationPort() != SACN::ACN_SDT_MULTICAST_PORT)
|
||||
return;
|
||||
|
||||
// wrap a PDU io stream around the QNetworkDatagram data buffer
|
||||
PDU::Stream stream(new PDU::pdu_stream(
|
||||
(uint8_t*)datagram.data().constData(),
|
||||
datagram.data().length()));
|
||||
SACN::PDU::Stream stream(new SACN::PDU::pdu_stream(
|
||||
(uint8_t*)datagram.data().constData(),
|
||||
datagram.data().length()));
|
||||
Receiver::UdpPayloadReceiver(stream);
|
||||
}
|
||||
}
|
||||
|
@ -90,10 +88,9 @@ void QSacnNode::UdpPayloadReceiver()
|
|||
* wrap data change callback to a Qt signal
|
||||
*/
|
||||
void QSacnNode::emitFound(
|
||||
std::shared_ptr<EXTENDED::DISCOVERY::DiscoveredUniverse> univ)
|
||||
std::shared_ptr<SACN::EXTENDED::DISCOVERY::DiscoveredUniverse> univ)
|
||||
{
|
||||
qDebug() << "found universe " << QString::number(univ->universe());
|
||||
emit foundUniverse(univ);
|
||||
}
|
||||
|
||||
} // SACN
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <QUuid>
|
||||
|
||||
|
||||
namespace SACN {
|
||||
// 9.3.1 Allocation of IPv4 Multicast Addresses
|
||||
// Multicast addresses are from the IPv4 Local Scope.
|
||||
inline QHostAddress IPv4MulticastAddress(uint16_t universe) {
|
||||
|
@ -28,7 +27,7 @@ inline QHostAddress IPv6MulticastAddress(uint16_t universe) {
|
|||
|
||||
class QT_EXPORT QSacnNode
|
||||
: public QUdpSocket
|
||||
, public Node
|
||||
, public SACN::Node
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -41,13 +40,14 @@ public:
|
|||
virtual void unsubscribe(const uint16_t);
|
||||
|
||||
signals:
|
||||
void foundUniverse(std::shared_ptr<EXTENDED::DISCOVERY::DiscoveredUniverse>);
|
||||
void foundUniverse(
|
||||
std::shared_ptr<SACN::EXTENDED::DISCOVERY::DiscoveredUniverse>);
|
||||
|
||||
private:
|
||||
void UdpPayloadReceiver();
|
||||
void emitFound(std::shared_ptr<EXTENDED::DISCOVERY::DiscoveredUniverse>);
|
||||
void emitFound(
|
||||
std::shared_ptr<SACN::EXTENDED::DISCOVERY::DiscoveredUniverse>);
|
||||
|
||||
QHash<uint16_t, QSacnUniverse*> universes_;
|
||||
};
|
||||
|
||||
} // namespace SACN
|
||||
|
|
Loading…
Reference in New Issue