1
0
Fork 0

receive a ProbeRequest

This commit is contained in:
Kevin Matz 2022-06-04 10:52:42 -04:00
parent 5d4f6654cd
commit fa24d64c72
2 changed files with 33 additions and 0 deletions

View File

@ -53,4 +53,33 @@ void Device::rlpRptReceiver(ACN::PDU::Message<ACN::RLP::Pdu> root)
}
/**
* @brief Device::receiveProbeRequest
* @param pdu
*/
void Device::receiveProbeRequest(ACN::PDU::Message<LLRP::ProbeRequest::Pdu> pdu)
{
/**
* > \cite RDMnet 5.4.2.1 Probe Request PDU
* > Cient TCP connection inactive. If this bit is set, an LLRP Target shall
* > only reply if its associated RPT Client is not currently connected to
* > a Broker.
*/
auto data = std::static_pointer_cast<LLRP::ProbeRequest::request_data>(pdu->data());
if (data->filter.client_tcp_inactive && RPT::Device::connectedToBroker)
return;
/**
* > \cite RDMnet 5.4.2.1 Probe Request PDU
* > Brokers only. If this bit is set, an LLRP Target shall only reply if
* > it is also associated with a Broker.
*/
if (data->filter.brokers_only)
return;
LLRP::Target::receiveProbeRequest(pdu);
}
} // namespace RDMnet

View File

@ -42,6 +42,10 @@ public:
void rlpRptReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);
protected:
// 5.4.2.1 Probe Request PDU
void receiveProbeRequest(ACN::PDU::Message<LLRP::ProbeRequest::Pdu>) override;
private:
UUID::uuid rid_;
};