1
0
Fork 0

inherit from an EPT Client base class that does nothing.

This commit is contained in:
Kevin Matz 2021-09-19 10:21:55 -04:00
parent 9fe57bc363
commit 6b960d8913
3 changed files with 31 additions and 13 deletions

View File

@ -34,6 +34,14 @@ class Client
{
public:
Client();
/**
* @brief receiveEPT
* @param frame
*
* Override this method to impliment your EPT.
*/
virtual void receiveEPT(ACN::PDU::Message<EPT::Pdu>) {};
};
} // namespace RDMnet::EPT

View File

@ -55,4 +55,19 @@ void Implementation::rlpLlrpReceiver(ACN::PDU::Message<ACN::RLP::Pdu> root)
}
/**
* @brief Implementation::rlpEptReceiver
* @param root
*/
void Implementation::rlpEptReceiver(ACN::PDU::Message<ACN::RLP::Pdu> root)
{
// data segment will be a block of EPT Pdu
root->createDataBlock<EPT::Pdu>();
auto block = std::static_pointer_cast<ACN::PDU::Block<EPT::Pdu>>(root->data());
for(auto const &frame : *block->pdu)
EPT::Client::receiveEPT(frame);
}
} // namespace RDMnet

View File

@ -23,9 +23,10 @@
*/
#pragma once
#include "rlp/component.h"
#include "rdm/responder.h"
#include "ept/client.h"
#include "llrp/target.h"
#include "rdm/responder.h"
#include "rlp/component.h"
namespace RDMnet {
@ -33,23 +34,17 @@ namespace RDMnet {
* @brief The Implementation class
*/
class Implementation
: public ACN::RLP::Component
, public RDM::Responder
, public LLRP::Target
: public ACN::RLP::Component
, public RDM::Responder
, public LLRP::Target
, public EPT::Client
{
public:
Implementation(UUID::uuid = UUID::uuid(),
RDM::UID = RDM::UID());
void rlpLlrpReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);
/**
* @brief rlpEptReceiver
*
* EPT client support is optional. Override this method in your derived
* class to impliment EPT support.
*/
virtual void rlpEptReceiver(ACN::PDU::Message<ACN::RLP::Pdu>) {};
void rlpEptReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);
};
} // namespace RDMnet