receive a ProbeRequest
This commit is contained in:
parent
5d4f6654cd
commit
fa24d64c72
|
@ -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
|
||||
|
|
|
@ -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_;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue